/* tslint:disable */ /* eslint-disable */ /** * Jellyfin API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 10.8.9 * * * 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 { CountryInfo, CultureDto, LocalizationOption, ParentalRating, } from '../models'; import { CountryInfoFromJSON, CountryInfoToJSON, CultureDtoFromJSON, CultureDtoToJSON, LocalizationOptionFromJSON, LocalizationOptionToJSON, ParentalRatingFromJSON, ParentalRatingToJSON, } from '../models'; /** * */ export class LocalizationApi extends runtime.BaseAPI { /** * Gets known countries. */ async getCountriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication } const response = await this.request({ path: `/Localization/Countries`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CountryInfoFromJSON)); } /** * Gets known countries. */ async getCountries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.getCountriesRaw(initOverrides); return await response.value(); } /** * Gets known cultures. */ async getCulturesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication } const response = await this.request({ path: `/Localization/Cultures`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CultureDtoFromJSON)); } /** * Gets known cultures. */ async getCultures(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.getCulturesRaw(initOverrides); return await response.value(); } /** * Gets localization options. */ async getLocalizationOptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication } const response = await this.request({ path: `/Localization/Options`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LocalizationOptionFromJSON)); } /** * Gets localization options. */ async getLocalizationOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.getLocalizationOptionsRaw(initOverrides); return await response.value(); } /** * Gets known parental ratings. */ async getParentalRatingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication } const response = await this.request({ path: `/Localization/ParentalRatings`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ParentalRatingFromJSON)); } /** * Gets known parental ratings. */ async getParentalRatings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.getParentalRatingsRaw(initOverrides); return await response.value(); } }