lookupObject(options?: LookupObjectOptions,): Promise<Object | null>
Looks up an ActivityStreams object by its URI (including acct:
URIs)
or a fediverse handle (e.g., @user@server
or user@server
).
Example 1
Example 1
// Look up an actor by its fediverse handle: await lookupObject("@hongminhee@fosstodon.org"); // returning a `Person` object. // A fediverse handle can omit the leading '@': await lookupObject("hongminhee@fosstodon.org"); // returning a `Person` object. // A `acct:` URI can be used as well: await lookupObject("acct:hongminhee@fosstodon.org"); // returning a `Person` object. // Look up an object by its URI: await lookupObject("https://todon.eu/@hongminhee/112060633798771581"); // returning a `Note` object. // It can be a `URL` object as well: await lookupObject(new URL("https://todon.eu/@hongminhee/112060633798771581")); // returning a `Note` object.
optional
options: LookupObjectOptions
Lookup options.