Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
function getItem
import { getItem } from "https://deno.land/x/netzo@0.2.94/plugins/portals/utils/db.ts";

Gets the item with the given ID from the database.

Examples

Example 1

import { getItem } from "netzo/plugins/portals/utils/db.ts";

const item = await getItem("01H9YD2RVCYTBVJEYEJEV5D1S1");
item?.id; // Returns "01H9YD2RVCYTBVJEYEJEV5D1S1";
item?.userLogin; // Returns "snoop"
item?.title; // Returns "example-title"
item?.url; // Returns "http://example.com"
item?.score; // Returns 420

Parameters

id: string