188 lines
6.1 KiB
Swift
188 lines
6.1 KiB
Swift
//
|
|
// LocalizationAPI.swift
|
|
//
|
|
// Generated by swagger-codegen
|
|
// https://github.com/swagger-api/swagger-codegen
|
|
//
|
|
|
|
import Foundation
|
|
import Alamofire
|
|
|
|
|
|
open class LocalizationAPI {
|
|
/**
|
|
Gets known countries.
|
|
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getCountries(completion: @escaping ((_ data: [CountryInfo]?,_ error: Error?) -> Void)) {
|
|
getCountriesWithRequestBuilder().execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets known countries.
|
|
- GET /Localization/Countries
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- examples: [{contentType=application/json, example=[ {
|
|
"TwoLetterISORegionName" : "TwoLetterISORegionName",
|
|
"ThreeLetterISORegionName" : "ThreeLetterISORegionName",
|
|
"DisplayName" : "DisplayName",
|
|
"Name" : "Name"
|
|
}, {
|
|
"TwoLetterISORegionName" : "TwoLetterISORegionName",
|
|
"ThreeLetterISORegionName" : "ThreeLetterISORegionName",
|
|
"DisplayName" : "DisplayName",
|
|
"Name" : "Name"
|
|
} ]}]
|
|
|
|
- returns: RequestBuilder<[CountryInfo]>
|
|
*/
|
|
open class func getCountriesWithRequestBuilder() -> RequestBuilder<[CountryInfo]> {
|
|
let path = "/Localization/Countries"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<[CountryInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Gets known cultures.
|
|
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getCultures(completion: @escaping ((_ data: [CultureDto]?,_ error: Error?) -> Void)) {
|
|
getCulturesWithRequestBuilder().execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets known cultures.
|
|
- GET /Localization/Cultures
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- examples: [{contentType=application/json, example=[ {
|
|
"ThreeLetterISOLanguageNames" : [ "ThreeLetterISOLanguageNames", "ThreeLetterISOLanguageNames" ],
|
|
"ThreeLetterISOLanguageName" : "ThreeLetterISOLanguageName",
|
|
"DisplayName" : "DisplayName",
|
|
"Name" : "Name",
|
|
"TwoLetterISOLanguageName" : "TwoLetterISOLanguageName"
|
|
}, {
|
|
"ThreeLetterISOLanguageNames" : [ "ThreeLetterISOLanguageNames", "ThreeLetterISOLanguageNames" ],
|
|
"ThreeLetterISOLanguageName" : "ThreeLetterISOLanguageName",
|
|
"DisplayName" : "DisplayName",
|
|
"Name" : "Name",
|
|
"TwoLetterISOLanguageName" : "TwoLetterISOLanguageName"
|
|
} ]}]
|
|
|
|
- returns: RequestBuilder<[CultureDto]>
|
|
*/
|
|
open class func getCulturesWithRequestBuilder() -> RequestBuilder<[CultureDto]> {
|
|
let path = "/Localization/Cultures"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<[CultureDto]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Gets localization options.
|
|
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getLocalizationOptions(completion: @escaping ((_ data: [LocalizationOption]?,_ error: Error?) -> Void)) {
|
|
getLocalizationOptionsWithRequestBuilder().execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets localization options.
|
|
- GET /Localization/Options
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- examples: [{contentType=application/json, example=[ {
|
|
"Value" : "Value",
|
|
"Name" : "Name"
|
|
}, {
|
|
"Value" : "Value",
|
|
"Name" : "Name"
|
|
} ]}]
|
|
|
|
- returns: RequestBuilder<[LocalizationOption]>
|
|
*/
|
|
open class func getLocalizationOptionsWithRequestBuilder() -> RequestBuilder<[LocalizationOption]> {
|
|
let path = "/Localization/Options"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<[LocalizationOption]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Gets known parental ratings.
|
|
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getParentalRatings(completion: @escaping ((_ data: [ParentalRating]?,_ error: Error?) -> Void)) {
|
|
getParentalRatingsWithRequestBuilder().execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets known parental ratings.
|
|
- GET /Localization/ParentalRatings
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- examples: [{contentType=application/json, example=[ {
|
|
"Value" : 0,
|
|
"Name" : "Name"
|
|
}, {
|
|
"Value" : 0,
|
|
"Name" : "Name"
|
|
} ]}]
|
|
|
|
- returns: RequestBuilder<[ParentalRating]>
|
|
*/
|
|
open class func getParentalRatingsWithRequestBuilder() -> RequestBuilder<[ParentalRating]> {
|
|
let path = "/Localization/ParentalRatings"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<[ParentalRating]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
}
|