export type GetApiScrapecreatorsV1BlueskyPostArgs = {url: string}; export type GetApiScrapecreatorsV1BlueskyPostOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Post * * GET /scrapecreators/v1/bluesky/post */ export const getApiScrapecreatorsV1BlueskyPost = async (args: GetApiScrapecreatorsV1BlueskyPostArgs, options?: GetApiScrapecreatorsV1BlueskyPostOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.url != null) query.append("url", String(args.url)) const url = `${baseUrl.replace(/\/+$/, '')}/scrapecreators/v1/bluesky/post${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };