import type { MastodonObject } from './base'; import { fetchAPI, type InstanceInfo } from './util'; export interface MastodonAccount extends MastodonObject { fqn: string; display_name: string; acct: string; url: string; avatar: string; avatar_static: string; note: string; bot: boolean; fields: { name: string; value: string; verified_at: string | null; }[]; } export async function fetchAccount(instance: InstanceInfo, id: string): Promise { return await fetchAPI(instance, '/api/v1/accounts/' + id) .then((r) => r.json()) .then((b) => b as MastodonAccount); }