export type GetApiApplicationApplicationIdAnalyticsV1CohortsCohortIdMembersArgs = {pageNumber?: number | undefined, pageSize?: number | undefined, applicationId: number, cohortId: number, environment_id: number}; export type GetApiApplicationApplicationIdAnalyticsV1CohortsCohortIdMembersOptions = {baseUrl?: string | undefined, personalAccessTokenAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get the member list for a cohort * * GET /application/{applicationId}/analytics/v1/cohorts/{cohortId}/members */ export const getApiApplicationApplicationIdAnalyticsV1CohortsCohortIdMembers = async (args: GetApiApplicationApplicationIdAnalyticsV1CohortsCohortIdMembersArgs, options?: GetApiApplicationApplicationIdAnalyticsV1CohortsCohortIdMembersOptions) => { const {baseUrl = "https://api.gamebeast.gg", fetch: fetchFn = fetch, personalAccessTokenAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.pageNumber != null) query.append("pageNumber", String(args.pageNumber)) if (args.pageSize != null) query.append("pageSize", String(args.pageSize)) if (args.environment_id != null) headers.set("environment_id", String(args.environment_id)) if (personalAccessTokenAuth !== undefined) headers.set('authorization', `Bearer ${personalAccessTokenAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/application/${encodeURIComponent(String(args.applicationId))}/analytics/v1/cohorts/${encodeURIComponent(String(args.cohortId))}/members${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 };