/* tslint:disable */ /* eslint-disable */ /** * TwitchGameApi * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 1.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; /** * CurrencyApi - axios parameter creator * @export */ export const CurrencyApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @param {string} card * @param {*} [options] Override http request option. * @throws {RequiredError} */ currencyCardCardPost: async (card: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'card' is not null or undefined if (card === null || card === undefined) { throw new RequiredError('card','Required parameter card was null or undefined when calling currencyCardCardPost.'); } const localVarPath = `/Currency/Card/{card}` .replace(`{${"card"}}`, encodeURIComponent(String(card))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ currencyCardGet: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/Currency/Card`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ currencyCardsGet: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/Currency/Cards`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ currencyCreditsGet: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/Currency/Credits`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, } }; /** * CurrencyApi - functional programming interface * @export */ export const CurrencyApiFp = function(configuration?: Configuration) { return { /** * * @param {string} card * @param {*} [options] Override http request option. * @throws {RequiredError} */ async currencyCardCardPost(card: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await CurrencyApiAxiosParamCreator(configuration).currencyCardCardPost(card, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async currencyCardGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await CurrencyApiAxiosParamCreator(configuration).currencyCardGet(options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async currencyCardsGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>> { const localVarAxiosArgs = await CurrencyApiAxiosParamCreator(configuration).currencyCardsGet(options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async currencyCreditsGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await CurrencyApiAxiosParamCreator(configuration).currencyCreditsGet(options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * CurrencyApi - factory interface * @export */ export const CurrencyApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * * @param {string} card * @param {*} [options] Override http request option. * @throws {RequiredError} */ async currencyCardCardPost(card: string, options?: AxiosRequestConfig): Promise> { return CurrencyApiFp(configuration).currencyCardCardPost(card, options).then((request) => request(axios, basePath)); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async currencyCardGet(options?: AxiosRequestConfig): Promise> { return CurrencyApiFp(configuration).currencyCardGet(options).then((request) => request(axios, basePath)); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async currencyCardsGet(options?: AxiosRequestConfig): Promise>> { return CurrencyApiFp(configuration).currencyCardsGet(options).then((request) => request(axios, basePath)); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async currencyCreditsGet(options?: AxiosRequestConfig): Promise> { return CurrencyApiFp(configuration).currencyCreditsGet(options).then((request) => request(axios, basePath)); }, }; }; /** * CurrencyApi - object-oriented interface * @export * @class CurrencyApi * @extends {BaseAPI} */ export class CurrencyApi extends BaseAPI { /** * * @param {string} card * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CurrencyApi */ public async currencyCardCardPost(card: string, options?: AxiosRequestConfig) : Promise> { return CurrencyApiFp(this.configuration).currencyCardCardPost(card, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CurrencyApi */ public async currencyCardGet(options?: AxiosRequestConfig) : Promise> { return CurrencyApiFp(this.configuration).currencyCardGet(options).then((request) => request(this.axios, this.basePath)); } /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CurrencyApi */ public async currencyCardsGet(options?: AxiosRequestConfig) : Promise>> { return CurrencyApiFp(this.configuration).currencyCardsGet(options).then((request) => request(this.axios, this.basePath)); } /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CurrencyApi */ public async currencyCreditsGet(options?: AxiosRequestConfig) : Promise> { return CurrencyApiFp(this.configuration).currencyCreditsGet(options).then((request) => request(this.axios, this.basePath)); } }