export type GetApiScrapecreatorsV1PinterestBoardArgs = {url: string, cursor?: string | undefined, trim?: boolean | undefined}; export type GetApiScrapecreatorsV1PinterestBoardOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Board Pagination billing: call the first page normally and save billing.requestId from the Orthogonal /v1/run response. For later page, offset, or cursor calls on the same logical search, pass parentRequestId with unchanged non-pagination parameters. Valid continuation calls still get their own request IDs and quoted price, but are charged 0. Changing filters starts a new billable request. * * GET /scrapecreators/v1/pinterest/board */ export const getApiScrapecreatorsV1PinterestBoard = async (args: GetApiScrapecreatorsV1PinterestBoardArgs, options?: GetApiScrapecreatorsV1PinterestBoardOptions) => { 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)) if (args.cursor != null) query.append("cursor", String(args.cursor)) if (args.trim != null) query.append("trim", String(args.trim)) const url = `${baseUrl.replace(/\/+$/, '')}/scrapecreators/v1/pinterest/board${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 };