/* tslint:disable */ // @ts-nocheck /* eslint-disable */ /** * Audius API * * The version of the OpenAPI document: 1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { BestSellingResponse, } from '../models'; import { BestSellingResponseFromJSON, BestSellingResponseToJSON, } from '../models'; export interface GetBestSellingRequest { offset?: number; limit?: number; userId?: string; type?: GetBestSellingTypeEnum; } /** * */ export class ExploreApi extends runtime.BaseAPI { /** * @hidden * Get best selling tracks and/or albums with related entities * Get best selling tracks and playlists with related entities */ async getBestSellingRaw(params: GetBestSellingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; if (params.offset !== undefined) { queryParameters['offset'] = params.offset; } if (params.limit !== undefined) { queryParameters['limit'] = params.limit; } if (params.userId !== undefined) { queryParameters['user_id'] = params.userId; } if (params.type !== undefined) { queryParameters['type'] = params.type; } const headerParameters: runtime.HTTPHeaders = {}; if (!headerParameters["Authorization"] && this.configuration && this.configuration.accessToken) { const token = await this.configuration.accessToken("OAuth2", ["read"]); if (token) { headerParameters["Authorization"] = token; } } const response = await this.request({ path: `/explore/best-selling`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => BestSellingResponseFromJSON(jsonValue)); } /** * Get best selling tracks and/or albums with related entities * Get best selling tracks and playlists with related entities */ async getBestSelling(params: GetBestSellingRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getBestSellingRaw(params, initOverrides); return await response.value(); } } /** * @export */ export const GetBestSellingTypeEnum = { All: 'all', Track: 'track', Album: 'album' } as const; export type GetBestSellingTypeEnum = typeof GetBestSellingTypeEnum[keyof typeof GetBestSellingTypeEnum];