287 lines
9.8 KiB
Swift
287 lines
9.8 KiB
Swift
//
|
|
// StartupAPI.swift
|
|
//
|
|
// Generated by swagger-codegen
|
|
// https://github.com/swagger-api/swagger-codegen
|
|
//
|
|
|
|
import Foundation
|
|
import Alamofire
|
|
|
|
|
|
open class StartupAPI {
|
|
/**
|
|
Completes the startup wizard.
|
|
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func completeWizard(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
|
completeWizardWithRequestBuilder().execute { (response, error) -> Void in
|
|
if error == nil {
|
|
completion((), error)
|
|
} else {
|
|
completion(nil, error)
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Completes the startup wizard.
|
|
- POST /Startup/Complete
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
|
|
- returns: RequestBuilder<Void>
|
|
*/
|
|
open class func completeWizardWithRequestBuilder() -> RequestBuilder<Void> {
|
|
let path = "/Startup/Complete"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
|
|
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Gets the first user.
|
|
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getFirstUser(completion: @escaping ((_ data: StartupUserDto?,_ error: Error?) -> Void)) {
|
|
getFirstUserWithRequestBuilder().execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets the first user.
|
|
- GET /Startup/User
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- examples: [{contentType=application/json, example={
|
|
"Name" : "Name",
|
|
"Password" : "Password"
|
|
}}]
|
|
|
|
- returns: RequestBuilder<StartupUserDto>
|
|
*/
|
|
open class func getFirstUserWithRequestBuilder() -> RequestBuilder<StartupUserDto> {
|
|
let path = "/Startup/User"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<StartupUserDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Gets the first user.
|
|
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getFirstUser2(completion: @escaping ((_ data: StartupUserDto?,_ error: Error?) -> Void)) {
|
|
getFirstUser2WithRequestBuilder().execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets the first user.
|
|
- GET /Startup/FirstUser
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- examples: [{contentType=application/json, example={
|
|
"Name" : "Name",
|
|
"Password" : "Password"
|
|
}}]
|
|
|
|
- returns: RequestBuilder<StartupUserDto>
|
|
*/
|
|
open class func getFirstUser2WithRequestBuilder() -> RequestBuilder<StartupUserDto> {
|
|
let path = "/Startup/FirstUser"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<StartupUserDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Gets the initial startup wizard configuration.
|
|
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getStartupConfiguration(completion: @escaping ((_ data: StartupConfigurationDto?,_ error: Error?) -> Void)) {
|
|
getStartupConfigurationWithRequestBuilder().execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets the initial startup wizard configuration.
|
|
- GET /Startup/Configuration
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- examples: [{contentType=application/json, example={
|
|
"PreferredMetadataLanguage" : "PreferredMetadataLanguage",
|
|
"UICulture" : "UICulture",
|
|
"MetadataCountryCode" : "MetadataCountryCode"
|
|
}}]
|
|
|
|
- returns: RequestBuilder<StartupConfigurationDto>
|
|
*/
|
|
open class func getStartupConfigurationWithRequestBuilder() -> RequestBuilder<StartupConfigurationDto> {
|
|
let path = "/Startup/Configuration"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<StartupConfigurationDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Sets remote access and UPnP.
|
|
|
|
- parameter body: (body) The startup remote access dto.
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func setRemoteAccess(body: StartupRemoteAccessBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
|
setRemoteAccessWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
|
if error == nil {
|
|
completion((), error)
|
|
} else {
|
|
completion(nil, error)
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Sets remote access and UPnP.
|
|
- POST /Startup/RemoteAccess
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- parameter body: (body) The startup remote access dto.
|
|
|
|
- returns: RequestBuilder<Void>
|
|
*/
|
|
open class func setRemoteAccessWithRequestBuilder(body: StartupRemoteAccessBody) -> RequestBuilder<Void> {
|
|
let path = "/Startup/RemoteAccess"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
|
|
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
|
}
|
|
/**
|
|
Sets the initial startup wizard configuration.
|
|
|
|
- parameter body: (body) The updated startup configuration.
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func updateInitialConfiguration(body: StartupConfigurationBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
|
updateInitialConfigurationWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
|
if error == nil {
|
|
completion((), error)
|
|
} else {
|
|
completion(nil, error)
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Sets the initial startup wizard configuration.
|
|
- POST /Startup/Configuration
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- parameter body: (body) The updated startup configuration.
|
|
|
|
- returns: RequestBuilder<Void>
|
|
*/
|
|
open class func updateInitialConfigurationWithRequestBuilder(body: StartupConfigurationBody) -> RequestBuilder<Void> {
|
|
let path = "/Startup/Configuration"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
|
|
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
|
}
|
|
/**
|
|
Sets the user name and password.
|
|
|
|
- parameter body: (body) The DTO containing username and password. (optional)
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func updateStartupUser(body: StartupUserBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
|
updateStartupUserWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
|
if error == nil {
|
|
completion((), error)
|
|
} else {
|
|
completion(nil, error)
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Sets the user name and password.
|
|
- POST /Startup/User
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- parameter body: (body) The DTO containing username and password. (optional)
|
|
|
|
- returns: RequestBuilder<Void>
|
|
*/
|
|
open class func updateStartupUserWithRequestBuilder(body: StartupUserBody? = nil) -> RequestBuilder<Void> {
|
|
let path = "/Startup/User"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
|
|
let url = URLComponents(string: URLString)
|
|
|
|
|
|
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
|
|
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
|
}
|
|
}
|