wip: plumbing for building a web app

This commit is contained in:
Arjun Patel
2026-05-26 14:37:28 -07:00
parent 1e992abf41
commit 578ebdbd1e
39 changed files with 677 additions and 236 deletions
+11
View File
@@ -27,6 +27,7 @@ import type {
RevokeInvitationRequest,
SignInRequest,
} from "./types";
import type { LinkMetadata } from "@/lib/link-metadata";
interface ApiClientConfig {
baseUrl: string;
@@ -256,6 +257,16 @@ class ApiClient {
`/networks/${networkId}/usage`,
);
}
// --- Link metadata ---
async getLinkMetadata(url: string): Promise<LinkMetadata | null> {
const response = await this.fetch(
"GET",
`/metadata?url=${encodeURIComponent(url)}`,
);
return (await response.json()) as LinkMetadata | null;
}
}
export const apiClient = new ApiClient({