|
| 1 | +/* tslint:disable */ |
| 2 | +/* eslint-disable */ |
| 3 | +/** |
| 4 | + * Jellyfin API |
| 5 | + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
| 6 | + * |
| 7 | + * The version of the OpenAPI document: 10.8.0 |
| 8 | + * |
| 9 | + * |
| 10 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 11 | + * https://openapi-generator.tech |
| 12 | + * Do not edit the class manually. |
| 13 | + */ |
| 14 | + |
| 15 | + |
| 16 | +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; |
| 17 | +import { Configuration } from '../configuration'; |
| 18 | +// Some imports not used depending on template conditions |
| 19 | +// @ts-ignore |
| 20 | +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; |
| 21 | +// @ts-ignore |
| 22 | +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; |
| 23 | +// @ts-ignore |
| 24 | +import { ConfigImageTypes } from '../models'; |
| 25 | +/** |
| 26 | + * TmdbApi - axios parameter creator |
| 27 | + * @export |
| 28 | + */ |
| 29 | +export const TmdbApiAxiosParamCreator = function (configuration?: Configuration) { |
| 30 | + return { |
| 31 | + /** |
| 32 | + * |
| 33 | + * @summary Gets the TMDb image configuration options. |
| 34 | + * @param {*} [options] Override http request option. |
| 35 | + * @throws {RequiredError} |
| 36 | + */ |
| 37 | + tmdbClientConfiguration: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => { |
| 38 | + const localVarPath = `/Tmdb/ClientConfiguration`; |
| 39 | + // use dummy base URL string because the URL constructor only accepts absolute URLs. |
| 40 | + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
| 41 | + let baseOptions; |
| 42 | + if (configuration) { |
| 43 | + baseOptions = configuration.baseOptions; |
| 44 | + } |
| 45 | + |
| 46 | + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; |
| 47 | + const localVarHeaderParameter = {} as any; |
| 48 | + const localVarQueryParameter = {} as any; |
| 49 | + |
| 50 | + // authentication CustomAuthentication required |
| 51 | + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + setSearchParams(localVarUrlObj, localVarQueryParameter); |
| 56 | + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
| 57 | + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
| 58 | + |
| 59 | + return { |
| 60 | + url: toPathString(localVarUrlObj), |
| 61 | + options: localVarRequestOptions, |
| 62 | + }; |
| 63 | + }, |
| 64 | + } |
| 65 | +}; |
| 66 | + |
| 67 | +/** |
| 68 | + * TmdbApi - functional programming interface |
| 69 | + * @export |
| 70 | + */ |
| 71 | +export const TmdbApiFp = function(configuration?: Configuration) { |
| 72 | + const localVarAxiosParamCreator = TmdbApiAxiosParamCreator(configuration) |
| 73 | + return { |
| 74 | + /** |
| 75 | + * |
| 76 | + * @summary Gets the TMDb image configuration options. |
| 77 | + * @param {*} [options] Override http request option. |
| 78 | + * @throws {RequiredError} |
| 79 | + */ |
| 80 | + async tmdbClientConfiguration(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigImageTypes>> { |
| 81 | + const localVarAxiosArgs = await localVarAxiosParamCreator.tmdbClientConfiguration(options); |
| 82 | + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); |
| 83 | + }, |
| 84 | + } |
| 85 | +}; |
| 86 | + |
| 87 | +/** |
| 88 | + * TmdbApi - factory interface |
| 89 | + * @export |
| 90 | + */ |
| 91 | +export const TmdbApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { |
| 92 | + const localVarFp = TmdbApiFp(configuration) |
| 93 | + return { |
| 94 | + /** |
| 95 | + * |
| 96 | + * @summary Gets the TMDb image configuration options. |
| 97 | + * @param {*} [options] Override http request option. |
| 98 | + * @throws {RequiredError} |
| 99 | + */ |
| 100 | + tmdbClientConfiguration(options?: any): AxiosPromise<ConfigImageTypes> { |
| 101 | + return localVarFp.tmdbClientConfiguration(options).then((request) => request(axios, basePath)); |
| 102 | + }, |
| 103 | + }; |
| 104 | +}; |
| 105 | + |
| 106 | +/** |
| 107 | + * TmdbApi - object-oriented interface |
| 108 | + * @export |
| 109 | + * @class TmdbApi |
| 110 | + * @extends {BaseAPI} |
| 111 | + */ |
| 112 | +export class TmdbApi extends BaseAPI { |
| 113 | + /** |
| 114 | + * |
| 115 | + * @summary Gets the TMDb image configuration options. |
| 116 | + * @param {*} [options] Override http request option. |
| 117 | + * @throws {RequiredError} |
| 118 | + * @memberof TmdbApi |
| 119 | + */ |
| 120 | + public tmdbClientConfiguration(options?: AxiosRequestConfig) { |
| 121 | + return TmdbApiFp(this.configuration).tmdbClientConfiguration(options).then((request) => request(this.axios, this.basePath)); |
| 122 | + } |
| 123 | +} |
0 commit comments