export type GetApiV01PublicSparkleAppsAppSecretArgs = {app_secret: string}; export type GetApiV01PublicSparkleAppsAppSecretOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Gets the sparkle feed of the releases that are distributed to all the public distribution groups. * * GET /v0.1/public/sparkle/apps/{app_secret} */ export const getApiV01PublicSparkleAppsAppSecret = async (args: GetApiV01PublicSparkleAppsAppSecretArgs, options?: GetApiV01PublicSparkleAppsAppSecretOptions) => { const {baseUrl = "https://api.appcenter.ms", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v0.1/public/sparkle/apps/${encodeURIComponent(String(args.app_secret))}${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 };