jellyflood/JellyfinPlayer/Swaggers/APIs/DashboardAPI.swift

107 lines
3.9 KiB
Swift

//
// DashboardAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class DashboardAPI {
/**
Gets the configuration pages.
- parameter enableInMainMenu: (query) Whether to enable in the main menu. (optional)
- parameter pageType: (query) The Jellyfin.Api.Models.ConfigurationPageInfo. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getConfigurationPages(enableInMainMenu: Bool? = nil, pageType: PageType? = nil, completion: @escaping ((_ data: [ConfigurationPageInfo]?,_ error: Error?) -> Void)) {
getConfigurationPagesWithRequestBuilder(enableInMainMenu: enableInMainMenu, pageType: pageType).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the configuration pages.
- GET /web/ConfigurationPages
-
- examples: [{contentType=application/json, example=[ {
"MenuIcon" : "MenuIcon",
"EnableInMainMenu" : true,
"ConfigurationPageType" : "",
"DisplayName" : "DisplayName",
"MenuSection" : "MenuSection",
"PluginId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name"
}, {
"MenuIcon" : "MenuIcon",
"EnableInMainMenu" : true,
"ConfigurationPageType" : "",
"DisplayName" : "DisplayName",
"MenuSection" : "MenuSection",
"PluginId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name"
} ]}]
- parameter enableInMainMenu: (query) Whether to enable in the main menu. (optional)
- parameter pageType: (query) The Jellyfin.Api.Models.ConfigurationPageInfo. (optional)
- returns: RequestBuilder<[ConfigurationPageInfo]>
*/
open class func getConfigurationPagesWithRequestBuilder(enableInMainMenu: Bool? = nil, pageType: PageType? = nil) -> RequestBuilder<[ConfigurationPageInfo]> {
let path = "/web/ConfigurationPages"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"enableInMainMenu": enableInMainMenu,
"pageType": pageType
])
let requestBuilder: RequestBuilder<[ConfigurationPageInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a dashboard configuration page.
- parameter name: (query) The name of the page. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDashboardConfigurationPage(name: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getDashboardConfigurationPageWithRequestBuilder(name: name).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a dashboard configuration page.
- GET /web/ConfigurationPage
-
- examples: [{contentType=application/json, example=""}]
- parameter name: (query) The name of the page. (optional)
- returns: RequestBuilder<Data>
*/
open class func getDashboardConfigurationPageWithRequestBuilder(name: String? = nil) -> RequestBuilder<Data> {
let path = "/web/ConfigurationPage"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"name": name
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}