padding changes

This commit is contained in:
Aiden Vigue 2021-06-03 11:52:14 -04:00
parent 0256aa5559
commit 16569ca663
No known key found for this signature in database
GPG Key ID: E7570472648F4544
803 changed files with 28 additions and 142434 deletions

View File

@ -1,5 +1,5 @@
//
// SearchAPI.swift
// JellyfinAPI.swift
// JellyfinPlayer
//
// Created by PangMo5 on 2021/05/27.

View File

@ -65,7 +65,7 @@ struct ContentView: View {
if _viewDidLoad.wrappedValue {
return
}
_viewDidLoad.wrappedValue = true
ImageCache.shared.costLimit = 125 * 1024 * 1024 // 125MB memory

View File

@ -203,7 +203,7 @@ struct SeasonItemView: View {
}
.contentMode(.aspectFill)
.opacity(0.4)
.shadow(radius: 5)
.blur(radius: 2.0)
}
}
@ -223,11 +223,6 @@ struct SeasonItemView: View {
.frame(width: 120, height: 180)
.cornerRadius(10)
VStack(alignment: .leading) {
// Text(fullItem.SeriesName ?? "")
// .font(.largeTitle)
// .fontWeight(.bold)
// .foregroundColor(.primary)
// .padding(.bottom, 8)
Text(fullItem.Name).font(.headline)
.fontWeight(.semibold)
.foregroundColor(.primary)
@ -239,9 +234,9 @@ struct SeasonItemView: View {
.foregroundColor(.secondary)
.lineLimit(1)
}
}
}.offset(y: -32)
}.padding(.horizontal, 16)
.padding(.bottom, -22)
.offset(y: 22)
}
@ViewBuilder
@ -252,8 +247,6 @@ struct SeasonItemView: View {
overlayAlignment: .bottomLeading,
headerHeight: UIScreen.main.bounds.width * 0.5625) {
LazyVStack(alignment: .leading) {
Spacer()
.frame(height: 22)
if fullItem.Tagline != "" {
Text(fullItem.Tagline).font(.body).italic().padding(.top, 7)
.fixedSize(horizontal: false, vertical: true).padding(.leading, 16)
@ -289,6 +282,11 @@ struct SeasonItemView: View {
.padding(0), alignment: .bottomLeading)
VStack(alignment: .leading) {
HStack {
Text("S\(String(episode.ParentIndexNumber ?? 0)):E\(String(episode.IndexNumber ?? 0))").font(.subheadline)
.fontWeight(.medium)
.foregroundColor(.secondary)
.lineLimit(1)
Spacer()
Text(episode.Name).font(.subheadline)
.fontWeight(.semibold)
.foregroundColor(.primary)
@ -329,8 +327,8 @@ struct SeasonItemView: View {
.foregroundColor(Color.secondary)
}.padding(.leading, 16).padding(.trailing, 16)
}
Spacer().frame(height: 3)
}
Spacer().frame(height: 6)
}.padding(.leading, 2)
}
} else {
GeometryReader { geometry in
@ -356,6 +354,7 @@ struct SeasonItemView: View {
.blur(radius: 2)
HStack {
VStack(alignment: .leading) {
Spacer().frame(height: 16)
LazyImage(source: URL(string: "\(globalData.server?.baseURI ?? "")/Items/\(fullItem.Id)/Images/Primary?maxWidth=250&quality=90&tag=\(fullItem.Poster)"))
.placeholderAndFailure {
Image(uiImage: UIImage(blurHash: fullItem
@ -378,6 +377,7 @@ struct SeasonItemView: View {
Spacer()
}
ScrollView {
Spacer().frame(height: 16)
LazyVStack(alignment: .leading) {
if fullItem.Tagline != "" {
Text(fullItem.Tagline).font(.body).italic().padding(.top, 3)
@ -416,12 +416,7 @@ struct SeasonItemView: View {
.padding(0), alignment: .bottomLeading)
VStack(alignment: .leading) {
HStack {
Text(episode.Name).font(.subheadline)
.fontWeight(.semibold)
.foregroundColor(.primary)
.fixedSize(horizontal: false, vertical: true)
.lineLimit(1)
Text(episode.Runtime).font(.subheadline)
Text("S\(String(episode.ParentIndexNumber ?? 0)):E\(String(episode.IndexNumber ?? 0))").font(.subheadline)
.fontWeight(.medium)
.foregroundColor(.secondary)
.lineLimit(1)
@ -434,17 +429,17 @@ struct SeasonItemView: View {
.overlay(RoundedRectangle(cornerRadius: 2)
.stroke(Color.secondary, lineWidth: 1))
}
if episode.CommunityRating != "" {
HStack {
Image(systemName: "star").foregroundColor(.secondary)
Text(episode.CommunityRating).font(.subheadline)
.fontWeight(.semibold)
.foregroundColor(.secondary)
.lineLimit(1)
.offset(x: -6, y: 0)
}
}
Spacer()
Text(episode.Name).font(.subheadline)
.fontWeight(.semibold)
.foregroundColor(.primary)
.fixedSize(horizontal: false, vertical: true)
.lineLimit(1)
Spacer()
Text(episode.Runtime).font(.subheadline)
.fontWeight(.medium)
.foregroundColor(.secondary)
.lineLimit(1)
}
Spacer()
Text(episode.Overview).font(.footnote).foregroundColor(.secondary)
@ -475,10 +470,10 @@ struct SeasonItemView: View {
.foregroundColor(Color.secondary)
}.padding(.leading, 16).padding(.trailing, 16)
}
Spacer().frame(height: 125)
Spacer().frame(height: 95)
}.frame(maxHeight: .infinity)
}.padding(.trailing, UIDevice.current.userInterfaceIdiom == .pad ? 16 : 55)
}.padding(.top, 16).padding(.leading, UIDevice.current.userInterfaceIdiom == .pad ? 16 : 0)
}.padding(.leading, UIDevice.current.userInterfaceIdiom == .pad ? 16 : 0)
}
}
}

View File

@ -92,6 +92,7 @@ struct SeriesItemView: View {
var body: some View {
LoadingView(isShowing: $isLoading) {
ScrollView(.vertical) {
Spacer().frame(height: 16)
LazyVGrid(columns: tracks) {
ForEach(items, id: \.Id) { item in
NavigationLink(destination: ItemView(item: item )) {

View File

@ -1,65 +0,0 @@
// APIHelper.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public struct APIHelper {
public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? {
let destination = source.reduce(into: [String: Any]()) { (result, item) in
if let value = item.value {
result[item.key] = value
}
}
if destination.isEmpty {
return nil
}
return destination
}
public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] {
return source.reduce(into: [String: String]()) { (result, item) in
if let collection = item.value as? Array<Any?> {
result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",")
} else if let value: Any = item.value {
result[item.key] = "\(value)"
}
}
}
public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? {
guard let source = source else {
return nil
}
return source.reduce(into: [String: Any](), { (result, item) in
switch item.value {
case let x as Bool:
result[item.key] = x.description
default:
result[item.key] = item.value
}
})
}
public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? {
let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in
if let collection = item.value as? Array<Any?> {
let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
result.append(URLQueryItem(name: item.key, value: value))
} else if let value = item.value {
result.append(URLQueryItem(name: item.key, value: "\(value)"))
}
}
if destination.isEmpty {
return nil
}
return destination
}
}

View File

@ -1,61 +0,0 @@
// APIs.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
open class SwaggerClientAPI {
public static var basePath = "http://localhost"
public static var credential: URLCredential?
public static var customHeaders: [String:String] = [:]
public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
}
open class RequestBuilder<T> {
var credential: URLCredential?
var headers: [String:String]
public let parameters: [String:Any]?
public let isBody: Bool
public let method: String
public let URLString: String
/// Optional block to obtain a reference to the request's progress instance when available.
public var onProgressReady: ((Progress) -> ())?
required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) {
self.method = method
self.URLString = URLString
self.parameters = parameters
self.isBody = isBody
self.headers = headers
addHeaders(SwaggerClientAPI.customHeaders)
}
open func addHeaders(_ aHeaders:[String:String]) {
for (header, value) in aHeaders {
headers[header] = value
}
}
open func execute(_ completion: @escaping (_ response: Response<T>?, _ error: Error?) -> Void) { }
public func addHeader(name: String, value: String) -> Self {
if !value.isEmpty {
headers[name] = value
}
return self
}
open func addCredential() -> Self {
self.credential = SwaggerClientAPI.credential
return self
}
}
public protocol RequestBuilderFactory {
func getNonDecodableBuilder<T>() -> RequestBuilder<T>.Type
func getBuilder<T:Decodable>() -> RequestBuilder<T>.Type
}

View File

@ -1,88 +0,0 @@
//
// ActivityLogAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class ActivityLogAPI {
/**
Gets activity log entries.
- parameter startIndex: (query) Optional. The record index to start at. All items with a lower index will be dropped from the results. (optional)
- parameter limit: (query) Optional. The maximum number of records to return. (optional)
- parameter minDate: (query) Optional. The minimum date. Format &#x3D; ISO. (optional)
- parameter hasUserId: (query) Optional. Filter log entries if it has user id, or not. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getLogEntries(startIndex: Int? = nil, limit: Int? = nil, minDate: Date? = nil, hasUserId: Bool? = nil, completion: @escaping ((_ data: ActivityLogEntryQueryResult?,_ error: Error?) -> Void)) {
getLogEntriesWithRequestBuilder(startIndex: startIndex, limit: limit, minDate: minDate, hasUserId: hasUserId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets activity log entries.
- GET /System/ActivityLog/Entries
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"TotalRecordCount" : 6,
"StartIndex" : 1,
"Items" : [ {
"Type" : "Type",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Overview" : "Overview",
"UserPrimaryImageTag" : "UserPrimaryImageTag",
"Severity" : "",
"Id" : 0,
"ShortOverview" : "ShortOverview",
"ItemId" : "ItemId",
"Date" : "2000-01-23T04:56:07.000+00:00",
"Name" : "Name"
}, {
"Type" : "Type",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Overview" : "Overview",
"UserPrimaryImageTag" : "UserPrimaryImageTag",
"Severity" : "",
"Id" : 0,
"ShortOverview" : "ShortOverview",
"ItemId" : "ItemId",
"Date" : "2000-01-23T04:56:07.000+00:00",
"Name" : "Name"
} ]
}}]
- parameter startIndex: (query) Optional. The record index to start at. All items with a lower index will be dropped from the results. (optional)
- parameter limit: (query) Optional. The maximum number of records to return. (optional)
- parameter minDate: (query) Optional. The minimum date. Format &#x3D; ISO. (optional)
- parameter hasUserId: (query) Optional. Filter log entries if it has user id, or not. (optional)
- returns: RequestBuilder<ActivityLogEntryQueryResult>
*/
open class func getLogEntriesWithRequestBuilder(startIndex: Int? = nil, limit: Int? = nil, minDate: Date? = nil, hasUserId: Bool? = nil) -> RequestBuilder<ActivityLogEntryQueryResult> {
let path = "/System/ActivityLog/Entries"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"startIndex": startIndex?.encodeToJSON(),
"limit": limit?.encodeToJSON(),
"minDate": minDate?.encodeToJSON(),
"hasUserId": hasUserId
])
let requestBuilder: RequestBuilder<ActivityLogEntryQueryResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

View File

@ -1,164 +0,0 @@
//
// ApiKeyAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class ApiKeyAPI {
/**
Create a new api key.
- parameter app: (query) Name of the app using the authentication key.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func createKey(app: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
createKeyWithRequestBuilder(app: app).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Create a new api key.
- POST /Auth/Keys
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter app: (query) Name of the app using the authentication key.
- returns: RequestBuilder<Void>
*/
open class func createKeyWithRequestBuilder(app: String) -> RequestBuilder<Void> {
let path = "/Auth/Keys"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"app": app
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get all keys.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getKeys(completion: @escaping ((_ data: AuthenticationInfoQueryResult?,_ error: Error?) -> Void)) {
getKeysWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get all keys.
- GET /Auth/Keys
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"TotalRecordCount" : 6,
"StartIndex" : 1,
"Items" : [ {
"AppVersion" : "AppVersion",
"UserName" : "UserName",
"AccessToken" : "AccessToken",
"DeviceId" : "DeviceId",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"IsActive" : true,
"DateRevoked" : "2000-01-23T04:56:07.000+00:00",
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"Id" : 0,
"DateLastActivity" : "2000-01-23T04:56:07.000+00:00",
"AppName" : "AppName",
"DeviceName" : "DeviceName"
}, {
"AppVersion" : "AppVersion",
"UserName" : "UserName",
"AccessToken" : "AccessToken",
"DeviceId" : "DeviceId",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"IsActive" : true,
"DateRevoked" : "2000-01-23T04:56:07.000+00:00",
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"Id" : 0,
"DateLastActivity" : "2000-01-23T04:56:07.000+00:00",
"AppName" : "AppName",
"DeviceName" : "DeviceName"
} ]
}}]
- returns: RequestBuilder<AuthenticationInfoQueryResult>
*/
open class func getKeysWithRequestBuilder() -> RequestBuilder<AuthenticationInfoQueryResult> {
let path = "/Auth/Keys"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<AuthenticationInfoQueryResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Remove an api key.
- parameter key: (path) The access token to delete.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func revokeKey(key: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
revokeKeyWithRequestBuilder(key: key).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Remove an api key.
- DELETE /Auth/Keys/{key}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter key: (path) The access token to delete.
- returns: RequestBuilder<Void>
*/
open class func revokeKeyWithRequestBuilder(key: String) -> RequestBuilder<Void> {
var path = "/Auth/Keys/{key}"
let keyPreEscape = "\(key)"
let keyPostEscape = keyPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{key}", with: keyPostEscape, options: .literal, range: nil)
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: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,749 +0,0 @@
//
// AudioAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class AudioAPI {
/**
Gets an audio stream.
- parameter itemId: (path) The item id.
- parameter container: (query) The audio container. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getAudioStream(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getAudioStreamWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets an audio stream.
- GET /Audio/{itemId}/stream
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (query) The audio container. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- returns: RequestBuilder<Data>
*/
open class func getAudioStreamWithRequestBuilder(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
var path = "/Audio/{itemId}/stream"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"container": container,
"static": _static,
"params": params,
"tag": tag,
"deviceProfileId": deviceProfileId,
"playSessionId": playSessionId,
"segmentContainer": segmentContainer,
"segmentLength": segmentLength?.encodeToJSON(),
"minSegments": minSegments?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"audioCodec": audioCodec,
"enableAutoStreamCopy": enableAutoStreamCopy,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"audioSampleRate": audioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"audioChannels": audioChannels?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"profile": profile,
"level": level,
"framerate": framerate,
"maxFramerate": maxFramerate,
"copyTimestamps": copyTimestamps,
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"width": width?.encodeToJSON(),
"height": height?.encodeToJSON(),
"videoBitRate": videoBitRate?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"subtitleMethod": subtitleMethod,
"maxRefFrames": maxRefFrames?.encodeToJSON(),
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
"requireAvc": requireAvc,
"deInterlace": deInterlace,
"requireNonAnamorphic": requireNonAnamorphic,
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
"liveStreamId": liveStreamId,
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
"videoCodec": videoCodec,
"subtitleCodec": subtitleCodec,
"transcodeReasons": transcodeReasons,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
"context": context,
"streamOptions": streamOptions
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets an audio stream.
- parameter itemId: (path) The item id.
- parameter container: (path) The audio container.
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment lenght. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamporphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getAudioStreamByContainer(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod2? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context2? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getAudioStreamByContainerWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets an audio stream.
- GET /Audio/{itemId}/stream.{container}
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (path) The audio container.
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment lenght. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamporphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- returns: RequestBuilder<Data>
*/
open class func getAudioStreamByContainerWithRequestBuilder(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod2? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context2? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
var path = "/Audio/{itemId}/stream.{container}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let containerPreEscape = "\(container)"
let containerPostEscape = containerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{container}", with: containerPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"static": _static,
"params": params,
"tag": tag,
"deviceProfileId": deviceProfileId,
"playSessionId": playSessionId,
"segmentContainer": segmentContainer,
"segmentLength": segmentLength?.encodeToJSON(),
"minSegments": minSegments?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"audioCodec": audioCodec,
"enableAutoStreamCopy": enableAutoStreamCopy,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"audioSampleRate": audioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"audioChannels": audioChannels?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"profile": profile,
"level": level,
"framerate": framerate,
"maxFramerate": maxFramerate,
"copyTimestamps": copyTimestamps,
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"width": width?.encodeToJSON(),
"height": height?.encodeToJSON(),
"videoBitRate": videoBitRate?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"subtitleMethod": subtitleMethod,
"maxRefFrames": maxRefFrames?.encodeToJSON(),
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
"requireAvc": requireAvc,
"deInterlace": deInterlace,
"requireNonAnamorphic": requireNonAnamorphic,
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
"liveStreamId": liveStreamId,
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
"videoCodec": videoCodec,
"subtitleCodec": subtitleCodec,
"transcodeReasons": transcodeReasons,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
"context": context,
"streamOptions": streamOptions
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets an audio stream.
- parameter itemId: (path) The item id.
- parameter container: (query) The audio container. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func headAudioStream(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod1? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context1? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
headAudioStreamWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets an audio stream.
- HEAD /Audio/{itemId}/stream
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (query) The audio container. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- returns: RequestBuilder<Data>
*/
open class func headAudioStreamWithRequestBuilder(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod1? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context1? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
var path = "/Audio/{itemId}/stream"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"container": container,
"static": _static,
"params": params,
"tag": tag,
"deviceProfileId": deviceProfileId,
"playSessionId": playSessionId,
"segmentContainer": segmentContainer,
"segmentLength": segmentLength?.encodeToJSON(),
"minSegments": minSegments?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"audioCodec": audioCodec,
"enableAutoStreamCopy": enableAutoStreamCopy,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"audioSampleRate": audioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"audioChannels": audioChannels?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"profile": profile,
"level": level,
"framerate": framerate,
"maxFramerate": maxFramerate,
"copyTimestamps": copyTimestamps,
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"width": width?.encodeToJSON(),
"height": height?.encodeToJSON(),
"videoBitRate": videoBitRate?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"subtitleMethod": subtitleMethod,
"maxRefFrames": maxRefFrames?.encodeToJSON(),
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
"requireAvc": requireAvc,
"deInterlace": deInterlace,
"requireNonAnamorphic": requireNonAnamorphic,
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
"liveStreamId": liveStreamId,
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
"videoCodec": videoCodec,
"subtitleCodec": subtitleCodec,
"transcodeReasons": transcodeReasons,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
"context": context,
"streamOptions": streamOptions
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets an audio stream.
- parameter itemId: (path) The item id.
- parameter container: (path) The audio container.
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment lenght. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamporphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func headAudioStreamByContainer(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod3? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context3? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
headAudioStreamByContainerWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets an audio stream.
- HEAD /Audio/{itemId}/stream.{container}
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (path) The audio container.
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment lenght. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamporphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- returns: RequestBuilder<Data>
*/
open class func headAudioStreamByContainerWithRequestBuilder(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod3? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context3? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
var path = "/Audio/{itemId}/stream.{container}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let containerPreEscape = "\(container)"
let containerPostEscape = containerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{container}", with: containerPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"static": _static,
"params": params,
"tag": tag,
"deviceProfileId": deviceProfileId,
"playSessionId": playSessionId,
"segmentContainer": segmentContainer,
"segmentLength": segmentLength?.encodeToJSON(),
"minSegments": minSegments?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"audioCodec": audioCodec,
"enableAutoStreamCopy": enableAutoStreamCopy,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"audioSampleRate": audioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"audioChannels": audioChannels?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"profile": profile,
"level": level,
"framerate": framerate,
"maxFramerate": maxFramerate,
"copyTimestamps": copyTimestamps,
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"width": width?.encodeToJSON(),
"height": height?.encodeToJSON(),
"videoBitRate": videoBitRate?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"subtitleMethod": subtitleMethod,
"maxRefFrames": maxRefFrames?.encodeToJSON(),
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
"requireAvc": requireAvc,
"deInterlace": deInterlace,
"requireNonAnamorphic": requireNonAnamorphic,
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
"liveStreamId": liveStreamId,
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
"videoCodec": videoCodec,
"subtitleCodec": subtitleCodec,
"transcodeReasons": transcodeReasons,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
"context": context,
"streamOptions": streamOptions
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

View File

@ -1,112 +0,0 @@
//
// BrandingAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class BrandingAPI {
/**
Gets branding css.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getBrandingCss(completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) {
getBrandingCssWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets branding css.
- GET /Branding/Css
-
- examples: [{contentType=application/json, example=""}]
- returns: RequestBuilder<String>
*/
open class func getBrandingCssWithRequestBuilder() -> RequestBuilder<String> {
let path = "/Branding/Css"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<String>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets branding css.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getBrandingCss2(completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) {
getBrandingCss2WithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets branding css.
- GET /Branding/Css.css
-
- examples: [{contentType=application/json, example=""}]
- returns: RequestBuilder<String>
*/
open class func getBrandingCss2WithRequestBuilder() -> RequestBuilder<String> {
let path = "/Branding/Css.css"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<String>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets branding configuration.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getBrandingOptions(completion: @escaping ((_ data: BrandingOptions?,_ error: Error?) -> Void)) {
getBrandingOptionsWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets branding configuration.
- GET /Branding/Configuration
-
- examples: [{contentType=application/json, example={
"CustomCss" : "CustomCss",
"LoginDisclaimer" : "LoginDisclaimer"
}}]
- returns: RequestBuilder<BrandingOptions>
*/
open class func getBrandingOptionsWithRequestBuilder() -> RequestBuilder<BrandingOptions> {
let path = "/Branding/Configuration"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<BrandingOptions>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,160 +0,0 @@
//
// CollectionAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class CollectionAPI {
/**
Adds items to a collection.
- parameter collectionId: (path) The collection id.
- parameter ids: (query) Item ids, comma delimited.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func addToCollection(collectionId: UUID, ids: [UUID], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
addToCollectionWithRequestBuilder(collectionId: collectionId, ids: ids).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Adds items to a collection.
- POST /Collections/{collectionId}/Items
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter collectionId: (path) The collection id.
- parameter ids: (query) Item ids, comma delimited.
- returns: RequestBuilder<Void>
*/
open class func addToCollectionWithRequestBuilder(collectionId: UUID, ids: [UUID]) -> RequestBuilder<Void> {
var path = "/Collections/{collectionId}/Items"
let collectionIdPreEscape = "\(collectionId)"
let collectionIdPostEscape = collectionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{collectionId}", with: collectionIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"ids": ids
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Creates a new collection.
- parameter name: (query) The name of the collection. (optional)
- parameter ids: (query) Item Ids to add to the collection. (optional)
- parameter parentId: (query) Optional. Create the collection within a specific folder. (optional)
- parameter isLocked: (query) Whether or not to lock the new collection. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func createCollection(name: String? = nil, ids: [String]? = nil, parentId: UUID? = nil, isLocked: Bool? = nil, completion: @escaping ((_ data: CollectionCreationResult?,_ error: Error?) -> Void)) {
createCollectionWithRequestBuilder(name: name, ids: ids, parentId: parentId, isLocked: isLocked).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Creates a new collection.
- POST /Collections
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}}]
- parameter name: (query) The name of the collection. (optional)
- parameter ids: (query) Item Ids to add to the collection. (optional)
- parameter parentId: (query) Optional. Create the collection within a specific folder. (optional)
- parameter isLocked: (query) Whether or not to lock the new collection. (optional, default to false)
- returns: RequestBuilder<CollectionCreationResult>
*/
open class func createCollectionWithRequestBuilder(name: String? = nil, ids: [String]? = nil, parentId: UUID? = nil, isLocked: Bool? = nil) -> RequestBuilder<CollectionCreationResult> {
let path = "/Collections"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"name": name,
"ids": ids,
"parentId": parentId,
"isLocked": isLocked
])
let requestBuilder: RequestBuilder<CollectionCreationResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Removes items from a collection.
- parameter collectionId: (path) The collection id.
- parameter ids: (query) Item ids, comma delimited.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func removeFromCollection(collectionId: UUID, ids: [UUID], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
removeFromCollectionWithRequestBuilder(collectionId: collectionId, ids: ids).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Removes items from a collection.
- DELETE /Collections/{collectionId}/Items
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter collectionId: (path) The collection id.
- parameter ids: (query) Item ids, comma delimited.
- returns: RequestBuilder<Void>
*/
open class func removeFromCollectionWithRequestBuilder(collectionId: UUID, ids: [UUID]) -> RequestBuilder<Void> {
var path = "/Collections/{collectionId}/Items"
let collectionIdPreEscape = "\(collectionId)"
let collectionIdPostEscape = collectionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{collectionId}", with: collectionIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"ids": ids
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

View File

@ -1,374 +0,0 @@
//
// ConfigurationAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class ConfigurationAPI {
/**
Gets application configuration.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getConfiguration(completion: @escaping ((_ data: ServerConfiguration?,_ error: Error?) -> Void)) {
getConfigurationWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets application configuration.
- GET /System/Configuration
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"RemoteIPFilter" : [ "RemoteIPFilter", "RemoteIPFilter" ],
"EnableSlowResponseWarning" : true,
"CorsHosts" : [ "CorsHosts", "CorsHosts" ],
"IsStartupWizardCompleted" : true,
"IsPortAuthorized" : true,
"UICulture" : "UICulture",
"CodecsUsed" : [ "CodecsUsed", "CodecsUsed" ],
"AutoDiscovery" : true,
"ImageSavingConvention" : "",
"LocalNetworkAddresses" : [ "LocalNetworkAddresses", "LocalNetworkAddresses" ],
"EnableUPnP" : true,
"EnableMultiSocketBinding" : true,
"EnableIPV4" : true,
"MetadataCountryCode" : "MetadataCountryCode",
"SaveMetadataHidden" : true,
"EnableIPV6" : true,
"UDPSendDelay" : 5,
"EnableNormalizedItemByNameIds" : true,
"MetadataNetworkPath" : "MetadataNetworkPath",
"LocalNetworkSubnets" : [ "LocalNetworkSubnets", "LocalNetworkSubnets" ],
"EnableNewOmdbSupport" : true,
"ActivityLogRetentionDays" : 1,
"PublishedServerUriBySubnet" : [ "PublishedServerUriBySubnet", "PublishedServerUriBySubnet" ],
"SortRemoveCharacters" : [ "SortRemoveCharacters", "SortRemoveCharacters" ],
"DisableLiveTvChannelUserDataName" : true,
"MaxResumePct" : 2,
"HttpServerPortNumber" : 7,
"MinResumeDurationSeconds" : 4,
"SlowResponseThresholdMs" : 7,
"RequireHttps" : true,
"LogFileRetentionDays" : 0,
"LibraryScanFanoutConcurrency" : 4,
"HDHomerunPortRange" : "HDHomerunPortRange",
"SkipDeserializationForBasicTypes" : true,
"MetadataOptions" : [ {
"DisabledImageFetchers" : [ "DisabledImageFetchers", "DisabledImageFetchers" ],
"DisabledMetadataSavers" : [ "DisabledMetadataSavers", "DisabledMetadataSavers" ],
"MetadataFetcherOrder" : [ "MetadataFetcherOrder", "MetadataFetcherOrder" ],
"ItemType" : "ItemType",
"DisabledMetadataFetchers" : [ "DisabledMetadataFetchers", "DisabledMetadataFetchers" ],
"ImageFetcherOrder" : [ "ImageFetcherOrder", "ImageFetcherOrder" ],
"LocalMetadataReaderOrder" : [ "LocalMetadataReaderOrder", "LocalMetadataReaderOrder" ]
}, {
"DisabledImageFetchers" : [ "DisabledImageFetchers", "DisabledImageFetchers" ],
"DisabledMetadataSavers" : [ "DisabledMetadataSavers", "DisabledMetadataSavers" ],
"MetadataFetcherOrder" : [ "MetadataFetcherOrder", "MetadataFetcherOrder" ],
"ItemType" : "ItemType",
"DisabledMetadataFetchers" : [ "DisabledMetadataFetchers", "DisabledMetadataFetchers" ],
"ImageFetcherOrder" : [ "ImageFetcherOrder", "ImageFetcherOrder" ],
"LocalMetadataReaderOrder" : [ "LocalMetadataReaderOrder", "LocalMetadataReaderOrder" ]
} ],
"HttpsPortNumber" : 9,
"MinResumePct" : 3,
"SSDPTracingFilter" : "SSDPTracingFilter",
"CertificatePassword" : "CertificatePassword",
"RemoteClientBitrateLimit" : 1,
"ImageExtractionTimeoutMs" : 6,
"EnableExternalContentInSuggestions" : true,
"RemoveOldPlugins" : true,
"UPnPCreateHttpPortMap" : true,
"LibraryMonitorDelay" : 1,
"EnableCaseSensitiveItemIds" : true,
"SortReplaceCharacters" : [ "SortReplaceCharacters", "SortReplaceCharacters" ],
"LibraryMetadataRefreshConcurrency" : 5,
"UDPPortRange" : "UDPPortRange",
"PreviousVersionStr" : "PreviousVersionStr",
"EnableSSDPTracing" : true,
"AutoDiscoveryTracing" : true,
"PathSubstitutions" : [ {
"From" : "From",
"To" : "To"
}, {
"From" : "From",
"To" : "To"
} ],
"CachePath" : "CachePath",
"MaxAudiobookResume" : 1,
"EnableFolderView" : true,
"BaseUrl" : "BaseUrl",
"UninstalledPlugins" : [ "UninstalledPlugins", "UninstalledPlugins" ],
"DisplaySpecialsWithinSeasons" : true,
"EnableDashboardResponseCaching" : true,
"EnableRemoteAccess" : true,
"MinAudiobookResume" : 7,
"KnownProxies" : [ "KnownProxies", "KnownProxies" ],
"CertificatePath" : "CertificatePath",
"PluginRepositories" : [ {
"Enabled" : true,
"Url" : "Url",
"Name" : "Name"
}, {
"Enabled" : true,
"Url" : "Url",
"Name" : "Name"
} ],
"IgnoreVirtualInterfaces" : true,
"ContentTypes" : [ {
"Value" : "Value",
"Name" : "Name"
}, {
"Value" : "Value",
"Name" : "Name"
} ],
"PreviousVersion" : "",
"GatewayMonitorPeriod" : 5,
"MetadataPath" : "MetadataPath",
"IsRemoteIPFilterBlacklist" : true,
"UDPSendCount" : 1,
"EnableMetrics" : true,
"PreferredMetadataLanguage" : "PreferredMetadataLanguage",
"PublicHttpsPort" : 2,
"EnableHttps" : true,
"TrustAllIP6Interfaces" : true,
"ServerName" : "ServerName",
"QuickConnectAvailable" : true,
"VirtualInterfaceNames" : "VirtualInterfaceNames",
"SortRemoveWords" : [ "SortRemoveWords", "SortRemoveWords" ],
"EnableGroupingIntoCollections" : true,
"PublicPort" : 6
}}]
- returns: RequestBuilder<ServerConfiguration>
*/
open class func getConfigurationWithRequestBuilder() -> RequestBuilder<ServerConfiguration> {
let path = "/System/Configuration"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<ServerConfiguration>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a default MetadataOptions object.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDefaultMetadataOptions(completion: @escaping ((_ data: MetadataOptions?,_ error: Error?) -> Void)) {
getDefaultMetadataOptionsWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a default MetadataOptions object.
- GET /System/Configuration/MetadataOptions/Default
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"DisabledImageFetchers" : [ "DisabledImageFetchers", "DisabledImageFetchers" ],
"DisabledMetadataSavers" : [ "DisabledMetadataSavers", "DisabledMetadataSavers" ],
"MetadataFetcherOrder" : [ "MetadataFetcherOrder", "MetadataFetcherOrder" ],
"ItemType" : "ItemType",
"DisabledMetadataFetchers" : [ "DisabledMetadataFetchers", "DisabledMetadataFetchers" ],
"ImageFetcherOrder" : [ "ImageFetcherOrder", "ImageFetcherOrder" ],
"LocalMetadataReaderOrder" : [ "LocalMetadataReaderOrder", "LocalMetadataReaderOrder" ]
}}]
- returns: RequestBuilder<MetadataOptions>
*/
open class func getDefaultMetadataOptionsWithRequestBuilder() -> RequestBuilder<MetadataOptions> {
let path = "/System/Configuration/MetadataOptions/Default"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<MetadataOptions>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a named configuration.
- parameter key: (path) Configuration key.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getNamedConfiguration(key: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getNamedConfigurationWithRequestBuilder(key: key).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a named configuration.
- GET /System/Configuration/{key}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter key: (path) Configuration key.
- returns: RequestBuilder<Data>
*/
open class func getNamedConfigurationWithRequestBuilder(key: String) -> RequestBuilder<Data> {
var path = "/System/Configuration/{key}"
let keyPreEscape = "\(key)"
let keyPostEscape = keyPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{key}", with: keyPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Updates application configuration.
- parameter body: (body) Configuration.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateConfiguration(body: SystemConfigurationBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateConfigurationWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates application configuration.
- POST /System/Configuration
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) Configuration.
- returns: RequestBuilder<Void>
*/
open class func updateConfigurationWithRequestBuilder(body: SystemConfigurationBody) -> RequestBuilder<Void> {
let path = "/System/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)
}
/**
Updates the path to the media encoder.
- parameter body: (body) Media encoder path form body.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateMediaEncoderPath(body: MediaEncoderPathBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateMediaEncoderPathWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates the path to the media encoder.
- POST /System/MediaEncoder/Path
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) Media encoder path form body.
- returns: RequestBuilder<Void>
*/
open class func updateMediaEncoderPathWithRequestBuilder(body: MediaEncoderPathBody) -> RequestBuilder<Void> {
let path = "/System/MediaEncoder/Path"
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)
}
/**
Updates named configuration.
- parameter key: (path) Configuration key.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateNamedConfiguration(key: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateNamedConfigurationWithRequestBuilder(key: key).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates named configuration.
- POST /System/Configuration/{key}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter key: (path) Configuration key.
- returns: RequestBuilder<Void>
*/
open class func updateNamedConfigurationWithRequestBuilder(key: String) -> RequestBuilder<Void> {
var path = "/System/Configuration/{key}"
let keyPreEscape = "\(key)"
let keyPostEscape = keyPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{key}", with: keyPostEscape, options: .literal, range: nil)
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)
}
}

View File

@ -1,106 +0,0 @@
//
// 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)
}
}

View File

@ -1,260 +0,0 @@
//
// DevicesAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class DevicesAPI {
/**
Deletes a device.
- parameter _id: (query) Device Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func deleteDevice(_id: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
deleteDeviceWithRequestBuilder(_id: _id).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Deletes a device.
- DELETE /Devices
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter _id: (query) Device Id.
- returns: RequestBuilder<Void>
*/
open class func deleteDeviceWithRequestBuilder(_id: String) -> RequestBuilder<Void> {
let path = "/Devices"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"id": _id
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get info for a device.
- parameter _id: (query) Device Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDeviceInfo(_id: String, completion: @escaping ((_ data: DeviceInfo?,_ error: Error?) -> Void)) {
getDeviceInfoWithRequestBuilder(_id: _id).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get info for a device.
- GET /Devices/Info
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"AppVersion" : "AppVersion",
"IconUrl" : "IconUrl",
"LastUserName" : "LastUserName",
"Capabilities" : "",
"LastUserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Id" : "Id",
"DateLastActivity" : "2000-01-23T04:56:07.000+00:00",
"Name" : "Name",
"AppName" : "AppName"
}}]
- parameter _id: (query) Device Id.
- returns: RequestBuilder<DeviceInfo>
*/
open class func getDeviceInfoWithRequestBuilder(_id: String) -> RequestBuilder<DeviceInfo> {
let path = "/Devices/Info"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"id": _id
])
let requestBuilder: RequestBuilder<DeviceInfo>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get options for a device.
- parameter _id: (query) Device Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDeviceOptions(_id: String, completion: @escaping ((_ data: DeviceOptions?,_ error: Error?) -> Void)) {
getDeviceOptionsWithRequestBuilder(_id: _id).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get options for a device.
- GET /Devices/Options
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"CustomName" : "CustomName"
}}]
- parameter _id: (query) Device Id.
- returns: RequestBuilder<DeviceOptions>
*/
open class func getDeviceOptionsWithRequestBuilder(_id: String) -> RequestBuilder<DeviceOptions> {
let path = "/Devices/Options"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"id": _id
])
let requestBuilder: RequestBuilder<DeviceOptions>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get Devices.
- parameter supportsSync: (query) Gets or sets a value indicating whether [supports synchronize]. (optional)
- parameter userId: (query) Gets or sets the user identifier. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDevices(supportsSync: Bool? = nil, userId: UUID? = nil, completion: @escaping ((_ data: DeviceInfoQueryResult?,_ error: Error?) -> Void)) {
getDevicesWithRequestBuilder(supportsSync: supportsSync, userId: userId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get Devices.
- GET /Devices
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"TotalRecordCount" : 0,
"StartIndex" : 6,
"Items" : [ {
"AppVersion" : "AppVersion",
"IconUrl" : "IconUrl",
"LastUserName" : "LastUserName",
"Capabilities" : "",
"LastUserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Id" : "Id",
"DateLastActivity" : "2000-01-23T04:56:07.000+00:00",
"Name" : "Name",
"AppName" : "AppName"
}, {
"AppVersion" : "AppVersion",
"IconUrl" : "IconUrl",
"LastUserName" : "LastUserName",
"Capabilities" : "",
"LastUserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Id" : "Id",
"DateLastActivity" : "2000-01-23T04:56:07.000+00:00",
"Name" : "Name",
"AppName" : "AppName"
} ]
}}]
- parameter supportsSync: (query) Gets or sets a value indicating whether [supports synchronize]. (optional)
- parameter userId: (query) Gets or sets the user identifier. (optional)
- returns: RequestBuilder<DeviceInfoQueryResult>
*/
open class func getDevicesWithRequestBuilder(supportsSync: Bool? = nil, userId: UUID? = nil) -> RequestBuilder<DeviceInfoQueryResult> {
let path = "/Devices"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"supportsSync": supportsSync,
"userId": userId
])
let requestBuilder: RequestBuilder<DeviceInfoQueryResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Update device options.
- parameter body: (body) Device Options.
- parameter _id: (query) Device Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateDeviceOptions(body: DevicesOptionsBody, _id: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateDeviceOptionsWithRequestBuilder(body: body, _id: _id).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Update device options.
- POST /Devices/Options
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) Device Options.
- parameter _id: (query) Device Id.
- returns: RequestBuilder<Void>
*/
open class func updateDeviceOptionsWithRequestBuilder(body: DevicesOptionsBody, _id: String) -> RequestBuilder<Void> {
let path = "/Devices/Options"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"id": _id
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
}

View File

@ -1,131 +0,0 @@
//
// DisplayPreferencesAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class DisplayPreferencesAPI {
/**
Get Display Preferences.
- parameter displayPreferencesId: (path) Display preferences id.
- parameter userId: (query) User id.
- parameter client: (query) Client.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDisplayPreferences(displayPreferencesId: String, userId: UUID, client: String, completion: @escaping ((_ data: DisplayPreferencesDto?,_ error: Error?) -> Void)) {
getDisplayPreferencesWithRequestBuilder(displayPreferencesId: displayPreferencesId, userId: userId, client: client).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get Display Preferences.
- GET /DisplayPreferences/{displayPreferencesId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"RememberSorting" : true,
"RememberIndexing" : true,
"PrimaryImageWidth" : 6,
"ScrollDirection" : "",
"IndexBy" : "IndexBy",
"SortBy" : "SortBy",
"ShowBackdrop" : true,
"SortOrder" : "",
"ShowSidebar" : true,
"PrimaryImageHeight" : 0,
"Id" : "Id",
"Client" : "Client",
"CustomPrefs" : {
"key" : "CustomPrefs"
},
"ViewType" : "ViewType"
}}]
- parameter displayPreferencesId: (path) Display preferences id.
- parameter userId: (query) User id.
- parameter client: (query) Client.
- returns: RequestBuilder<DisplayPreferencesDto>
*/
open class func getDisplayPreferencesWithRequestBuilder(displayPreferencesId: String, userId: UUID, client: String) -> RequestBuilder<DisplayPreferencesDto> {
var path = "/DisplayPreferences/{displayPreferencesId}"
let displayPreferencesIdPreEscape = "\(displayPreferencesId)"
let displayPreferencesIdPostEscape = displayPreferencesIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{displayPreferencesId}", with: displayPreferencesIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"userId": userId,
"client": client
])
let requestBuilder: RequestBuilder<DisplayPreferencesDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Update Display Preferences.
- parameter body: (body) New Display Preferences object.
- parameter userId: (query) User Id.
- parameter client: (query) Client.
- parameter displayPreferencesId: (path) Display preferences id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateDisplayPreferences(body: DisplayPreferencesDisplayPreferencesIdBody, userId: UUID, client: String, displayPreferencesId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateDisplayPreferencesWithRequestBuilder(body: body, userId: userId, client: client, displayPreferencesId: displayPreferencesId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Update Display Preferences.
- POST /DisplayPreferences/{displayPreferencesId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) New Display Preferences object.
- parameter userId: (query) User Id.
- parameter client: (query) Client.
- parameter displayPreferencesId: (path) Display preferences id.
- returns: RequestBuilder<Void>
*/
open class func updateDisplayPreferencesWithRequestBuilder(body: DisplayPreferencesDisplayPreferencesIdBody, userId: UUID, client: String, displayPreferencesId: String) -> RequestBuilder<Void> {
var path = "/DisplayPreferences/{displayPreferencesId}"
let displayPreferencesIdPreEscape = "\(displayPreferencesId)"
let displayPreferencesIdPostEscape = displayPreferencesIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{displayPreferencesId}", with: displayPreferencesIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"userId": userId,
"client": client
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
}

View File

@ -1,571 +0,0 @@
//
// DlnaAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class DlnaAPI {
/**
Creates a profile.
- parameter body: (body) Device profile. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func createProfile(body: DlnaProfilesBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
createProfileWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Creates a profile.
- POST /Dlna/Profiles
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) Device profile. (optional)
- returns: RequestBuilder<Void>
*/
open class func createProfileWithRequestBuilder(body: DlnaProfilesBody? = nil) -> RequestBuilder<Void> {
let path = "/Dlna/Profiles"
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)
}
/**
Deletes a profile.
- parameter profileId: (path) Profile id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func deleteProfile(profileId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
deleteProfileWithRequestBuilder(profileId: profileId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Deletes a profile.
- DELETE /Dlna/Profiles/{profileId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter profileId: (path) Profile id.
- returns: RequestBuilder<Void>
*/
open class func deleteProfileWithRequestBuilder(profileId: String) -> RequestBuilder<Void> {
var path = "/Dlna/Profiles/{profileId}"
let profileIdPreEscape = "\(profileId)"
let profileIdPostEscape = profileIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{profileId}", with: profileIdPostEscape, options: .literal, range: nil)
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: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets the default profile.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDefaultProfile(completion: @escaping ((_ data: DeviceProfile?,_ error: Error?) -> Void)) {
getDefaultProfileWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the default profile.
- GET /Dlna/Profiles/Default
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"ManufacturerUrl" : "ManufacturerUrl",
"EnableSingleAlbumArtLimit" : true,
"MusicStreamingTranscodingBitrate" : 7,
"AlbumArtPn" : "AlbumArtPn",
"TranscodingProfiles" : [ {
"Context" : "",
"BreakOnNonKeyFrames" : true,
"EnableSubtitlesInManifest" : true,
"CopyTimestamps" : true,
"MinSegments" : 2,
"EnableMpegtsM2TsMode" : true,
"MaxAudioChannels" : "MaxAudioChannels",
"VideoCodec" : "VideoCodec",
"Container" : "Container",
"Type" : "",
"EstimateContentLength" : true,
"SegmentLength" : 4,
"TranscodeSeekInfo" : "",
"Protocol" : "Protocol",
"AudioCodec" : "AudioCodec"
}, {
"Context" : "",
"BreakOnNonKeyFrames" : true,
"EnableSubtitlesInManifest" : true,
"CopyTimestamps" : true,
"MinSegments" : 2,
"EnableMpegtsM2TsMode" : true,
"MaxAudioChannels" : "MaxAudioChannels",
"VideoCodec" : "VideoCodec",
"Container" : "Container",
"Type" : "",
"EstimateContentLength" : true,
"SegmentLength" : 4,
"TranscodeSeekInfo" : "",
"Protocol" : "Protocol",
"AudioCodec" : "AudioCodec"
} ],
"Identification" : "",
"MaxStreamingBitrate" : 5,
"IgnoreTranscodeByteRangeRequests" : true,
"Name" : "Name",
"ResponseProfiles" : [ {
"Container" : "Container",
"Type" : "",
"OrgPn" : "OrgPn",
"VideoCodec" : "VideoCodec",
"AudioCodec" : "AudioCodec",
"MimeType" : "MimeType",
"Conditions" : [ null, null ]
}, {
"Container" : "Container",
"Type" : "",
"OrgPn" : "OrgPn",
"VideoCodec" : "VideoCodec",
"AudioCodec" : "AudioCodec",
"MimeType" : "MimeType",
"Conditions" : [ null, null ]
} ],
"ModelUrl" : "ModelUrl",
"MaxStaticBitrate" : 2,
"Manufacturer" : "Manufacturer",
"ProtocolInfo" : "ProtocolInfo",
"RequiresPlainVideoItems" : true,
"ModelDescription" : "ModelDescription",
"MaxAlbumArtWidth" : 0,
"ModelNumber" : "ModelNumber",
"XmlRootAttributes" : [ {
"Value" : "Value",
"Name" : "Name"
}, {
"Value" : "Value",
"Name" : "Name"
} ],
"ModelName" : "ModelName",
"FriendlyName" : "FriendlyName",
"MaxIconHeight" : 5,
"RequiresPlainFolders" : true,
"EnableSingleSubtitleLimit" : true,
"SubtitleProfiles" : [ {
"Container" : "Container",
"Format" : "Format",
"Language" : "Language",
"DidlMode" : "DidlMode",
"Method" : ""
}, {
"Container" : "Container",
"Format" : "Format",
"Language" : "Language",
"DidlMode" : "DidlMode",
"Method" : ""
} ],
"MaxAlbumArtHeight" : 6,
"EnableAlbumArtInDidl" : true,
"EnableMSMediaReceiverRegistrar" : true,
"SerialNumber" : "SerialNumber",
"SupportedMediaTypes" : "SupportedMediaTypes",
"CodecProfiles" : [ {
"Type" : "",
"Codec" : "Codec",
"Container" : "Container",
"ApplyConditions" : [ null, null ],
"Conditions" : [ null, null ]
}, {
"Type" : "",
"Codec" : "Codec",
"Container" : "Container",
"ApplyConditions" : [ null, null ],
"Conditions" : [ null, null ]
} ],
"SonyAggregationFlags" : "SonyAggregationFlags",
"UserId" : "UserId",
"MaxIconWidth" : 1,
"TimelineOffsetSeconds" : 3,
"MaxStaticMusicBitrate" : 9,
"DirectPlayProfiles" : [ {
"Container" : "Container",
"Type" : "",
"VideoCodec" : "VideoCodec",
"AudioCodec" : "AudioCodec"
}, {
"Container" : "Container",
"Type" : "",
"VideoCodec" : "VideoCodec",
"AudioCodec" : "AudioCodec"
} ],
"ContainerProfiles" : [ {
"Type" : "",
"Container" : "Container",
"Conditions" : [ {
"Condition" : "",
"IsRequired" : true,
"Value" : "Value",
"Property" : ""
}, {
"Condition" : "",
"IsRequired" : true,
"Value" : "Value",
"Property" : ""
} ]
}, {
"Type" : "",
"Container" : "Container",
"Conditions" : [ {
"Condition" : "",
"IsRequired" : true,
"Value" : "Value",
"Property" : ""
}, {
"Condition" : "",
"IsRequired" : true,
"Value" : "Value",
"Property" : ""
} ]
} ],
"Id" : "Id"
}}]
- returns: RequestBuilder<DeviceProfile>
*/
open class func getDefaultProfileWithRequestBuilder() -> RequestBuilder<DeviceProfile> {
let path = "/Dlna/Profiles/Default"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<DeviceProfile>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a single profile.
- parameter profileId: (path) Profile Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getProfile(profileId: String, completion: @escaping ((_ data: DeviceProfile?,_ error: Error?) -> Void)) {
getProfileWithRequestBuilder(profileId: profileId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a single profile.
- GET /Dlna/Profiles/{profileId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"ManufacturerUrl" : "ManufacturerUrl",
"EnableSingleAlbumArtLimit" : true,
"MusicStreamingTranscodingBitrate" : 7,
"AlbumArtPn" : "AlbumArtPn",
"TranscodingProfiles" : [ {
"Context" : "",
"BreakOnNonKeyFrames" : true,
"EnableSubtitlesInManifest" : true,
"CopyTimestamps" : true,
"MinSegments" : 2,
"EnableMpegtsM2TsMode" : true,
"MaxAudioChannels" : "MaxAudioChannels",
"VideoCodec" : "VideoCodec",
"Container" : "Container",
"Type" : "",
"EstimateContentLength" : true,
"SegmentLength" : 4,
"TranscodeSeekInfo" : "",
"Protocol" : "Protocol",
"AudioCodec" : "AudioCodec"
}, {
"Context" : "",
"BreakOnNonKeyFrames" : true,
"EnableSubtitlesInManifest" : true,
"CopyTimestamps" : true,
"MinSegments" : 2,
"EnableMpegtsM2TsMode" : true,
"MaxAudioChannels" : "MaxAudioChannels",
"VideoCodec" : "VideoCodec",
"Container" : "Container",
"Type" : "",
"EstimateContentLength" : true,
"SegmentLength" : 4,
"TranscodeSeekInfo" : "",
"Protocol" : "Protocol",
"AudioCodec" : "AudioCodec"
} ],
"Identification" : "",
"MaxStreamingBitrate" : 5,
"IgnoreTranscodeByteRangeRequests" : true,
"Name" : "Name",
"ResponseProfiles" : [ {
"Container" : "Container",
"Type" : "",
"OrgPn" : "OrgPn",
"VideoCodec" : "VideoCodec",
"AudioCodec" : "AudioCodec",
"MimeType" : "MimeType",
"Conditions" : [ null, null ]
}, {
"Container" : "Container",
"Type" : "",
"OrgPn" : "OrgPn",
"VideoCodec" : "VideoCodec",
"AudioCodec" : "AudioCodec",
"MimeType" : "MimeType",
"Conditions" : [ null, null ]
} ],
"ModelUrl" : "ModelUrl",
"MaxStaticBitrate" : 2,
"Manufacturer" : "Manufacturer",
"ProtocolInfo" : "ProtocolInfo",
"RequiresPlainVideoItems" : true,
"ModelDescription" : "ModelDescription",
"MaxAlbumArtWidth" : 0,
"ModelNumber" : "ModelNumber",
"XmlRootAttributes" : [ {
"Value" : "Value",
"Name" : "Name"
}, {
"Value" : "Value",
"Name" : "Name"
} ],
"ModelName" : "ModelName",
"FriendlyName" : "FriendlyName",
"MaxIconHeight" : 5,
"RequiresPlainFolders" : true,
"EnableSingleSubtitleLimit" : true,
"SubtitleProfiles" : [ {
"Container" : "Container",
"Format" : "Format",
"Language" : "Language",
"DidlMode" : "DidlMode",
"Method" : ""
}, {
"Container" : "Container",
"Format" : "Format",
"Language" : "Language",
"DidlMode" : "DidlMode",
"Method" : ""
} ],
"MaxAlbumArtHeight" : 6,
"EnableAlbumArtInDidl" : true,
"EnableMSMediaReceiverRegistrar" : true,
"SerialNumber" : "SerialNumber",
"SupportedMediaTypes" : "SupportedMediaTypes",
"CodecProfiles" : [ {
"Type" : "",
"Codec" : "Codec",
"Container" : "Container",
"ApplyConditions" : [ null, null ],
"Conditions" : [ null, null ]
}, {
"Type" : "",
"Codec" : "Codec",
"Container" : "Container",
"ApplyConditions" : [ null, null ],
"Conditions" : [ null, null ]
} ],
"SonyAggregationFlags" : "SonyAggregationFlags",
"UserId" : "UserId",
"MaxIconWidth" : 1,
"TimelineOffsetSeconds" : 3,
"MaxStaticMusicBitrate" : 9,
"DirectPlayProfiles" : [ {
"Container" : "Container",
"Type" : "",
"VideoCodec" : "VideoCodec",
"AudioCodec" : "AudioCodec"
}, {
"Container" : "Container",
"Type" : "",
"VideoCodec" : "VideoCodec",
"AudioCodec" : "AudioCodec"
} ],
"ContainerProfiles" : [ {
"Type" : "",
"Container" : "Container",
"Conditions" : [ {
"Condition" : "",
"IsRequired" : true,
"Value" : "Value",
"Property" : ""
}, {
"Condition" : "",
"IsRequired" : true,
"Value" : "Value",
"Property" : ""
} ]
}, {
"Type" : "",
"Container" : "Container",
"Conditions" : [ {
"Condition" : "",
"IsRequired" : true,
"Value" : "Value",
"Property" : ""
}, {
"Condition" : "",
"IsRequired" : true,
"Value" : "Value",
"Property" : ""
} ]
} ],
"Id" : "Id"
}}]
- parameter profileId: (path) Profile Id.
- returns: RequestBuilder<DeviceProfile>
*/
open class func getProfileWithRequestBuilder(profileId: String) -> RequestBuilder<DeviceProfile> {
var path = "/Dlna/Profiles/{profileId}"
let profileIdPreEscape = "\(profileId)"
let profileIdPostEscape = profileIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{profileId}", with: profileIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<DeviceProfile>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get profile infos.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getProfileInfos(completion: @escaping ((_ data: [DeviceProfileInfo]?,_ error: Error?) -> Void)) {
getProfileInfosWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get profile infos.
- GET /Dlna/ProfileInfos
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Type" : "",
"Id" : "Id",
"Name" : "Name"
}, {
"Type" : "",
"Id" : "Id",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[DeviceProfileInfo]>
*/
open class func getProfileInfosWithRequestBuilder() -> RequestBuilder<[DeviceProfileInfo]> {
let path = "/Dlna/ProfileInfos"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[DeviceProfileInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Updates a profile.
- parameter profileId: (path) Profile id.
- parameter body: (body) Device profile. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateProfile(profileId: String, body: ProfilesProfileIdBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateProfileWithRequestBuilder(profileId: profileId, body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates a profile.
- POST /Dlna/Profiles/{profileId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter profileId: (path) Profile id.
- parameter body: (body) Device profile. (optional)
- returns: RequestBuilder<Void>
*/
open class func updateProfileWithRequestBuilder(profileId: String, body: ProfilesProfileIdBody? = nil) -> RequestBuilder<Void> {
var path = "/Dlna/Profiles/{profileId}"
let profileIdPreEscape = "\(profileId)"
let profileIdPostEscape = profileIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{profileId}", with: profileIdPostEscape, options: .literal, range: nil)
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)
}
}

View File

@ -1,610 +0,0 @@
//
// DlnaServerAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class DlnaServerAPI {
/**
Gets Dlna media receiver registrar xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getConnectionManager(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getConnectionManagerWithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets Dlna media receiver registrar xml.
- GET /Dlna/{serverId}/ConnectionManager
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getConnectionManagerWithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/ConnectionManager"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets Dlna media receiver registrar xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getConnectionManager2(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getConnectionManager2WithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets Dlna media receiver registrar xml.
- GET /Dlna/{serverId}/ConnectionManager/ConnectionManager
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getConnectionManager2WithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/ConnectionManager/ConnectionManager"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets Dlna media receiver registrar xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getConnectionManager3(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getConnectionManager3WithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets Dlna media receiver registrar xml.
- GET /Dlna/{serverId}/ConnectionManager/ConnectionManager.xml
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getConnectionManager3WithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/ConnectionManager/ConnectionManager.xml"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets Dlna content directory xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getContentDirectory(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getContentDirectoryWithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets Dlna content directory xml.
- GET /Dlna/{serverId}/ContentDirectory
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getContentDirectoryWithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/ContentDirectory"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets Dlna content directory xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getContentDirectory2(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getContentDirectory2WithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets Dlna content directory xml.
- GET /Dlna/{serverId}/ContentDirectory/ContentDirectory
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getContentDirectory2WithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/ContentDirectory/ContentDirectory"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets Dlna content directory xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getContentDirectory3(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getContentDirectory3WithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets Dlna content directory xml.
- GET /Dlna/{serverId}/ContentDirectory/ContentDirectory.xml
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getContentDirectory3WithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/ContentDirectory/ContentDirectory.xml"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get Description Xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDescriptionXml(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getDescriptionXmlWithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get Description Xml.
- GET /Dlna/{serverId}/description
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getDescriptionXmlWithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/description"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get Description Xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDescriptionXml2(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getDescriptionXml2WithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get Description Xml.
- GET /Dlna/{serverId}/description.xml
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getDescriptionXml2WithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/description.xml"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a server icon.
- parameter fileName: (path) The icon filename.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getIcon(fileName: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getIconWithRequestBuilder(fileName: fileName).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a server icon.
- GET /Dlna/icons/{fileName}
-
- examples: [{contentType=application/json, example=""}]
- parameter fileName: (path) The icon filename.
- returns: RequestBuilder<Data>
*/
open class func getIconWithRequestBuilder(fileName: String) -> RequestBuilder<Data> {
var path = "/Dlna/icons/{fileName}"
let fileNamePreEscape = "\(fileName)"
let fileNamePostEscape = fileNamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{fileName}", with: fileNamePostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a server icon.
- parameter serverId: (path) Server UUID.
- parameter fileName: (path) The icon filename.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getIconId(serverId: String, fileName: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getIconIdWithRequestBuilder(serverId: serverId, fileName: fileName).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a server icon.
- GET /Dlna/{serverId}/icons/{fileName}
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- parameter fileName: (path) The icon filename.
- returns: RequestBuilder<Data>
*/
open class func getIconIdWithRequestBuilder(serverId: String, fileName: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/icons/{fileName}"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let fileNamePreEscape = "\(fileName)"
let fileNamePostEscape = fileNamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{fileName}", with: fileNamePostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets Dlna media receiver registrar xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMediaReceiverRegistrar(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getMediaReceiverRegistrarWithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets Dlna media receiver registrar xml.
- GET /Dlna/{serverId}/MediaReceiverRegistrar
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getMediaReceiverRegistrarWithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/MediaReceiverRegistrar"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets Dlna media receiver registrar xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMediaReceiverRegistrar2(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getMediaReceiverRegistrar2WithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets Dlna media receiver registrar xml.
- GET /Dlna/{serverId}/MediaReceiverRegistrar/MediaReceiverRegistrar
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getMediaReceiverRegistrar2WithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/MediaReceiverRegistrar/MediaReceiverRegistrar"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets Dlna media receiver registrar xml.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMediaReceiverRegistrar3(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getMediaReceiverRegistrar3WithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets Dlna media receiver registrar xml.
- GET /Dlna/{serverId}/MediaReceiverRegistrar/MediaReceiverRegistrar.xml
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func getMediaReceiverRegistrar3WithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/MediaReceiverRegistrar/MediaReceiverRegistrar.xml"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Process a connection manager control request.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func processConnectionManagerControlRequest(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
processConnectionManagerControlRequestWithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Process a connection manager control request.
- POST /Dlna/{serverId}/ConnectionManager/Control
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func processConnectionManagerControlRequestWithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/ConnectionManager/Control"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Process a content directory control request.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func processContentDirectoryControlRequest(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
processContentDirectoryControlRequestWithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Process a content directory control request.
- POST /Dlna/{serverId}/ContentDirectory/Control
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func processContentDirectoryControlRequestWithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/ContentDirectory/Control"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Process a media receiver registrar control request.
- parameter serverId: (path) Server UUID.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func processMediaReceiverRegistrarControlRequest(serverId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
processMediaReceiverRegistrarControlRequestWithRequestBuilder(serverId: serverId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Process a media receiver registrar control request.
- POST /Dlna/{serverId}/MediaReceiverRegistrar/Control
-
- examples: [{contentType=application/json, example=""}]
- parameter serverId: (path) Server UUID.
- returns: RequestBuilder<Data>
*/
open class func processMediaReceiverRegistrarControlRequestWithRequestBuilder(serverId: String) -> RequestBuilder<Data> {
var path = "/Dlna/{serverId}/MediaReceiverRegistrar/Control"
let serverIdPreEscape = "\(serverId)"
let serverIdPostEscape = serverIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{serverId}", with: serverIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,270 +0,0 @@
//
// EnvironmentAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class EnvironmentAPI {
/**
Get Default directory browser.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDefaultDirectoryBrowser(completion: @escaping ((_ data: DefaultDirectoryBrowserInfoDto?,_ error: Error?) -> Void)) {
getDefaultDirectoryBrowserWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get Default directory browser.
- GET /Environment/DefaultDirectoryBrowser
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"Path" : "Path"
}}]
- returns: RequestBuilder<DefaultDirectoryBrowserInfoDto>
*/
open class func getDefaultDirectoryBrowserWithRequestBuilder() -> RequestBuilder<DefaultDirectoryBrowserInfoDto> {
let path = "/Environment/DefaultDirectoryBrowser"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<DefaultDirectoryBrowserInfoDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets the contents of a given directory in the file system.
- parameter path: (query) The path.
- parameter includeFiles: (query) An optional filter to include or exclude files from the results. true/false. (optional, default to false)
- parameter includeDirectories: (query) An optional filter to include or exclude folders from the results. true/false. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDirectoryContents(path: String, includeFiles: Bool? = nil, includeDirectories: Bool? = nil, completion: @escaping ((_ data: [FileSystemEntryInfo]?,_ error: Error?) -> Void)) {
getDirectoryContentsWithRequestBuilder(path: path, includeFiles: includeFiles, includeDirectories: includeDirectories).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the contents of a given directory in the file system.
- GET /Environment/DirectoryContents
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Path" : "Path",
"Type" : "",
"Name" : "Name"
}, {
"Path" : "Path",
"Type" : "",
"Name" : "Name"
} ]}]
- parameter path: (query) The path.
- parameter includeFiles: (query) An optional filter to include or exclude files from the results. true/false. (optional, default to false)
- parameter includeDirectories: (query) An optional filter to include or exclude folders from the results. true/false. (optional, default to false)
- returns: RequestBuilder<[FileSystemEntryInfo]>
*/
open class func getDirectoryContentsWithRequestBuilder(path: String, includeFiles: Bool? = nil, includeDirectories: Bool? = nil) -> RequestBuilder<[FileSystemEntryInfo]> {
let path = "/Environment/DirectoryContents"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"path": path,
"includeFiles": includeFiles,
"includeDirectories": includeDirectories
])
let requestBuilder: RequestBuilder<[FileSystemEntryInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets available drives from the server's file system.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getDrives(completion: @escaping ((_ data: [FileSystemEntryInfo]?,_ error: Error?) -> Void)) {
getDrivesWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets available drives from the server's file system.
- GET /Environment/Drives
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Path" : "Path",
"Type" : "",
"Name" : "Name"
}, {
"Path" : "Path",
"Type" : "",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[FileSystemEntryInfo]>
*/
open class func getDrivesWithRequestBuilder() -> RequestBuilder<[FileSystemEntryInfo]> {
let path = "/Environment/Drives"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[FileSystemEntryInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets network paths.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getNetworkShares(completion: @escaping ((_ data: [FileSystemEntryInfo]?,_ error: Error?) -> Void)) {
getNetworkSharesWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets network paths.
- GET /Environment/NetworkShares
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Path" : "Path",
"Type" : "",
"Name" : "Name"
}, {
"Path" : "Path",
"Type" : "",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[FileSystemEntryInfo]>
*/
open class func getNetworkSharesWithRequestBuilder() -> RequestBuilder<[FileSystemEntryInfo]> {
let path = "/Environment/NetworkShares"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[FileSystemEntryInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets the parent path of a given path.
- parameter path: (query) The path.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getParentPath(path: String, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) {
getParentPathWithRequestBuilder(path: path).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the parent path of a given path.
- GET /Environment/ParentPath
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter path: (query) The path.
- returns: RequestBuilder<String>
*/
open class func getParentPathWithRequestBuilder(path: String) -> RequestBuilder<String> {
let path = "/Environment/ParentPath"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"path": path
])
let requestBuilder: RequestBuilder<String>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Validates path.
- parameter body: (body) Validate request object.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func validatePath(body: EnvironmentValidatePathBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
validatePathWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Validates path.
- POST /Environment/ValidatePath
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) Validate request object.
- returns: RequestBuilder<Void>
*/
open class func validatePathWithRequestBuilder(body: EnvironmentValidatePathBody) -> RequestBuilder<Void> {
let path = "/Environment/ValidatePath"
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)
}
}

View File

@ -1,143 +0,0 @@
//
// FilterAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class FilterAPI {
/**
Gets query filters.
- parameter userId: (query) Optional. User id. (optional)
- parameter parentId: (query) Optional. Specify this to localize the search to a specific item or folder. Omit to use the root. (optional)
- parameter includeItemTypes: (query) Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. (optional)
- parameter isAiring: (query) Optional. Is item airing. (optional)
- parameter isMovie: (query) Optional. Is item movie. (optional)
- parameter isSports: (query) Optional. Is item sports. (optional)
- parameter isKids: (query) Optional. Is item kids. (optional)
- parameter isNews: (query) Optional. Is item news. (optional)
- parameter isSeries: (query) Optional. Is item series. (optional)
- parameter recursive: (query) Optional. Search recursive. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getQueryFilters(userId: UUID? = nil, parentId: UUID? = nil, includeItemTypes: [String]? = nil, isAiring: Bool? = nil, isMovie: Bool? = nil, isSports: Bool? = nil, isKids: Bool? = nil, isNews: Bool? = nil, isSeries: Bool? = nil, recursive: Bool? = nil, completion: @escaping ((_ data: QueryFilters?,_ error: Error?) -> Void)) {
getQueryFiltersWithRequestBuilder(userId: userId, parentId: parentId, includeItemTypes: includeItemTypes, isAiring: isAiring, isMovie: isMovie, isSports: isSports, isKids: isKids, isNews: isNews, isSeries: isSeries, recursive: recursive).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets query filters.
- GET /Items/Filters2
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"Genres" : [ {
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name"
}, {
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name"
} ],
"Tags" : [ "Tags", "Tags" ]
}}]
- parameter userId: (query) Optional. User id. (optional)
- parameter parentId: (query) Optional. Specify this to localize the search to a specific item or folder. Omit to use the root. (optional)
- parameter includeItemTypes: (query) Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. (optional)
- parameter isAiring: (query) Optional. Is item airing. (optional)
- parameter isMovie: (query) Optional. Is item movie. (optional)
- parameter isSports: (query) Optional. Is item sports. (optional)
- parameter isKids: (query) Optional. Is item kids. (optional)
- parameter isNews: (query) Optional. Is item news. (optional)
- parameter isSeries: (query) Optional. Is item series. (optional)
- parameter recursive: (query) Optional. Search recursive. (optional)
- returns: RequestBuilder<QueryFilters>
*/
open class func getQueryFiltersWithRequestBuilder(userId: UUID? = nil, parentId: UUID? = nil, includeItemTypes: [String]? = nil, isAiring: Bool? = nil, isMovie: Bool? = nil, isSports: Bool? = nil, isKids: Bool? = nil, isNews: Bool? = nil, isSeries: Bool? = nil, recursive: Bool? = nil) -> RequestBuilder<QueryFilters> {
let path = "/Items/Filters2"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"userId": userId,
"parentId": parentId,
"includeItemTypes": includeItemTypes,
"isAiring": isAiring,
"isMovie": isMovie,
"isSports": isSports,
"isKids": isKids,
"isNews": isNews,
"isSeries": isSeries,
"recursive": recursive
])
let requestBuilder: RequestBuilder<QueryFilters>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets legacy query filters.
- parameter userId: (query) Optional. User id. (optional)
- parameter parentId: (query) Optional. Parent id. (optional)
- parameter includeItemTypes: (query) Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. (optional)
- parameter mediaTypes: (query) Optional. Filter by MediaType. Allows multiple, comma delimited. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getQueryFiltersLegacy(userId: UUID? = nil, parentId: UUID? = nil, includeItemTypes: [String]? = nil, mediaTypes: [String]? = nil, completion: @escaping ((_ data: QueryFiltersLegacy?,_ error: Error?) -> Void)) {
getQueryFiltersLegacyWithRequestBuilder(userId: userId, parentId: parentId, includeItemTypes: includeItemTypes, mediaTypes: mediaTypes).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets legacy query filters.
- GET /Items/Filters
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"Years" : [ 0, 0 ],
"OfficialRatings" : [ "OfficialRatings", "OfficialRatings" ],
"Genres" : [ "Genres", "Genres" ],
"Tags" : [ "Tags", "Tags" ]
}}]
- parameter userId: (query) Optional. User id. (optional)
- parameter parentId: (query) Optional. Parent id. (optional)
- parameter includeItemTypes: (query) Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. (optional)
- parameter mediaTypes: (query) Optional. Filter by MediaType. Allows multiple, comma delimited. (optional)
- returns: RequestBuilder<QueryFiltersLegacy>
*/
open class func getQueryFiltersLegacyWithRequestBuilder(userId: UUID? = nil, parentId: UUID? = nil, includeItemTypes: [String]? = nil, mediaTypes: [String]? = nil) -> RequestBuilder<QueryFiltersLegacy> {
let path = "/Items/Filters"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"userId": userId,
"parentId": parentId,
"includeItemTypes": includeItemTypes,
"mediaTypes": mediaTypes
])
let requestBuilder: RequestBuilder<QueryFiltersLegacy>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,240 +0,0 @@
//
// HlsSegmentAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class HlsSegmentAPI {
/**
Gets the specified audio segment for an audio item.
- parameter itemId: (path) The item id.
- parameter segmentId: (path) The segment id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getHlsAudioSegmentLegacyAac(itemId: String, segmentId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getHlsAudioSegmentLegacyAacWithRequestBuilder(itemId: itemId, segmentId: segmentId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the specified audio segment for an audio item.
- GET /Audio/{itemId}/hls/{segmentId}/stream.aac
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter segmentId: (path) The segment id.
- returns: RequestBuilder<Data>
*/
open class func getHlsAudioSegmentLegacyAacWithRequestBuilder(itemId: String, segmentId: String) -> RequestBuilder<Data> {
var path = "/Audio/{itemId}/hls/{segmentId}/stream.aac"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let segmentIdPreEscape = "\(segmentId)"
let segmentIdPostEscape = segmentIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{segmentId}", with: segmentIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets the specified audio segment for an audio item.
- parameter itemId: (path) The item id.
- parameter segmentId: (path) The segment id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getHlsAudioSegmentLegacyMp3(itemId: String, segmentId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getHlsAudioSegmentLegacyMp3WithRequestBuilder(itemId: itemId, segmentId: segmentId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the specified audio segment for an audio item.
- GET /Audio/{itemId}/hls/{segmentId}/stream.mp3
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter segmentId: (path) The segment id.
- returns: RequestBuilder<Data>
*/
open class func getHlsAudioSegmentLegacyMp3WithRequestBuilder(itemId: String, segmentId: String) -> RequestBuilder<Data> {
var path = "/Audio/{itemId}/hls/{segmentId}/stream.mp3"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let segmentIdPreEscape = "\(segmentId)"
let segmentIdPostEscape = segmentIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{segmentId}", with: segmentIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a hls video playlist.
- parameter itemId: (path) The video id.
- parameter playlistId: (path) The playlist id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getHlsPlaylistLegacy(itemId: String, playlistId: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getHlsPlaylistLegacyWithRequestBuilder(itemId: itemId, playlistId: playlistId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a hls video playlist.
- GET /Videos/{itemId}/hls/{playlistId}/stream.m3u8
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The video id.
- parameter playlistId: (path) The playlist id.
- returns: RequestBuilder<Data>
*/
open class func getHlsPlaylistLegacyWithRequestBuilder(itemId: String, playlistId: String) -> RequestBuilder<Data> {
var path = "/Videos/{itemId}/hls/{playlistId}/stream.m3u8"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let playlistIdPreEscape = "\(playlistId)"
let playlistIdPostEscape = playlistIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{playlistId}", with: playlistIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a hls video segment.
- parameter itemId: (path) The item id.
- parameter playlistId: (path) The playlist id.
- parameter segmentId: (path) The segment id.
- parameter segmentContainer: (path) The segment container.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getHlsVideoSegmentLegacy(itemId: String, playlistId: String, segmentId: String, segmentContainer: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getHlsVideoSegmentLegacyWithRequestBuilder(itemId: itemId, playlistId: playlistId, segmentId: segmentId, segmentContainer: segmentContainer).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a hls video segment.
- GET /Videos/{itemId}/hls/{playlistId}/{segmentId}.{segmentContainer}
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter playlistId: (path) The playlist id.
- parameter segmentId: (path) The segment id.
- parameter segmentContainer: (path) The segment container.
- returns: RequestBuilder<Data>
*/
open class func getHlsVideoSegmentLegacyWithRequestBuilder(itemId: String, playlistId: String, segmentId: String, segmentContainer: String) -> RequestBuilder<Data> {
var path = "/Videos/{itemId}/hls/{playlistId}/{segmentId}.{segmentContainer}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let playlistIdPreEscape = "\(playlistId)"
let playlistIdPostEscape = playlistIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{playlistId}", with: playlistIdPostEscape, options: .literal, range: nil)
let segmentIdPreEscape = "\(segmentId)"
let segmentIdPostEscape = segmentIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{segmentId}", with: segmentIdPostEscape, options: .literal, range: nil)
let segmentContainerPreEscape = "\(segmentContainer)"
let segmentContainerPostEscape = segmentContainerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{segmentContainer}", with: segmentContainerPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Stops an active encoding.
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed.
- parameter playSessionId: (query) The play session id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func stopEncodingProcess(deviceId: String, playSessionId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
stopEncodingProcessWithRequestBuilder(deviceId: deviceId, playSessionId: playSessionId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Stops an active encoding.
- DELETE /Videos/ActiveEncodings
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed.
- parameter playSessionId: (query) The play session id.
- returns: RequestBuilder<Void>
*/
open class func stopEncodingProcessWithRequestBuilder(deviceId: String, playSessionId: String) -> RequestBuilder<Void> {
let path = "/Videos/ActiveEncodings"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"deviceId": deviceId,
"playSessionId": playSessionId
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,280 +0,0 @@
//
// ImageByNameAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class ImageByNameAPI {
/**
Get General Image.
- parameter name: (path) The name of the image.
- parameter type: (path) Image Type (primary, backdrop, logo, etc).
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getGeneralImage(name: String, type: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getGeneralImageWithRequestBuilder(name: name, type: type).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get General Image.
- GET /Images/General/{name}/{type}
-
- examples: [{contentType=application/json, example=""}]
- parameter name: (path) The name of the image.
- parameter type: (path) Image Type (primary, backdrop, logo, etc).
- returns: RequestBuilder<Data>
*/
open class func getGeneralImageWithRequestBuilder(name: String, type: String) -> RequestBuilder<Data> {
var path = "/Images/General/{name}/{type}"
let namePreEscape = "\(name)"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
let typePreEscape = "\(type)"
let typePostEscape = typePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{type}", with: typePostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get all general images.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getGeneralImages(completion: @escaping ((_ data: [ImageByNameInfo]?,_ error: Error?) -> Void)) {
getGeneralImagesWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get all general images.
- GET /Images/General
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Context" : "Context",
"Format" : "Format",
"Theme" : "Theme",
"Name" : "Name",
"FileLength" : 0
}, {
"Context" : "Context",
"Format" : "Format",
"Theme" : "Theme",
"Name" : "Name",
"FileLength" : 0
} ]}]
- returns: RequestBuilder<[ImageByNameInfo]>
*/
open class func getGeneralImagesWithRequestBuilder() -> RequestBuilder<[ImageByNameInfo]> {
let path = "/Images/General"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[ImageByNameInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get media info image.
- parameter theme: (path) The theme to get the image from.
- parameter name: (path) The name of the image.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMediaInfoImage(theme: String, name: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getMediaInfoImageWithRequestBuilder(theme: theme, name: name).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get media info image.
- GET /Images/MediaInfo/{theme}/{name}
-
- examples: [{contentType=application/json, example=""}]
- parameter theme: (path) The theme to get the image from.
- parameter name: (path) The name of the image.
- returns: RequestBuilder<Data>
*/
open class func getMediaInfoImageWithRequestBuilder(theme: String, name: String) -> RequestBuilder<Data> {
var path = "/Images/MediaInfo/{theme}/{name}"
let themePreEscape = "\(theme)"
let themePostEscape = themePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{theme}", with: themePostEscape, options: .literal, range: nil)
let namePreEscape = "\(name)"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get all media info images.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMediaInfoImages(completion: @escaping ((_ data: [ImageByNameInfo]?,_ error: Error?) -> Void)) {
getMediaInfoImagesWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get all media info images.
- GET /Images/MediaInfo
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Context" : "Context",
"Format" : "Format",
"Theme" : "Theme",
"Name" : "Name",
"FileLength" : 0
}, {
"Context" : "Context",
"Format" : "Format",
"Theme" : "Theme",
"Name" : "Name",
"FileLength" : 0
} ]}]
- returns: RequestBuilder<[ImageByNameInfo]>
*/
open class func getMediaInfoImagesWithRequestBuilder() -> RequestBuilder<[ImageByNameInfo]> {
let path = "/Images/MediaInfo"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[ImageByNameInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get rating image.
- parameter theme: (path) The theme to get the image from.
- parameter name: (path) The name of the image.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getRatingImage(theme: String, name: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getRatingImageWithRequestBuilder(theme: theme, name: name).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get rating image.
- GET /Images/Ratings/{theme}/{name}
-
- examples: [{contentType=application/json, example=""}]
- parameter theme: (path) The theme to get the image from.
- parameter name: (path) The name of the image.
- returns: RequestBuilder<Data>
*/
open class func getRatingImageWithRequestBuilder(theme: String, name: String) -> RequestBuilder<Data> {
var path = "/Images/Ratings/{theme}/{name}"
let themePreEscape = "\(theme)"
let themePostEscape = themePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{theme}", with: themePostEscape, options: .literal, range: nil)
let namePreEscape = "\(name)"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get all general images.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getRatingImages(completion: @escaping ((_ data: [ImageByNameInfo]?,_ error: Error?) -> Void)) {
getRatingImagesWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get all general images.
- GET /Images/Ratings
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Context" : "Context",
"Format" : "Format",
"Theme" : "Theme",
"Name" : "Name",
"FileLength" : 0
}, {
"Context" : "Context",
"Format" : "Format",
"Theme" : "Theme",
"Name" : "Name",
"FileLength" : 0
} ]}]
- returns: RequestBuilder<[ImageByNameInfo]>
*/
open class func getRatingImagesWithRequestBuilder() -> RequestBuilder<[ImageByNameInfo]> {
let path = "/Images/Ratings"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[ImageByNameInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,716 +0,0 @@
//
// ItemLookupAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class ItemLookupAPI {
/**
Applies search criteria to an item and refreshes metadata.
- parameter body: (body) The remote search result.
- parameter itemId: (path) Item id.
- parameter replaceAllImages: (query) Optional. Whether or not to replace all images. Default: True. (optional, default to true)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func applySearchCriteria(body: ApplyItemIdBody, itemId: UUID, replaceAllImages: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
applySearchCriteriaWithRequestBuilder(body: body, itemId: itemId, replaceAllImages: replaceAllImages).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Applies search criteria to an item and refreshes metadata.
- POST /Items/RemoteSearch/Apply/{itemId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The remote search result.
- parameter itemId: (path) Item id.
- parameter replaceAllImages: (query) Optional. Whether or not to replace all images. Default: True. (optional, default to true)
- returns: RequestBuilder<Void>
*/
open class func applySearchCriteriaWithRequestBuilder(body: ApplyItemIdBody, itemId: UUID, replaceAllImages: Bool? = nil) -> RequestBuilder<Void> {
var path = "/Items/RemoteSearch/Apply/{itemId}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"replaceAllImages": replaceAllImages
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Get book remote search.
- parameter body: (body) Remote search query.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getBookRemoteSearchResults(body: RemoteSearchBookBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) {
getBookRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get book remote search.
- POST /Items/RemoteSearch/Book
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
}, {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
} ]}]
- parameter body: (body) Remote search query.
- returns: RequestBuilder<[RemoteSearchResult]>
*/
open class func getBookRemoteSearchResultsWithRequestBuilder(body: RemoteSearchBookBody) -> RequestBuilder<[RemoteSearchResult]> {
let path = "/Items/RemoteSearch/Book"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Get box set remote search.
- parameter body: (body) Remote search query.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getBoxSetRemoteSearchResults(body: RemoteSearchBoxSetBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) {
getBoxSetRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get box set remote search.
- POST /Items/RemoteSearch/BoxSet
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
}, {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
} ]}]
- parameter body: (body) Remote search query.
- returns: RequestBuilder<[RemoteSearchResult]>
*/
open class func getBoxSetRemoteSearchResultsWithRequestBuilder(body: RemoteSearchBoxSetBody) -> RequestBuilder<[RemoteSearchResult]> {
let path = "/Items/RemoteSearch/BoxSet"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Get the item's external id info.
- parameter itemId: (path) Item id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getExternalIdInfos(itemId: UUID, completion: @escaping ((_ data: [ExternalIdInfo]?,_ error: Error?) -> Void)) {
getExternalIdInfosWithRequestBuilder(itemId: itemId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get the item's external id info.
- GET /Items/{itemId}/ExternalIdInfos
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Type" : "",
"Key" : "Key",
"Name" : "Name",
"UrlFormatString" : "UrlFormatString"
}, {
"Type" : "",
"Key" : "Key",
"Name" : "Name",
"UrlFormatString" : "UrlFormatString"
} ]}]
- parameter itemId: (path) Item id.
- returns: RequestBuilder<[ExternalIdInfo]>
*/
open class func getExternalIdInfosWithRequestBuilder(itemId: UUID) -> RequestBuilder<[ExternalIdInfo]> {
var path = "/Items/{itemId}/ExternalIdInfos"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[ExternalIdInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get movie remote search.
- parameter body: (body) Remote search query.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMovieRemoteSearchResults(body: RemoteSearchMovieBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) {
getMovieRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get movie remote search.
- POST /Items/RemoteSearch/Movie
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
}, {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
} ]}]
- parameter body: (body) Remote search query.
- returns: RequestBuilder<[RemoteSearchResult]>
*/
open class func getMovieRemoteSearchResultsWithRequestBuilder(body: RemoteSearchMovieBody) -> RequestBuilder<[RemoteSearchResult]> {
let path = "/Items/RemoteSearch/Movie"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Get music album remote search.
- parameter body: (body) Remote search query.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMusicAlbumRemoteSearchResults(body: RemoteSearchMusicAlbumBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) {
getMusicAlbumRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get music album remote search.
- POST /Items/RemoteSearch/MusicAlbum
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
}, {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
} ]}]
- parameter body: (body) Remote search query.
- returns: RequestBuilder<[RemoteSearchResult]>
*/
open class func getMusicAlbumRemoteSearchResultsWithRequestBuilder(body: RemoteSearchMusicAlbumBody) -> RequestBuilder<[RemoteSearchResult]> {
let path = "/Items/RemoteSearch/MusicAlbum"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Get music artist remote search.
- parameter body: (body) Remote search query.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMusicArtistRemoteSearchResults(body: RemoteSearchMusicArtistBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) {
getMusicArtistRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get music artist remote search.
- POST /Items/RemoteSearch/MusicArtist
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
}, {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
} ]}]
- parameter body: (body) Remote search query.
- returns: RequestBuilder<[RemoteSearchResult]>
*/
open class func getMusicArtistRemoteSearchResultsWithRequestBuilder(body: RemoteSearchMusicArtistBody) -> RequestBuilder<[RemoteSearchResult]> {
let path = "/Items/RemoteSearch/MusicArtist"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Get music video remote search.
- parameter body: (body) Remote search query.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMusicVideoRemoteSearchResults(body: RemoteSearchMusicVideoBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) {
getMusicVideoRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get music video remote search.
- POST /Items/RemoteSearch/MusicVideo
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
}, {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
} ]}]
- parameter body: (body) Remote search query.
- returns: RequestBuilder<[RemoteSearchResult]>
*/
open class func getMusicVideoRemoteSearchResultsWithRequestBuilder(body: RemoteSearchMusicVideoBody) -> RequestBuilder<[RemoteSearchResult]> {
let path = "/Items/RemoteSearch/MusicVideo"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Get person remote search.
- parameter body: (body) Remote search query.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPersonRemoteSearchResults(body: RemoteSearchPersonBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) {
getPersonRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get person remote search.
- POST /Items/RemoteSearch/Person
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
}, {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
} ]}]
- parameter body: (body) Remote search query.
- returns: RequestBuilder<[RemoteSearchResult]>
*/
open class func getPersonRemoteSearchResultsWithRequestBuilder(body: RemoteSearchPersonBody) -> RequestBuilder<[RemoteSearchResult]> {
let path = "/Items/RemoteSearch/Person"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Get series remote search.
- parameter body: (body) Remote search query.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getSeriesRemoteSearchResults(body: RemoteSearchSeriesBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) {
getSeriesRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get series remote search.
- POST /Items/RemoteSearch/Series
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
}, {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
} ]}]
- parameter body: (body) Remote search query.
- returns: RequestBuilder<[RemoteSearchResult]>
*/
open class func getSeriesRemoteSearchResultsWithRequestBuilder(body: RemoteSearchSeriesBody) -> RequestBuilder<[RemoteSearchResult]> {
let path = "/Items/RemoteSearch/Series"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Get trailer remote search.
- parameter body: (body) Remote search query.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getTrailerRemoteSearchResults(body: RemoteSearchTrailerBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) {
getTrailerRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get trailer remote search.
- POST /Items/RemoteSearch/Trailer
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
}, {
"IndexNumberEnd" : 1,
"ProductionYear" : 0,
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"ImageUrl" : "ImageUrl",
"IndexNumber" : 6,
"Overview" : "Overview",
"ParentIndexNumber" : 5,
"SearchProviderName" : "SearchProviderName",
"ProviderIds" : {
"key" : "ProviderIds"
},
"Artists" : [ null, null ],
"AlbumArtist" : "",
"Name" : "Name"
} ]}]
- parameter body: (body) Remote search query.
- returns: RequestBuilder<[RemoteSearchResult]>
*/
open class func getTrailerRemoteSearchResultsWithRequestBuilder(body: RemoteSearchTrailerBody) -> RequestBuilder<[RemoteSearchResult]> {
let path = "/Items/RemoteSearch/Trailer"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
}

View File

@ -1,70 +0,0 @@
//
// ItemRefreshAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class ItemRefreshAPI {
/**
Refreshes metadata for an item.
- parameter itemId: (path) Item id.
- parameter metadataRefreshMode: (query) (Optional) Specifies the metadata refresh mode. (optional)
- parameter imageRefreshMode: (query) (Optional) Specifies the image refresh mode. (optional)
- parameter replaceAllMetadata: (query) (Optional) Determines if metadata should be replaced. Only applicable if mode is FullRefresh. (optional, default to false)
- parameter replaceAllImages: (query) (Optional) Determines if images should be replaced. Only applicable if mode is FullRefresh. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func post(itemId: UUID, metadataRefreshMode: MetadataRefreshMode? = nil, imageRefreshMode: ImageRefreshMode? = nil, replaceAllMetadata: Bool? = nil, replaceAllImages: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
postWithRequestBuilder(itemId: itemId, metadataRefreshMode: metadataRefreshMode, imageRefreshMode: imageRefreshMode, replaceAllMetadata: replaceAllMetadata, replaceAllImages: replaceAllImages).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Refreshes metadata for an item.
- POST /Items/{itemId}/Refresh
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter itemId: (path) Item id.
- parameter metadataRefreshMode: (query) (Optional) Specifies the metadata refresh mode. (optional)
- parameter imageRefreshMode: (query) (Optional) Specifies the image refresh mode. (optional)
- parameter replaceAllMetadata: (query) (Optional) Determines if metadata should be replaced. Only applicable if mode is FullRefresh. (optional, default to false)
- parameter replaceAllImages: (query) (Optional) Determines if images should be replaced. Only applicable if mode is FullRefresh. (optional, default to false)
- returns: RequestBuilder<Void>
*/
open class func postWithRequestBuilder(itemId: UUID, metadataRefreshMode: MetadataRefreshMode? = nil, imageRefreshMode: ImageRefreshMode? = nil, replaceAllMetadata: Bool? = nil, replaceAllImages: Bool? = nil) -> RequestBuilder<Void> {
var path = "/Items/{itemId}/Refresh"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"metadataRefreshMode": metadataRefreshMode,
"imageRefreshMode": imageRefreshMode,
"replaceAllMetadata": replaceAllMetadata,
"replaceAllImages": replaceAllImages
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

View File

@ -1,197 +0,0 @@
//
// ItemUpdateAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class ItemUpdateAPI {
/**
Gets metadata editor info for an item.
- parameter itemId: (path) The item id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getMetadataEditorInfo(itemId: UUID, completion: @escaping ((_ data: MetadataEditorInfo?,_ error: Error?) -> Void)) {
getMetadataEditorInfoWithRequestBuilder(itemId: itemId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets metadata editor info for an item.
- GET /Items/{itemId}/MetadataEditor
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"ParentalRatingOptions" : [ {
"Value" : 0,
"Name" : "Name"
}, {
"Value" : 0,
"Name" : "Name"
} ],
"ContentType" : "ContentType",
"Countries" : [ {
"TwoLetterISORegionName" : "TwoLetterISORegionName",
"ThreeLetterISORegionName" : "ThreeLetterISORegionName",
"DisplayName" : "DisplayName",
"Name" : "Name"
}, {
"TwoLetterISORegionName" : "TwoLetterISORegionName",
"ThreeLetterISORegionName" : "ThreeLetterISORegionName",
"DisplayName" : "DisplayName",
"Name" : "Name"
} ],
"Cultures" : [ {
"ThreeLetterISOLanguageNames" : [ "ThreeLetterISOLanguageNames", "ThreeLetterISOLanguageNames" ],
"ThreeLetterISOLanguageName" : "ThreeLetterISOLanguageName",
"DisplayName" : "DisplayName",
"Name" : "Name",
"TwoLetterISOLanguageName" : "TwoLetterISOLanguageName"
}, {
"ThreeLetterISOLanguageNames" : [ "ThreeLetterISOLanguageNames", "ThreeLetterISOLanguageNames" ],
"ThreeLetterISOLanguageName" : "ThreeLetterISOLanguageName",
"DisplayName" : "DisplayName",
"Name" : "Name",
"TwoLetterISOLanguageName" : "TwoLetterISOLanguageName"
} ],
"ExternalIdInfos" : [ {
"Type" : "",
"Key" : "Key",
"Name" : "Name",
"UrlFormatString" : "UrlFormatString"
}, {
"Type" : "",
"Key" : "Key",
"Name" : "Name",
"UrlFormatString" : "UrlFormatString"
} ],
"ContentTypeOptions" : [ {
"Value" : "Value",
"Name" : "Name"
}, {
"Value" : "Value",
"Name" : "Name"
} ]
}}]
- parameter itemId: (path) The item id.
- returns: RequestBuilder<MetadataEditorInfo>
*/
open class func getMetadataEditorInfoWithRequestBuilder(itemId: UUID) -> RequestBuilder<MetadataEditorInfo> {
var path = "/Items/{itemId}/MetadataEditor"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<MetadataEditorInfo>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Updates an item.
- parameter body: (body) The new item properties.
- parameter itemId: (path) The item id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateItem(body: ItemsItemIdBody, itemId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateItemWithRequestBuilder(body: body, itemId: itemId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates an item.
- POST /Items/{itemId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new item properties.
- parameter itemId: (path) The item id.
- returns: RequestBuilder<Void>
*/
open class func updateItemWithRequestBuilder(body: ItemsItemIdBody, itemId: UUID) -> RequestBuilder<Void> {
var path = "/Items/{itemId}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
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)
}
/**
Updates an item's content type.
- parameter itemId: (path) The item id.
- parameter contentType: (query) The content type of the item. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateItemContentType(itemId: UUID, contentType: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateItemContentTypeWithRequestBuilder(itemId: itemId, contentType: contentType).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates an item's content type.
- POST /Items/{itemId}/ContentType
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter itemId: (path) The item id.
- parameter contentType: (query) The content type of the item. (optional)
- returns: RequestBuilder<Void>
*/
open class func updateItemContentTypeWithRequestBuilder(itemId: UUID, contentType: String? = nil) -> RequestBuilder<Void> {
var path = "/Items/{itemId}/ContentType"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"contentType": contentType
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,389 +0,0 @@
//
// LibraryStructureAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class LibraryStructureAPI {
/**
Add a media path to a library.
- parameter body: (body) The media path dto.
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func addMediaPath(body: VirtualFoldersPathsBody, refreshLibrary: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
addMediaPathWithRequestBuilder(body: body, refreshLibrary: refreshLibrary).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Add a media path to a library.
- POST /Library/VirtualFolders/Paths
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The media path dto.
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- returns: RequestBuilder<Void>
*/
open class func addMediaPathWithRequestBuilder(body: VirtualFoldersPathsBody, refreshLibrary: Bool? = nil) -> RequestBuilder<Void> {
let path = "/Library/VirtualFolders/Paths"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"refreshLibrary": refreshLibrary
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Adds a virtual folder.
- parameter body: (body) The library options. (optional)
- parameter name: (query) The name of the virtual folder. (optional)
- parameter collectionType: (query) The type of the collection. (optional)
- parameter paths: (query) The paths of the virtual folder. (optional)
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func addVirtualFolder(body: LibraryVirtualFoldersBody? = nil, name: String? = nil, collectionType: CollectionType? = nil, paths: [String]? = nil, refreshLibrary: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
addVirtualFolderWithRequestBuilder(body: body, name: name, collectionType: collectionType, paths: paths, refreshLibrary: refreshLibrary).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Adds a virtual folder.
- POST /Library/VirtualFolders
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The library options. (optional)
- parameter name: (query) The name of the virtual folder. (optional)
- parameter collectionType: (query) The type of the collection. (optional)
- parameter paths: (query) The paths of the virtual folder. (optional)
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- returns: RequestBuilder<Void>
*/
open class func addVirtualFolderWithRequestBuilder(body: LibraryVirtualFoldersBody? = nil, name: String? = nil, collectionType: CollectionType? = nil, paths: [String]? = nil, refreshLibrary: Bool? = nil) -> RequestBuilder<Void> {
let path = "/Library/VirtualFolders"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"name": name,
"collectionType": collectionType,
"paths": paths,
"refreshLibrary": refreshLibrary
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Gets all virtual folders.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getVirtualFolders(completion: @escaping ((_ data: [VirtualFolderInfo]?,_ error: Error?) -> Void)) {
getVirtualFoldersWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets all virtual folders.
- GET /Library/VirtualFolders
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"RefreshProgress" : 0.8008281904610115,
"PrimaryImageItemId" : "PrimaryImageItemId",
"CollectionType" : "",
"Locations" : [ "Locations", "Locations" ],
"LibraryOptions" : "",
"ItemId" : "ItemId",
"RefreshStatus" : "RefreshStatus",
"Name" : "Name"
}, {
"RefreshProgress" : 0.8008281904610115,
"PrimaryImageItemId" : "PrimaryImageItemId",
"CollectionType" : "",
"Locations" : [ "Locations", "Locations" ],
"LibraryOptions" : "",
"ItemId" : "ItemId",
"RefreshStatus" : "RefreshStatus",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[VirtualFolderInfo]>
*/
open class func getVirtualFoldersWithRequestBuilder() -> RequestBuilder<[VirtualFolderInfo]> {
let path = "/Library/VirtualFolders"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[VirtualFolderInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Remove a media path.
- parameter name: (query) The name of the library. (optional)
- parameter path: (query) The path to remove. (optional)
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func removeMediaPath(name: String? = nil, path: String? = nil, refreshLibrary: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
removeMediaPathWithRequestBuilder(name: name, path: path, refreshLibrary: refreshLibrary).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Remove a media path.
- DELETE /Library/VirtualFolders/Paths
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter name: (query) The name of the library. (optional)
- parameter path: (query) The path to remove. (optional)
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- returns: RequestBuilder<Void>
*/
open class func removeMediaPathWithRequestBuilder(name: String? = nil, path: String? = nil, refreshLibrary: Bool? = nil) -> RequestBuilder<Void> {
let path = "/Library/VirtualFolders/Paths"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"name": name,
"path": path,
"refreshLibrary": refreshLibrary
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Removes a virtual folder.
- parameter name: (query) The name of the folder. (optional)
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func removeVirtualFolder(name: String? = nil, refreshLibrary: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
removeVirtualFolderWithRequestBuilder(name: name, refreshLibrary: refreshLibrary).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Removes a virtual folder.
- DELETE /Library/VirtualFolders
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter name: (query) The name of the folder. (optional)
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- returns: RequestBuilder<Void>
*/
open class func removeVirtualFolderWithRequestBuilder(name: String? = nil, refreshLibrary: Bool? = nil) -> RequestBuilder<Void> {
let path = "/Library/VirtualFolders"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"name": name,
"refreshLibrary": refreshLibrary
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Renames a virtual folder.
- parameter name: (query) The name of the virtual folder. (optional)
- parameter newName: (query) The new name. (optional)
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func renameVirtualFolder(name: String? = nil, newName: String? = nil, refreshLibrary: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
renameVirtualFolderWithRequestBuilder(name: name, newName: newName, refreshLibrary: refreshLibrary).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Renames a virtual folder.
- POST /Library/VirtualFolders/Name
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter name: (query) The name of the virtual folder. (optional)
- parameter newName: (query) The new name. (optional)
- parameter refreshLibrary: (query) Whether to refresh the library. (optional, default to false)
- returns: RequestBuilder<Void>
*/
open class func renameVirtualFolderWithRequestBuilder(name: String? = nil, newName: String? = nil, refreshLibrary: Bool? = nil) -> RequestBuilder<Void> {
let path = "/Library/VirtualFolders/Name"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"name": name,
"newName": newName,
"refreshLibrary": refreshLibrary
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Update library options.
- parameter body: (body) The library name and options. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateLibraryOptions(body: VirtualFoldersLibraryOptionsBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateLibraryOptionsWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Update library options.
- POST /Library/VirtualFolders/LibraryOptions
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The library name and options. (optional)
- returns: RequestBuilder<Void>
*/
open class func updateLibraryOptionsWithRequestBuilder(body: VirtualFoldersLibraryOptionsBody? = nil) -> RequestBuilder<Void> {
let path = "/Library/VirtualFolders/LibraryOptions"
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)
}
/**
Updates a media path.
- parameter body: (body) The name of the library and path infos.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateMediaPath(body: PathsUpdateBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateMediaPathWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates a media path.
- POST /Library/VirtualFolders/Paths/Update
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The name of the library and path infos.
- returns: RequestBuilder<Void>
*/
open class func updateMediaPathWithRequestBuilder(body: PathsUpdateBody) -> RequestBuilder<Void> {
let path = "/Library/VirtualFolders/Paths/Update"
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)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,187 +0,0 @@
//
// 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)
}
}

View File

@ -1,936 +0,0 @@
//
// MediaInfoAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class MediaInfoAPI {
/**
Closes a media source.
- parameter liveStreamId: (query) The livestream id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func closeLiveStream(liveStreamId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
closeLiveStreamWithRequestBuilder(liveStreamId: liveStreamId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Closes a media source.
- POST /LiveStreams/Close
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter liveStreamId: (query) The livestream id.
- returns: RequestBuilder<Void>
*/
open class func closeLiveStreamWithRequestBuilder(liveStreamId: String) -> RequestBuilder<Void> {
let path = "/LiveStreams/Close"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"liveStreamId": liveStreamId
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Tests the network with a request with the size of the bitrate.
- parameter size: (query) The bitrate. Defaults to 102400. (optional, default to 102400)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getBitrateTestBytes(size: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getBitrateTestBytesWithRequestBuilder(size: size).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Tests the network with a request with the size of the bitrate.
- GET /Playback/BitrateTest
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter size: (query) The bitrate. Defaults to 102400. (optional, default to 102400)
- returns: RequestBuilder<Data>
*/
open class func getBitrateTestBytesWithRequestBuilder(size: Int? = nil) -> RequestBuilder<Data> {
let path = "/Playback/BitrateTest"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"size": size?.encodeToJSON()
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets live playback media info for an item.
- parameter itemId: (path) The item id.
- parameter userId: (query) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPlaybackInfo(itemId: UUID, userId: UUID, completion: @escaping ((_ data: PlaybackInfoResponse?,_ error: Error?) -> Void)) {
getPlaybackInfoWithRequestBuilder(itemId: itemId, userId: userId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets live playback media info for an item.
- GET /Items/{itemId}/PlaybackInfo
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"PlaySessionId" : "PlaySessionId",
"MediaSources" : [ {
"EncoderPath" : "EncoderPath",
"RequiredHttpHeaders" : {
"key" : "RequiredHttpHeaders"
},
"RunTimeTicks" : 5,
"MediaStreams" : [ {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
}, {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
} ],
"Size" : 5,
"Video3DFormat" : "",
"BufferMs" : 2,
"Timestamp" : "",
"Name" : "Name",
"RequiresOpening" : true,
"SupportsDirectStream" : true,
"VideoType" : "",
"RequiresClosing" : true,
"Container" : "Container",
"IsoType" : "",
"LiveStreamId" : "LiveStreamId",
"RequiresLooping" : true,
"Protocol" : "",
"DefaultSubtitleStreamIndex" : 8,
"GenPtsInput" : true,
"IsInfiniteStream" : true,
"Path" : "Path",
"IsRemote" : true,
"EncoderProtocol" : "",
"IgnoreIndex" : true,
"SupportsDirectPlay" : true,
"TranscodingSubProtocol" : "TranscodingSubProtocol",
"Formats" : [ "Formats", "Formats" ],
"AnalyzeDurationMs" : 9,
"Bitrate" : 9,
"OpenToken" : "OpenToken",
"SupportsProbing" : true,
"Type" : "",
"MediaAttachments" : [ {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
}, {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
} ],
"ReadAtNativeFramerate" : true,
"ETag" : "ETag",
"TranscodingContainer" : "TranscodingContainer",
"IgnoreDts" : true,
"TranscodingUrl" : "TranscodingUrl",
"Id" : "Id",
"SupportsTranscoding" : true,
"DefaultAudioStreamIndex" : 6
}, {
"EncoderPath" : "EncoderPath",
"RequiredHttpHeaders" : {
"key" : "RequiredHttpHeaders"
},
"RunTimeTicks" : 5,
"MediaStreams" : [ {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
}, {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
} ],
"Size" : 5,
"Video3DFormat" : "",
"BufferMs" : 2,
"Timestamp" : "",
"Name" : "Name",
"RequiresOpening" : true,
"SupportsDirectStream" : true,
"VideoType" : "",
"RequiresClosing" : true,
"Container" : "Container",
"IsoType" : "",
"LiveStreamId" : "LiveStreamId",
"RequiresLooping" : true,
"Protocol" : "",
"DefaultSubtitleStreamIndex" : 8,
"GenPtsInput" : true,
"IsInfiniteStream" : true,
"Path" : "Path",
"IsRemote" : true,
"EncoderProtocol" : "",
"IgnoreIndex" : true,
"SupportsDirectPlay" : true,
"TranscodingSubProtocol" : "TranscodingSubProtocol",
"Formats" : [ "Formats", "Formats" ],
"AnalyzeDurationMs" : 9,
"Bitrate" : 9,
"OpenToken" : "OpenToken",
"SupportsProbing" : true,
"Type" : "",
"MediaAttachments" : [ {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
}, {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
} ],
"ReadAtNativeFramerate" : true,
"ETag" : "ETag",
"TranscodingContainer" : "TranscodingContainer",
"IgnoreDts" : true,
"TranscodingUrl" : "TranscodingUrl",
"Id" : "Id",
"SupportsTranscoding" : true,
"DefaultAudioStreamIndex" : 6
} ],
"ErrorCode" : ""
}}]
- parameter itemId: (path) The item id.
- parameter userId: (query) The user id.
- returns: RequestBuilder<PlaybackInfoResponse>
*/
open class func getPlaybackInfoWithRequestBuilder(itemId: UUID, userId: UUID) -> RequestBuilder<PlaybackInfoResponse> {
var path = "/Items/{itemId}/PlaybackInfo"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"userId": userId
])
let requestBuilder: RequestBuilder<PlaybackInfoResponse>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets live playback media info for an item.
- parameter itemId: (path) The item id.
- parameter body: (body) The playback info. (optional)
- parameter userId: (query) The user id. (optional)
- parameter maxStreamingBitrate: (query) The maximum streaming bitrate. (optional)
- parameter startTimeTicks: (query) The start time in ticks. (optional)
- parameter audioStreamIndex: (query) The audio stream index. (optional)
- parameter subtitleStreamIndex: (query) The subtitle stream index. (optional)
- parameter maxAudioChannels: (query) The maximum number of audio channels. (optional)
- parameter mediaSourceId: (query) The media source id. (optional)
- parameter liveStreamId: (query) The livestream id. (optional)
- parameter autoOpenLiveStream: (query) Whether to auto open the livestream. (optional)
- parameter enableDirectPlay: (query) Whether to enable direct play. Default: true. (optional)
- parameter enableDirectStream: (query) Whether to enable direct stream. Default: true. (optional)
- parameter enableTranscoding: (query) Whether to enable transcoding. Default: true. (optional)
- parameter allowVideoStreamCopy: (query) Whether to allow to copy the video stream. Default: true. (optional)
- parameter allowAudioStreamCopy: (query) Whether to allow to copy the audio stream. Default: true. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPostedPlaybackInfo(itemId: UUID, body: ItemIdPlaybackInfoBody? = nil, userId: UUID? = nil, maxStreamingBitrate: Int? = nil, startTimeTicks: Int64? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, maxAudioChannels: Int? = nil, mediaSourceId: String? = nil, liveStreamId: String? = nil, autoOpenLiveStream: Bool? = nil, enableDirectPlay: Bool? = nil, enableDirectStream: Bool? = nil, enableTranscoding: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, completion: @escaping ((_ data: PlaybackInfoResponse?,_ error: Error?) -> Void)) {
getPostedPlaybackInfoWithRequestBuilder(itemId: itemId, body: body, userId: userId, maxStreamingBitrate: maxStreamingBitrate, startTimeTicks: startTimeTicks, audioStreamIndex: audioStreamIndex, subtitleStreamIndex: subtitleStreamIndex, maxAudioChannels: maxAudioChannels, mediaSourceId: mediaSourceId, liveStreamId: liveStreamId, autoOpenLiveStream: autoOpenLiveStream, enableDirectPlay: enableDirectPlay, enableDirectStream: enableDirectStream, enableTranscoding: enableTranscoding, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets live playback media info for an item.
- POST /Items/{itemId}/PlaybackInfo
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"PlaySessionId" : "PlaySessionId",
"MediaSources" : [ {
"EncoderPath" : "EncoderPath",
"RequiredHttpHeaders" : {
"key" : "RequiredHttpHeaders"
},
"RunTimeTicks" : 5,
"MediaStreams" : [ {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
}, {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
} ],
"Size" : 5,
"Video3DFormat" : "",
"BufferMs" : 2,
"Timestamp" : "",
"Name" : "Name",
"RequiresOpening" : true,
"SupportsDirectStream" : true,
"VideoType" : "",
"RequiresClosing" : true,
"Container" : "Container",
"IsoType" : "",
"LiveStreamId" : "LiveStreamId",
"RequiresLooping" : true,
"Protocol" : "",
"DefaultSubtitleStreamIndex" : 8,
"GenPtsInput" : true,
"IsInfiniteStream" : true,
"Path" : "Path",
"IsRemote" : true,
"EncoderProtocol" : "",
"IgnoreIndex" : true,
"SupportsDirectPlay" : true,
"TranscodingSubProtocol" : "TranscodingSubProtocol",
"Formats" : [ "Formats", "Formats" ],
"AnalyzeDurationMs" : 9,
"Bitrate" : 9,
"OpenToken" : "OpenToken",
"SupportsProbing" : true,
"Type" : "",
"MediaAttachments" : [ {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
}, {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
} ],
"ReadAtNativeFramerate" : true,
"ETag" : "ETag",
"TranscodingContainer" : "TranscodingContainer",
"IgnoreDts" : true,
"TranscodingUrl" : "TranscodingUrl",
"Id" : "Id",
"SupportsTranscoding" : true,
"DefaultAudioStreamIndex" : 6
}, {
"EncoderPath" : "EncoderPath",
"RequiredHttpHeaders" : {
"key" : "RequiredHttpHeaders"
},
"RunTimeTicks" : 5,
"MediaStreams" : [ {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
}, {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
} ],
"Size" : 5,
"Video3DFormat" : "",
"BufferMs" : 2,
"Timestamp" : "",
"Name" : "Name",
"RequiresOpening" : true,
"SupportsDirectStream" : true,
"VideoType" : "",
"RequiresClosing" : true,
"Container" : "Container",
"IsoType" : "",
"LiveStreamId" : "LiveStreamId",
"RequiresLooping" : true,
"Protocol" : "",
"DefaultSubtitleStreamIndex" : 8,
"GenPtsInput" : true,
"IsInfiniteStream" : true,
"Path" : "Path",
"IsRemote" : true,
"EncoderProtocol" : "",
"IgnoreIndex" : true,
"SupportsDirectPlay" : true,
"TranscodingSubProtocol" : "TranscodingSubProtocol",
"Formats" : [ "Formats", "Formats" ],
"AnalyzeDurationMs" : 9,
"Bitrate" : 9,
"OpenToken" : "OpenToken",
"SupportsProbing" : true,
"Type" : "",
"MediaAttachments" : [ {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
}, {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
} ],
"ReadAtNativeFramerate" : true,
"ETag" : "ETag",
"TranscodingContainer" : "TranscodingContainer",
"IgnoreDts" : true,
"TranscodingUrl" : "TranscodingUrl",
"Id" : "Id",
"SupportsTranscoding" : true,
"DefaultAudioStreamIndex" : 6
} ],
"ErrorCode" : ""
}}]
- parameter itemId: (path) The item id.
- parameter body: (body) The playback info. (optional)
- parameter userId: (query) The user id. (optional)
- parameter maxStreamingBitrate: (query) The maximum streaming bitrate. (optional)
- parameter startTimeTicks: (query) The start time in ticks. (optional)
- parameter audioStreamIndex: (query) The audio stream index. (optional)
- parameter subtitleStreamIndex: (query) The subtitle stream index. (optional)
- parameter maxAudioChannels: (query) The maximum number of audio channels. (optional)
- parameter mediaSourceId: (query) The media source id. (optional)
- parameter liveStreamId: (query) The livestream id. (optional)
- parameter autoOpenLiveStream: (query) Whether to auto open the livestream. (optional)
- parameter enableDirectPlay: (query) Whether to enable direct play. Default: true. (optional)
- parameter enableDirectStream: (query) Whether to enable direct stream. Default: true. (optional)
- parameter enableTranscoding: (query) Whether to enable transcoding. Default: true. (optional)
- parameter allowVideoStreamCopy: (query) Whether to allow to copy the video stream. Default: true. (optional)
- parameter allowAudioStreamCopy: (query) Whether to allow to copy the audio stream. Default: true. (optional)
- returns: RequestBuilder<PlaybackInfoResponse>
*/
open class func getPostedPlaybackInfoWithRequestBuilder(itemId: UUID, body: ItemIdPlaybackInfoBody? = nil, userId: UUID? = nil, maxStreamingBitrate: Int? = nil, startTimeTicks: Int64? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, maxAudioChannels: Int? = nil, mediaSourceId: String? = nil, liveStreamId: String? = nil, autoOpenLiveStream: Bool? = nil, enableDirectPlay: Bool? = nil, enableDirectStream: Bool? = nil, enableTranscoding: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil) -> RequestBuilder<PlaybackInfoResponse> {
var path = "/Items/{itemId}/PlaybackInfo"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"userId": userId,
"maxStreamingBitrate": maxStreamingBitrate?.encodeToJSON(),
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"liveStreamId": liveStreamId,
"autoOpenLiveStream": autoOpenLiveStream,
"enableDirectPlay": enableDirectPlay,
"enableDirectStream": enableDirectStream,
"enableTranscoding": enableTranscoding,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy
])
let requestBuilder: RequestBuilder<PlaybackInfoResponse>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Opens a media source.
- parameter body: (body) The open live stream dto. (optional)
- parameter openToken: (query) The open token. (optional)
- parameter userId: (query) The user id. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter maxStreamingBitrate: (query) The maximum streaming bitrate. (optional)
- parameter startTimeTicks: (query) The start time in ticks. (optional)
- parameter audioStreamIndex: (query) The audio stream index. (optional)
- parameter subtitleStreamIndex: (query) The subtitle stream index. (optional)
- parameter maxAudioChannels: (query) The maximum number of audio channels. (optional)
- parameter itemId: (query) The item id. (optional)
- parameter enableDirectPlay: (query) Whether to enable direct play. Default: true. (optional)
- parameter enableDirectStream: (query) Whether to enable direct stream. Default: true. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func openLiveStream(body: LiveStreamsOpenBody? = nil, openToken: String? = nil, userId: UUID? = nil, playSessionId: String? = nil, maxStreamingBitrate: Int? = nil, startTimeTicks: Int64? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, maxAudioChannels: Int? = nil, itemId: UUID? = nil, enableDirectPlay: Bool? = nil, enableDirectStream: Bool? = nil, completion: @escaping ((_ data: LiveStreamResponse?,_ error: Error?) -> Void)) {
openLiveStreamWithRequestBuilder(body: body, openToken: openToken, userId: userId, playSessionId: playSessionId, maxStreamingBitrate: maxStreamingBitrate, startTimeTicks: startTimeTicks, audioStreamIndex: audioStreamIndex, subtitleStreamIndex: subtitleStreamIndex, maxAudioChannels: maxAudioChannels, itemId: itemId, enableDirectPlay: enableDirectPlay, enableDirectStream: enableDirectStream).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Opens a media source.
- POST /LiveStreams/Open
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"MediaSource" : ""
}}]
- parameter body: (body) The open live stream dto. (optional)
- parameter openToken: (query) The open token. (optional)
- parameter userId: (query) The user id. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter maxStreamingBitrate: (query) The maximum streaming bitrate. (optional)
- parameter startTimeTicks: (query) The start time in ticks. (optional)
- parameter audioStreamIndex: (query) The audio stream index. (optional)
- parameter subtitleStreamIndex: (query) The subtitle stream index. (optional)
- parameter maxAudioChannels: (query) The maximum number of audio channels. (optional)
- parameter itemId: (query) The item id. (optional)
- parameter enableDirectPlay: (query) Whether to enable direct play. Default: true. (optional)
- parameter enableDirectStream: (query) Whether to enable direct stream. Default: true. (optional)
- returns: RequestBuilder<LiveStreamResponse>
*/
open class func openLiveStreamWithRequestBuilder(body: LiveStreamsOpenBody? = nil, openToken: String? = nil, userId: UUID? = nil, playSessionId: String? = nil, maxStreamingBitrate: Int? = nil, startTimeTicks: Int64? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, maxAudioChannels: Int? = nil, itemId: UUID? = nil, enableDirectPlay: Bool? = nil, enableDirectStream: Bool? = nil) -> RequestBuilder<LiveStreamResponse> {
let path = "/LiveStreams/Open"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"openToken": openToken,
"userId": userId,
"playSessionId": playSessionId,
"maxStreamingBitrate": maxStreamingBitrate?.encodeToJSON(),
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"itemId": itemId,
"enableDirectPlay": enableDirectPlay,
"enableDirectStream": enableDirectStream
])
let requestBuilder: RequestBuilder<LiveStreamResponse>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,331 +0,0 @@
//
// NotificationsAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class NotificationsAPI {
/**
Sends a notification to all admins.
- parameter body: (body) The notification request.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func createAdminNotification(body: NotificationsAdminBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
createAdminNotificationWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Sends a notification to all admins.
- POST /Notifications/Admin
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The notification request.
- returns: RequestBuilder<Void>
*/
open class func createAdminNotificationWithRequestBuilder(body: NotificationsAdminBody) -> RequestBuilder<Void> {
let path = "/Notifications/Admin"
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)
}
/**
Gets notification services.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getNotificationServices(completion: @escaping ((_ data: [NameIdPair]?,_ error: Error?) -> Void)) {
getNotificationServicesWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets notification services.
- GET /Notifications/Services
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Id" : "Id",
"Name" : "Name"
}, {
"Id" : "Id",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[NameIdPair]>
*/
open class func getNotificationServicesWithRequestBuilder() -> RequestBuilder<[NameIdPair]> {
let path = "/Notifications/Services"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[NameIdPair]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets notification types.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getNotificationTypes(completion: @escaping ((_ data: [NotificationTypeInfo]?,_ error: Error?) -> Void)) {
getNotificationTypesWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets notification types.
- GET /Notifications/Types
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Type" : "Type",
"Category" : "Category",
"IsBasedOnUserEvent" : true,
"Enabled" : true,
"Name" : "Name"
}, {
"Type" : "Type",
"Category" : "Category",
"IsBasedOnUserEvent" : true,
"Enabled" : true,
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[NotificationTypeInfo]>
*/
open class func getNotificationTypesWithRequestBuilder() -> RequestBuilder<[NotificationTypeInfo]> {
let path = "/Notifications/Types"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[NotificationTypeInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a user's notifications.
- parameter userId: (path)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getNotifications(userId: String, completion: @escaping ((_ data: NotificationResultDto?,_ error: Error?) -> Void)) {
getNotificationsWithRequestBuilder(userId: userId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a user's notifications.
- GET /Notifications/{userId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"TotalRecordCount" : 0,
"Notifications" : [ {
"Description" : "Description",
"UserId" : "UserId",
"Level" : "",
"Id" : "Id",
"IsRead" : true,
"Date" : "2000-01-23T04:56:07.000+00:00",
"Url" : "Url",
"Name" : "Name"
}, {
"Description" : "Description",
"UserId" : "UserId",
"Level" : "",
"Id" : "Id",
"IsRead" : true,
"Date" : "2000-01-23T04:56:07.000+00:00",
"Url" : "Url",
"Name" : "Name"
} ]
}}]
- parameter userId: (path)
- returns: RequestBuilder<NotificationResultDto>
*/
open class func getNotificationsWithRequestBuilder(userId: String) -> RequestBuilder<NotificationResultDto> {
var path = "/Notifications/{userId}"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<NotificationResultDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a user's notification summary.
- parameter userId: (path)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getNotificationsSummary(userId: String, completion: @escaping ((_ data: NotificationsSummaryDto?,_ error: Error?) -> Void)) {
getNotificationsSummaryWithRequestBuilder(userId: userId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a user's notification summary.
- GET /Notifications/{userId}/Summary
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"MaxUnreadNotificationLevel" : "",
"UnreadCount" : 0
}}]
- parameter userId: (path)
- returns: RequestBuilder<NotificationsSummaryDto>
*/
open class func getNotificationsSummaryWithRequestBuilder(userId: String) -> RequestBuilder<NotificationsSummaryDto> {
var path = "/Notifications/{userId}/Summary"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<NotificationsSummaryDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Sets notifications as read.
- parameter userId: (path)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func setRead(userId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
setReadWithRequestBuilder(userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Sets notifications as read.
- POST /Notifications/{userId}/Read
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter userId: (path)
- returns: RequestBuilder<Void>
*/
open class func setReadWithRequestBuilder(userId: String) -> RequestBuilder<Void> {
var path = "/Notifications/{userId}/Read"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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)
}
/**
Sets notifications as unread.
- parameter userId: (path)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func setUnread(userId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
setUnreadWithRequestBuilder(userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Sets notifications as unread.
- POST /Notifications/{userId}/Unread
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter userId: (path)
- returns: RequestBuilder<Void>
*/
open class func setUnreadWithRequestBuilder(userId: String) -> RequestBuilder<Void> {
var path = "/Notifications/{userId}/Unread"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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)
}
}

View File

@ -1,360 +0,0 @@
//
// PackageAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class PackageAPI {
/**
Cancels a package installation.
- parameter packageId: (path) Installation Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func cancelPackageInstallation(packageId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
cancelPackageInstallationWithRequestBuilder(packageId: packageId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Cancels a package installation.
- DELETE /Packages/Installing/{packageId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter packageId: (path) Installation Id.
- returns: RequestBuilder<Void>
*/
open class func cancelPackageInstallationWithRequestBuilder(packageId: UUID) -> RequestBuilder<Void> {
var path = "/Packages/Installing/{packageId}"
let packageIdPreEscape = "\(packageId)"
let packageIdPostEscape = packageIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{packageId}", with: packageIdPostEscape, options: .literal, range: nil)
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: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a package by name or assembly GUID.
- parameter name: (path) The name of the package.
- parameter assemblyGuid: (query) The GUID of the associated assembly. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPackageInfo(name: String, assemblyGuid: UUID? = nil, completion: @escaping ((_ data: PackageInfo?,_ error: Error?) -> Void)) {
getPackageInfoWithRequestBuilder(name: name, assemblyGuid: assemblyGuid).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a package by name or assembly GUID.
- GET /Packages/{name}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"owner" : "owner",
"overview" : "overview",
"versions" : [ {
"sourceUrl" : "sourceUrl",
"targetAbi" : "targetAbi",
"checksum" : "checksum",
"changelog" : "changelog",
"repositoryName" : "repositoryName",
"version" : "version",
"VersionNumber" : "",
"timestamp" : "timestamp",
"repositoryUrl" : "repositoryUrl"
}, {
"sourceUrl" : "sourceUrl",
"targetAbi" : "targetAbi",
"checksum" : "checksum",
"changelog" : "changelog",
"repositoryName" : "repositoryName",
"version" : "version",
"VersionNumber" : "",
"timestamp" : "timestamp",
"repositoryUrl" : "repositoryUrl"
} ],
"imageUrl" : "imageUrl",
"name" : "name",
"description" : "description",
"guid" : "guid",
"category" : "category"
}}]
- parameter name: (path) The name of the package.
- parameter assemblyGuid: (query) The GUID of the associated assembly. (optional)
- returns: RequestBuilder<PackageInfo>
*/
open class func getPackageInfoWithRequestBuilder(name: String, assemblyGuid: UUID? = nil) -> RequestBuilder<PackageInfo> {
var path = "/Packages/{name}"
let namePreEscape = "\(name)"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"assemblyGuid": assemblyGuid
])
let requestBuilder: RequestBuilder<PackageInfo>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets available packages.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPackages(completion: @escaping ((_ data: [PackageInfo]?,_ error: Error?) -> Void)) {
getPackagesWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets available packages.
- GET /Packages
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"owner" : "owner",
"overview" : "overview",
"versions" : [ {
"sourceUrl" : "sourceUrl",
"targetAbi" : "targetAbi",
"checksum" : "checksum",
"changelog" : "changelog",
"repositoryName" : "repositoryName",
"version" : "version",
"VersionNumber" : "",
"timestamp" : "timestamp",
"repositoryUrl" : "repositoryUrl"
}, {
"sourceUrl" : "sourceUrl",
"targetAbi" : "targetAbi",
"checksum" : "checksum",
"changelog" : "changelog",
"repositoryName" : "repositoryName",
"version" : "version",
"VersionNumber" : "",
"timestamp" : "timestamp",
"repositoryUrl" : "repositoryUrl"
} ],
"imageUrl" : "imageUrl",
"name" : "name",
"description" : "description",
"guid" : "guid",
"category" : "category"
}, {
"owner" : "owner",
"overview" : "overview",
"versions" : [ {
"sourceUrl" : "sourceUrl",
"targetAbi" : "targetAbi",
"checksum" : "checksum",
"changelog" : "changelog",
"repositoryName" : "repositoryName",
"version" : "version",
"VersionNumber" : "",
"timestamp" : "timestamp",
"repositoryUrl" : "repositoryUrl"
}, {
"sourceUrl" : "sourceUrl",
"targetAbi" : "targetAbi",
"checksum" : "checksum",
"changelog" : "changelog",
"repositoryName" : "repositoryName",
"version" : "version",
"VersionNumber" : "",
"timestamp" : "timestamp",
"repositoryUrl" : "repositoryUrl"
} ],
"imageUrl" : "imageUrl",
"name" : "name",
"description" : "description",
"guid" : "guid",
"category" : "category"
} ]}]
- returns: RequestBuilder<[PackageInfo]>
*/
open class func getPackagesWithRequestBuilder() -> RequestBuilder<[PackageInfo]> {
let path = "/Packages"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[PackageInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets all package repositories.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getRepositories(completion: @escaping ((_ data: [RepositoryInfo]?,_ error: Error?) -> Void)) {
getRepositoriesWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets all package repositories.
- GET /Repositories
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Enabled" : true,
"Url" : "Url",
"Name" : "Name"
}, {
"Enabled" : true,
"Url" : "Url",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[RepositoryInfo]>
*/
open class func getRepositoriesWithRequestBuilder() -> RequestBuilder<[RepositoryInfo]> {
let path = "/Repositories"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[RepositoryInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Installs a package.
- parameter name: (path) Package name.
- parameter assemblyGuid: (query) GUID of the associated assembly. (optional)
- parameter version: (query) Optional version. Defaults to latest version. (optional)
- parameter repositoryUrl: (query) Optional. Specify the repository to install from. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func installPackage(name: String, assemblyGuid: UUID? = nil, version: String? = nil, repositoryUrl: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
installPackageWithRequestBuilder(name: name, assemblyGuid: assemblyGuid, version: version, repositoryUrl: repositoryUrl).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Installs a package.
- POST /Packages/Installed/{name}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter name: (path) Package name.
- parameter assemblyGuid: (query) GUID of the associated assembly. (optional)
- parameter version: (query) Optional version. Defaults to latest version. (optional)
- parameter repositoryUrl: (query) Optional. Specify the repository to install from. (optional)
- returns: RequestBuilder<Void>
*/
open class func installPackageWithRequestBuilder(name: String, assemblyGuid: UUID? = nil, version: String? = nil, repositoryUrl: String? = nil) -> RequestBuilder<Void> {
var path = "/Packages/Installed/{name}"
let namePreEscape = "\(name)"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"assemblyGuid": assemblyGuid,
"version": version,
"repositoryUrl": repositoryUrl
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Sets the enabled and existing package repositories.
- parameter body: (body) The list of package repositories.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func setRepositories(body: [RepositoryInfo], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
setRepositoriesWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Sets the enabled and existing package repositories.
- POST /Repositories
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The list of package repositories.
- returns: RequestBuilder<Void>
*/
open class func setRepositoriesWithRequestBuilder(body: [RepositoryInfo]) -> RequestBuilder<Void> {
let path = "/Repositories"
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)
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,514 +0,0 @@
//
// PlaystateAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class PlaystateAPI {
/**
Marks an item as played for user.
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- parameter datePlayed: (query) Optional. The date the item was played. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func markPlayedItem(userId: UUID, itemId: UUID, datePlayed: Date? = nil, completion: @escaping ((_ data: UserItemDataDto?,_ error: Error?) -> Void)) {
markPlayedItemWithRequestBuilder(userId: userId, itemId: itemId, datePlayed: datePlayed).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Marks an item as played for user.
- POST /Users/{userId}/PlayedItems/{itemId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"UnplayedItemCount" : 1,
"Played" : true,
"PlayedPercentage" : 6.027456183070403,
"Rating" : 0.8008281904610115,
"PlayCount" : 5,
"PlaybackPositionTicks" : 5,
"LastPlayedDate" : "2000-01-23T04:56:07.000+00:00",
"Likes" : true,
"IsFavorite" : true,
"ItemId" : "ItemId",
"Key" : "Key"
}}]
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- parameter datePlayed: (query) Optional. The date the item was played. (optional)
- returns: RequestBuilder<UserItemDataDto>
*/
open class func markPlayedItemWithRequestBuilder(userId: UUID, itemId: UUID, datePlayed: Date? = nil) -> RequestBuilder<UserItemDataDto> {
var path = "/Users/{userId}/PlayedItems/{itemId}"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"datePlayed": datePlayed?.encodeToJSON()
])
let requestBuilder: RequestBuilder<UserItemDataDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Marks an item as unplayed for user.
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func markUnplayedItem(userId: UUID, itemId: UUID, completion: @escaping ((_ data: UserItemDataDto?,_ error: Error?) -> Void)) {
markUnplayedItemWithRequestBuilder(userId: userId, itemId: itemId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Marks an item as unplayed for user.
- DELETE /Users/{userId}/PlayedItems/{itemId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"UnplayedItemCount" : 1,
"Played" : true,
"PlayedPercentage" : 6.027456183070403,
"Rating" : 0.8008281904610115,
"PlayCount" : 5,
"PlaybackPositionTicks" : 5,
"LastPlayedDate" : "2000-01-23T04:56:07.000+00:00",
"Likes" : true,
"IsFavorite" : true,
"ItemId" : "ItemId",
"Key" : "Key"
}}]
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- returns: RequestBuilder<UserItemDataDto>
*/
open class func markUnplayedItemWithRequestBuilder(userId: UUID, itemId: UUID) -> RequestBuilder<UserItemDataDto> {
var path = "/Users/{userId}/PlayedItems/{itemId}"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<UserItemDataDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Reports a user's playback progress.
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- parameter mediaSourceId: (query) The id of the MediaSource. (optional)
- parameter positionTicks: (query) Optional. The current position, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter audioStreamIndex: (query) The audio stream index. (optional)
- parameter subtitleStreamIndex: (query) The subtitle stream index. (optional)
- parameter volumeLevel: (query) Scale of 0-100. (optional)
- parameter playMethod: (query) The play method. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter repeatMode: (query) The repeat mode. (optional)
- parameter isPaused: (query) Indicates if the player is paused. (optional, default to false)
- parameter isMuted: (query) Indicates if the player is muted. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func onPlaybackProgress(userId: UUID, itemId: UUID, mediaSourceId: String? = nil, positionTicks: Int64? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, volumeLevel: Int? = nil, playMethod: PlayMethod1? = nil, liveStreamId: String? = nil, playSessionId: String? = nil, repeatMode: RepeatMode? = nil, isPaused: Bool? = nil, isMuted: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
onPlaybackProgressWithRequestBuilder(userId: userId, itemId: itemId, mediaSourceId: mediaSourceId, positionTicks: positionTicks, audioStreamIndex: audioStreamIndex, subtitleStreamIndex: subtitleStreamIndex, volumeLevel: volumeLevel, playMethod: playMethod, liveStreamId: liveStreamId, playSessionId: playSessionId, repeatMode: repeatMode, isPaused: isPaused, isMuted: isMuted).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Reports a user's playback progress.
- POST /Users/{userId}/PlayingItems/{itemId}/Progress
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- parameter mediaSourceId: (query) The id of the MediaSource. (optional)
- parameter positionTicks: (query) Optional. The current position, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter audioStreamIndex: (query) The audio stream index. (optional)
- parameter subtitleStreamIndex: (query) The subtitle stream index. (optional)
- parameter volumeLevel: (query) Scale of 0-100. (optional)
- parameter playMethod: (query) The play method. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter repeatMode: (query) The repeat mode. (optional)
- parameter isPaused: (query) Indicates if the player is paused. (optional, default to false)
- parameter isMuted: (query) Indicates if the player is muted. (optional, default to false)
- returns: RequestBuilder<Void>
*/
open class func onPlaybackProgressWithRequestBuilder(userId: UUID, itemId: UUID, mediaSourceId: String? = nil, positionTicks: Int64? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, volumeLevel: Int? = nil, playMethod: PlayMethod1? = nil, liveStreamId: String? = nil, playSessionId: String? = nil, repeatMode: RepeatMode? = nil, isPaused: Bool? = nil, isMuted: Bool? = nil) -> RequestBuilder<Void> {
var path = "/Users/{userId}/PlayingItems/{itemId}/Progress"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"mediaSourceId": mediaSourceId,
"positionTicks": positionTicks?.encodeToJSON(),
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"volumeLevel": volumeLevel?.encodeToJSON(),
"playMethod": playMethod,
"liveStreamId": liveStreamId,
"playSessionId": playSessionId,
"repeatMode": repeatMode,
"isPaused": isPaused,
"isMuted": isMuted
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Reports that a user has begun playing an item.
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- parameter mediaSourceId: (query) The id of the MediaSource. (optional)
- parameter audioStreamIndex: (query) The audio stream index. (optional)
- parameter subtitleStreamIndex: (query) The subtitle stream index. (optional)
- parameter playMethod: (query) The play method. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter canSeek: (query) Indicates if the client can seek. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func onPlaybackStart(userId: UUID, itemId: UUID, mediaSourceId: String? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, playMethod: PlayMethod? = nil, liveStreamId: String? = nil, playSessionId: String? = nil, canSeek: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
onPlaybackStartWithRequestBuilder(userId: userId, itemId: itemId, mediaSourceId: mediaSourceId, audioStreamIndex: audioStreamIndex, subtitleStreamIndex: subtitleStreamIndex, playMethod: playMethod, liveStreamId: liveStreamId, playSessionId: playSessionId, canSeek: canSeek).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Reports that a user has begun playing an item.
- POST /Users/{userId}/PlayingItems/{itemId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- parameter mediaSourceId: (query) The id of the MediaSource. (optional)
- parameter audioStreamIndex: (query) The audio stream index. (optional)
- parameter subtitleStreamIndex: (query) The subtitle stream index. (optional)
- parameter playMethod: (query) The play method. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter canSeek: (query) Indicates if the client can seek. (optional, default to false)
- returns: RequestBuilder<Void>
*/
open class func onPlaybackStartWithRequestBuilder(userId: UUID, itemId: UUID, mediaSourceId: String? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, playMethod: PlayMethod? = nil, liveStreamId: String? = nil, playSessionId: String? = nil, canSeek: Bool? = nil) -> RequestBuilder<Void> {
var path = "/Users/{userId}/PlayingItems/{itemId}"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"mediaSourceId": mediaSourceId,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"playMethod": playMethod,
"liveStreamId": liveStreamId,
"playSessionId": playSessionId,
"canSeek": canSeek
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Reports that a user has stopped playing an item.
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- parameter mediaSourceId: (query) The id of the MediaSource. (optional)
- parameter nextMediaType: (query) The next media type that will play. (optional)
- parameter positionTicks: (query) Optional. The position, in ticks, where playback stopped. 1 tick &#x3D; 10000 ms. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func onPlaybackStopped(userId: UUID, itemId: UUID, mediaSourceId: String? = nil, nextMediaType: String? = nil, positionTicks: Int64? = nil, liveStreamId: String? = nil, playSessionId: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
onPlaybackStoppedWithRequestBuilder(userId: userId, itemId: itemId, mediaSourceId: mediaSourceId, nextMediaType: nextMediaType, positionTicks: positionTicks, liveStreamId: liveStreamId, playSessionId: playSessionId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Reports that a user has stopped playing an item.
- DELETE /Users/{userId}/PlayingItems/{itemId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter userId: (path) User id.
- parameter itemId: (path) Item id.
- parameter mediaSourceId: (query) The id of the MediaSource. (optional)
- parameter nextMediaType: (query) The next media type that will play. (optional)
- parameter positionTicks: (query) Optional. The position, in ticks, where playback stopped. 1 tick &#x3D; 10000 ms. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- returns: RequestBuilder<Void>
*/
open class func onPlaybackStoppedWithRequestBuilder(userId: UUID, itemId: UUID, mediaSourceId: String? = nil, nextMediaType: String? = nil, positionTicks: Int64? = nil, liveStreamId: String? = nil, playSessionId: String? = nil) -> RequestBuilder<Void> {
var path = "/Users/{userId}/PlayingItems/{itemId}"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"mediaSourceId": mediaSourceId,
"nextMediaType": nextMediaType,
"positionTicks": positionTicks?.encodeToJSON(),
"liveStreamId": liveStreamId,
"playSessionId": playSessionId
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Pings a playback session.
- parameter playSessionId: (query) Playback session id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func pingPlaybackSession(playSessionId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
pingPlaybackSessionWithRequestBuilder(playSessionId: playSessionId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Pings a playback session.
- POST /Sessions/Playing/Ping
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter playSessionId: (query) Playback session id.
- returns: RequestBuilder<Void>
*/
open class func pingPlaybackSessionWithRequestBuilder(playSessionId: String) -> RequestBuilder<Void> {
let path = "/Sessions/Playing/Ping"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"playSessionId": playSessionId
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Reports playback progress within a session.
- parameter body: (body) The playback progress info. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func reportPlaybackProgress(body: PlayingProgressBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
reportPlaybackProgressWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Reports playback progress within a session.
- POST /Sessions/Playing/Progress
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The playback progress info. (optional)
- returns: RequestBuilder<Void>
*/
open class func reportPlaybackProgressWithRequestBuilder(body: PlayingProgressBody? = nil) -> RequestBuilder<Void> {
let path = "/Sessions/Playing/Progress"
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)
}
/**
Reports playback has started within a session.
- parameter body: (body) The playback start info. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func reportPlaybackStart(body: SessionsPlayingBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
reportPlaybackStartWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Reports playback has started within a session.
- POST /Sessions/Playing
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The playback start info. (optional)
- returns: RequestBuilder<Void>
*/
open class func reportPlaybackStartWithRequestBuilder(body: SessionsPlayingBody? = nil) -> RequestBuilder<Void> {
let path = "/Sessions/Playing"
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)
}
/**
Reports playback has stopped within a session.
- parameter body: (body) The playback stop info. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func reportPlaybackStopped(body: PlayingStoppedBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
reportPlaybackStoppedWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Reports playback has stopped within a session.
- POST /Sessions/Playing/Stopped
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The playback stop info. (optional)
- returns: RequestBuilder<Void>
*/
open class func reportPlaybackStoppedWithRequestBuilder(body: PlayingStoppedBody? = nil) -> RequestBuilder<Void> {
let path = "/Sessions/Playing/Stopped"
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)
}
}

View File

@ -1,463 +0,0 @@
//
// PluginsAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class PluginsAPI {
/**
Disable a plugin.
- parameter pluginId: (path) Plugin id.
- parameter version: (path) Plugin version.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func disablePlugin(pluginId: UUID, version: Version1, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
disablePluginWithRequestBuilder(pluginId: pluginId, version: version).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Disable a plugin.
- POST /Plugins/{pluginId}/{version}/Disable
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter pluginId: (path) Plugin id.
- parameter version: (path) Plugin version.
- returns: RequestBuilder<Void>
*/
open class func disablePluginWithRequestBuilder(pluginId: UUID, version: Version1) -> RequestBuilder<Void> {
var path = "/Plugins/{pluginId}/{version}/Disable"
let pluginIdPreEscape = "\(pluginId)"
let pluginIdPostEscape = pluginIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{pluginId}", with: pluginIdPostEscape, options: .literal, range: nil)
let versionPreEscape = "\(version)"
let versionPostEscape = versionPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{version}", with: versionPostEscape, options: .literal, range: nil)
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)
}
/**
Enables a disabled plugin.
- parameter pluginId: (path) Plugin id.
- parameter version: (path) Plugin version.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func enablePlugin(pluginId: UUID, version: Version2, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
enablePluginWithRequestBuilder(pluginId: pluginId, version: version).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Enables a disabled plugin.
- POST /Plugins/{pluginId}/{version}/Enable
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter pluginId: (path) Plugin id.
- parameter version: (path) Plugin version.
- returns: RequestBuilder<Void>
*/
open class func enablePluginWithRequestBuilder(pluginId: UUID, version: Version2) -> RequestBuilder<Void> {
var path = "/Plugins/{pluginId}/{version}/Enable"
let pluginIdPreEscape = "\(pluginId)"
let pluginIdPostEscape = pluginIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{pluginId}", with: pluginIdPostEscape, options: .literal, range: nil)
let versionPreEscape = "\(version)"
let versionPostEscape = versionPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{version}", with: versionPostEscape, options: .literal, range: nil)
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 plugin configuration.
- parameter pluginId: (path) Plugin id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPluginConfiguration(pluginId: UUID, completion: @escaping ((_ data: BasePluginConfiguration?,_ error: Error?) -> Void)) {
getPluginConfigurationWithRequestBuilder(pluginId: pluginId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets plugin configuration.
- GET /Plugins/{pluginId}/Configuration
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={ }}]
- parameter pluginId: (path) Plugin id.
- returns: RequestBuilder<BasePluginConfiguration>
*/
open class func getPluginConfigurationWithRequestBuilder(pluginId: UUID) -> RequestBuilder<BasePluginConfiguration> {
var path = "/Plugins/{pluginId}/Configuration"
let pluginIdPreEscape = "\(pluginId)"
let pluginIdPostEscape = pluginIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{pluginId}", with: pluginIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<BasePluginConfiguration>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a plugin's image.
- parameter pluginId: (path) Plugin id.
- parameter version: (path) Plugin version.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPluginImage(pluginId: UUID, version: Version3, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getPluginImageWithRequestBuilder(pluginId: pluginId, version: version).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a plugin's image.
- GET /Plugins/{pluginId}/{version}/Image
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter pluginId: (path) Plugin id.
- parameter version: (path) Plugin version.
- returns: RequestBuilder<Data>
*/
open class func getPluginImageWithRequestBuilder(pluginId: UUID, version: Version3) -> RequestBuilder<Data> {
var path = "/Plugins/{pluginId}/{version}/Image"
let pluginIdPreEscape = "\(pluginId)"
let pluginIdPostEscape = pluginIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{pluginId}", with: pluginIdPostEscape, options: .literal, range: nil)
let versionPreEscape = "\(version)"
let versionPostEscape = versionPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{version}", with: versionPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a plugin's manifest.
- parameter pluginId: (path) Plugin id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPluginManifest(pluginId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
getPluginManifestWithRequestBuilder(pluginId: pluginId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Gets a plugin's manifest.
- POST /Plugins/{pluginId}/Manifest
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter pluginId: (path) Plugin id.
- returns: RequestBuilder<Void>
*/
open class func getPluginManifestWithRequestBuilder(pluginId: UUID) -> RequestBuilder<Void> {
var path = "/Plugins/{pluginId}/Manifest"
let pluginIdPreEscape = "\(pluginId)"
let pluginIdPostEscape = pluginIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{pluginId}", with: pluginIdPostEscape, options: .literal, range: nil)
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 a list of currently installed plugins.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPlugins(completion: @escaping ((_ data: [PluginInfo]?,_ error: Error?) -> Void)) {
getPluginsWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a list of currently installed plugins.
- GET /Plugins
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Status" : "",
"Description" : "Description",
"Version" : "",
"HasImage" : true,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ConfigurationFileName" : "ConfigurationFileName",
"CanUninstall" : true,
"Name" : "Name"
}, {
"Status" : "",
"Description" : "Description",
"Version" : "",
"HasImage" : true,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ConfigurationFileName" : "ConfigurationFileName",
"CanUninstall" : true,
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[PluginInfo]>
*/
open class func getPluginsWithRequestBuilder() -> RequestBuilder<[PluginInfo]> {
let path = "/Plugins"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[PluginInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Uninstalls a plugin.
- parameter pluginId: (path) Plugin id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func uninstallPlugin(pluginId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
uninstallPluginWithRequestBuilder(pluginId: pluginId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Uninstalls a plugin.
- DELETE /Plugins/{pluginId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter pluginId: (path) Plugin id.
- returns: RequestBuilder<Void>
*/
open class func uninstallPluginWithRequestBuilder(pluginId: UUID) -> RequestBuilder<Void> {
var path = "/Plugins/{pluginId}"
let pluginIdPreEscape = "\(pluginId)"
let pluginIdPostEscape = pluginIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{pluginId}", with: pluginIdPostEscape, options: .literal, range: nil)
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: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Uninstalls a plugin by version.
- parameter pluginId: (path) Plugin id.
- parameter version: (path) Plugin version.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func uninstallPluginByVersion(pluginId: UUID, version: Version, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
uninstallPluginByVersionWithRequestBuilder(pluginId: pluginId, version: version).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Uninstalls a plugin by version.
- DELETE /Plugins/{pluginId}/{version}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter pluginId: (path) Plugin id.
- parameter version: (path) Plugin version.
- returns: RequestBuilder<Void>
*/
open class func uninstallPluginByVersionWithRequestBuilder(pluginId: UUID, version: Version) -> RequestBuilder<Void> {
var path = "/Plugins/{pluginId}/{version}"
let pluginIdPreEscape = "\(pluginId)"
let pluginIdPostEscape = pluginIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{pluginId}", with: pluginIdPostEscape, options: .literal, range: nil)
let versionPreEscape = "\(version)"
let versionPostEscape = versionPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{version}", with: versionPostEscape, options: .literal, range: nil)
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: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Updates plugin configuration.
- parameter pluginId: (path) Plugin id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updatePluginConfiguration(pluginId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updatePluginConfigurationWithRequestBuilder(pluginId: pluginId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates plugin configuration.
- POST /Plugins/{pluginId}/Configuration
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter pluginId: (path) Plugin id.
- returns: RequestBuilder<Void>
*/
open class func updatePluginConfigurationWithRequestBuilder(pluginId: UUID) -> RequestBuilder<Void> {
var path = "/Plugins/{pluginId}/Configuration"
let pluginIdPreEscape = "\(pluginId)"
let pluginIdPostEscape = pluginIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{pluginId}", with: pluginIdPostEscape, options: .literal, range: nil)
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)
}
/**
Updates plugin security info.
- parameter body: (body) Plugin security info.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updatePluginSecurityInfo(body: PluginsSecurityInfoBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updatePluginSecurityInfoWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates plugin security info.
- POST /Plugins/SecurityInfo
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) Plugin security info.
- returns: RequestBuilder<Void>
*/
open class func updatePluginSecurityInfoWithRequestBuilder(body: PluginsSecurityInfoBody) -> RequestBuilder<Void> {
let path = "/Plugins/SecurityInfo"
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)
}
}

View File

@ -1,284 +0,0 @@
//
// QuickConnectAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class QuickConnectAPI {
/**
Temporarily activates quick connect for five minutes.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func activate(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
activateWithRequestBuilder().execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Temporarily activates quick connect for five minutes.
- POST /QuickConnect/Activate
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- returns: RequestBuilder<Void>
*/
open class func activateWithRequestBuilder() -> RequestBuilder<Void> {
let path = "/QuickConnect/Activate"
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)
}
/**
Authorizes a pending quick connect request.
- parameter code: (query) Quick connect code to authorize.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func authorize(code: String, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) {
authorizeWithRequestBuilder(code: code).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Authorizes a pending quick connect request.
- POST /QuickConnect/Authorize
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=true}]
- parameter code: (query) Quick connect code to authorize.
- returns: RequestBuilder<Bool>
*/
open class func authorizeWithRequestBuilder(code: String) -> RequestBuilder<Bool> {
let path = "/QuickConnect/Authorize"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"code": code
])
let requestBuilder: RequestBuilder<Bool>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Enables or disables quick connect.
- parameter status: (query) New MediaBrowser.Model.QuickConnect.QuickConnectState. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func available(status: Status2? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
availableWithRequestBuilder(status: status).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Enables or disables quick connect.
- POST /QuickConnect/Available
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter status: (query) New MediaBrowser.Model.QuickConnect.QuickConnectState. (optional)
- returns: RequestBuilder<Void>
*/
open class func availableWithRequestBuilder(status: Status2? = nil) -> RequestBuilder<Void> {
let path = "/QuickConnect/Available"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"status": status
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Attempts to retrieve authentication information.
- parameter secret: (query) Secret previously returned from the Initiate endpoint.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func connect(secret: String, completion: @escaping ((_ data: QuickConnectResult?,_ error: Error?) -> Void)) {
connectWithRequestBuilder(secret: secret).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Attempts to retrieve authentication information.
- GET /QuickConnect/Connect
-
- examples: [{contentType=application/json, example={
"Secret" : "Secret",
"Authenticated" : true,
"Authentication" : "Authentication",
"Error" : "Error",
"DateAdded" : "2000-01-23T04:56:07.000+00:00",
"Code" : "Code"
}}]
- parameter secret: (query) Secret previously returned from the Initiate endpoint.
- returns: RequestBuilder<QuickConnectResult>
*/
open class func connectWithRequestBuilder(secret: String) -> RequestBuilder<QuickConnectResult> {
let path = "/QuickConnect/Connect"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"secret": secret
])
let requestBuilder: RequestBuilder<QuickConnectResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Deauthorize all quick connect devices for the current user.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func deauthorize(completion: @escaping ((_ data: Int?,_ error: Error?) -> Void)) {
deauthorizeWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Deauthorize all quick connect devices for the current user.
- POST /QuickConnect/Deauthorize
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=0}]
- returns: RequestBuilder<Int>
*/
open class func deauthorizeWithRequestBuilder() -> RequestBuilder<Int> {
let path = "/QuickConnect/Deauthorize"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Int>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets the current quick connect state.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getStatus(completion: @escaping ((_ data: QuickConnectState?,_ error: Error?) -> Void)) {
getStatusWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the current quick connect state.
- GET /QuickConnect/Status
-
- examples: [{contentType=application/json, example="Unavailable"}]
- returns: RequestBuilder<QuickConnectState>
*/
open class func getStatusWithRequestBuilder() -> RequestBuilder<QuickConnectState> {
let path = "/QuickConnect/Status"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<QuickConnectState>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Initiate a new quick connect request.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func initiate(completion: @escaping ((_ data: QuickConnectResult?,_ error: Error?) -> Void)) {
initiateWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Initiate a new quick connect request.
- GET /QuickConnect/Initiate
-
- examples: [{contentType=application/json, example={
"Secret" : "Secret",
"Authenticated" : true,
"Authentication" : "Authentication",
"Error" : "Error",
"DateAdded" : "2000-01-23T04:56:07.000+00:00",
"Code" : "Code"
}}]
- returns: RequestBuilder<QuickConnectResult>
*/
open class func initiateWithRequestBuilder() -> RequestBuilder<QuickConnectResult> {
let path = "/QuickConnect/Initiate"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<QuickConnectResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

View File

@ -1,193 +0,0 @@
//
// RemoteImageAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class RemoteImageAPI {
/**
Downloads a remote image for an item.
- parameter itemId: (path) Item Id.
- parameter type: (query) The image type.
- parameter imageUrl: (query) The image url. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func downloadRemoteImage(itemId: UUID, type: Type2, imageUrl: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
downloadRemoteImageWithRequestBuilder(itemId: itemId, type: type, imageUrl: imageUrl).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Downloads a remote image for an item.
- POST /Items/{itemId}/RemoteImages/Download
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter itemId: (path) Item Id.
- parameter type: (query) The image type.
- parameter imageUrl: (query) The image url. (optional)
- returns: RequestBuilder<Void>
*/
open class func downloadRemoteImageWithRequestBuilder(itemId: UUID, type: Type2, imageUrl: String? = nil) -> RequestBuilder<Void> {
var path = "/Items/{itemId}/RemoteImages/Download"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"type": type,
"imageUrl": imageUrl
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets available remote image providers for an item.
- parameter itemId: (path) Item Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getRemoteImageProviders(itemId: UUID, completion: @escaping ((_ data: [ImageProviderInfo]?,_ error: Error?) -> Void)) {
getRemoteImageProvidersWithRequestBuilder(itemId: itemId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets available remote image providers for an item.
- GET /Items/{itemId}/RemoteImages/Providers
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"SupportedImages" : [ "Primary", "Primary" ],
"Name" : "Name"
}, {
"SupportedImages" : [ "Primary", "Primary" ],
"Name" : "Name"
} ]}]
- parameter itemId: (path) Item Id.
- returns: RequestBuilder<[ImageProviderInfo]>
*/
open class func getRemoteImageProvidersWithRequestBuilder(itemId: UUID) -> RequestBuilder<[ImageProviderInfo]> {
var path = "/Items/{itemId}/RemoteImages/Providers"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[ImageProviderInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets available remote images for an item.
- parameter itemId: (path) Item Id.
- parameter type: (query) The image type. (optional)
- parameter startIndex: (query) Optional. The record index to start at. All items with a lower index will be dropped from the results. (optional)
- parameter limit: (query) Optional. The maximum number of records to return. (optional)
- parameter providerName: (query) Optional. The image provider to use. (optional)
- parameter includeAllLanguages: (query) Optional. Include all languages. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getRemoteImages(itemId: UUID, type: Type1? = nil, startIndex: Int? = nil, limit: Int? = nil, providerName: String? = nil, includeAllLanguages: Bool? = nil, completion: @escaping ((_ data: RemoteImageResult?,_ error: Error?) -> Void)) {
getRemoteImagesWithRequestBuilder(itemId: itemId, type: type, startIndex: startIndex, limit: limit, providerName: providerName, includeAllLanguages: includeAllLanguages).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets available remote images for an item.
- GET /Items/{itemId}/RemoteImages
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"TotalRecordCount" : 5,
"Images" : [ {
"ProviderName" : "ProviderName",
"Type" : "",
"ThumbnailUrl" : "ThumbnailUrl",
"Language" : "Language",
"RatingType" : "",
"VoteCount" : 5,
"CommunityRating" : 1.4658129805029452,
"Height" : 0,
"Width" : 6,
"Url" : "Url"
}, {
"ProviderName" : "ProviderName",
"Type" : "",
"ThumbnailUrl" : "ThumbnailUrl",
"Language" : "Language",
"RatingType" : "",
"VoteCount" : 5,
"CommunityRating" : 1.4658129805029452,
"Height" : 0,
"Width" : 6,
"Url" : "Url"
} ],
"Providers" : [ "Providers", "Providers" ]
}}]
- parameter itemId: (path) Item Id.
- parameter type: (query) The image type. (optional)
- parameter startIndex: (query) Optional. The record index to start at. All items with a lower index will be dropped from the results. (optional)
- parameter limit: (query) Optional. The maximum number of records to return. (optional)
- parameter providerName: (query) Optional. The image provider to use. (optional)
- parameter includeAllLanguages: (query) Optional. Include all languages. (optional, default to false)
- returns: RequestBuilder<RemoteImageResult>
*/
open class func getRemoteImagesWithRequestBuilder(itemId: UUID, type: Type1? = nil, startIndex: Int? = nil, limit: Int? = nil, providerName: String? = nil, includeAllLanguages: Bool? = nil) -> RequestBuilder<RemoteImageResult> {
var path = "/Items/{itemId}/RemoteImages"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"type": type,
"startIndex": startIndex?.encodeToJSON(),
"limit": limit?.encodeToJSON(),
"providerName": providerName,
"includeAllLanguages": includeAllLanguages
])
let requestBuilder: RequestBuilder<RemoteImageResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

View File

@ -1,296 +0,0 @@
//
// ScheduledTasksAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class ScheduledTasksAPI {
/**
Get task by id.
- parameter taskId: (path) Task Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getTask(taskId: String, completion: @escaping ((_ data: TaskInfo?,_ error: Error?) -> Void)) {
getTaskWithRequestBuilder(taskId: taskId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get task by id.
- GET /ScheduledTasks/{taskId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"IsHidden" : true,
"Description" : "Description",
"Category" : "Category",
"State" : "",
"CurrentProgressPercentage" : 0.8008281904610115,
"Triggers" : [ {
"DayOfWeek" : "",
"Type" : "Type",
"IntervalTicks" : 1,
"TimeOfDayTicks" : 6,
"MaxRuntimeTicks" : 5
}, {
"DayOfWeek" : "",
"Type" : "Type",
"IntervalTicks" : 1,
"TimeOfDayTicks" : 6,
"MaxRuntimeTicks" : 5
} ],
"Id" : "Id",
"LastExecutionResult" : "",
"Key" : "Key",
"Name" : "Name"
}}]
- parameter taskId: (path) Task Id.
- returns: RequestBuilder<TaskInfo>
*/
open class func getTaskWithRequestBuilder(taskId: String) -> RequestBuilder<TaskInfo> {
var path = "/ScheduledTasks/{taskId}"
let taskIdPreEscape = "\(taskId)"
let taskIdPostEscape = taskIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{taskId}", with: taskIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<TaskInfo>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get tasks.
- parameter isHidden: (query) Optional filter tasks that are hidden, or not. (optional)
- parameter isEnabled: (query) Optional filter tasks that are enabled, or not. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getTasks(isHidden: Bool? = nil, isEnabled: Bool? = nil, completion: @escaping ((_ data: [TaskInfo]?,_ error: Error?) -> Void)) {
getTasksWithRequestBuilder(isHidden: isHidden, isEnabled: isEnabled).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get tasks.
- GET /ScheduledTasks
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"IsHidden" : true,
"Description" : "Description",
"Category" : "Category",
"State" : "",
"CurrentProgressPercentage" : 0.8008281904610115,
"Triggers" : [ {
"DayOfWeek" : "",
"Type" : "Type",
"IntervalTicks" : 1,
"TimeOfDayTicks" : 6,
"MaxRuntimeTicks" : 5
}, {
"DayOfWeek" : "",
"Type" : "Type",
"IntervalTicks" : 1,
"TimeOfDayTicks" : 6,
"MaxRuntimeTicks" : 5
} ],
"Id" : "Id",
"LastExecutionResult" : "",
"Key" : "Key",
"Name" : "Name"
}, {
"IsHidden" : true,
"Description" : "Description",
"Category" : "Category",
"State" : "",
"CurrentProgressPercentage" : 0.8008281904610115,
"Triggers" : [ {
"DayOfWeek" : "",
"Type" : "Type",
"IntervalTicks" : 1,
"TimeOfDayTicks" : 6,
"MaxRuntimeTicks" : 5
}, {
"DayOfWeek" : "",
"Type" : "Type",
"IntervalTicks" : 1,
"TimeOfDayTicks" : 6,
"MaxRuntimeTicks" : 5
} ],
"Id" : "Id",
"LastExecutionResult" : "",
"Key" : "Key",
"Name" : "Name"
} ]}]
- parameter isHidden: (query) Optional filter tasks that are hidden, or not. (optional)
- parameter isEnabled: (query) Optional filter tasks that are enabled, or not. (optional)
- returns: RequestBuilder<[TaskInfo]>
*/
open class func getTasksWithRequestBuilder(isHidden: Bool? = nil, isEnabled: Bool? = nil) -> RequestBuilder<[TaskInfo]> {
let path = "/ScheduledTasks"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"isHidden": isHidden,
"isEnabled": isEnabled
])
let requestBuilder: RequestBuilder<[TaskInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Start specified task.
- parameter taskId: (path) Task Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func startTask(taskId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
startTaskWithRequestBuilder(taskId: taskId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Start specified task.
- POST /ScheduledTasks/Running/{taskId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter taskId: (path) Task Id.
- returns: RequestBuilder<Void>
*/
open class func startTaskWithRequestBuilder(taskId: String) -> RequestBuilder<Void> {
var path = "/ScheduledTasks/Running/{taskId}"
let taskIdPreEscape = "\(taskId)"
let taskIdPostEscape = taskIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{taskId}", with: taskIdPostEscape, options: .literal, range: nil)
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)
}
/**
Stop specified task.
- parameter taskId: (path) Task Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func stopTask(taskId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
stopTaskWithRequestBuilder(taskId: taskId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Stop specified task.
- DELETE /ScheduledTasks/Running/{taskId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter taskId: (path) Task Id.
- returns: RequestBuilder<Void>
*/
open class func stopTaskWithRequestBuilder(taskId: String) -> RequestBuilder<Void> {
var path = "/ScheduledTasks/Running/{taskId}"
let taskIdPreEscape = "\(taskId)"
let taskIdPostEscape = taskIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{taskId}", with: taskIdPostEscape, options: .literal, range: nil)
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: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Update specified task triggers.
- parameter body: (body) Triggers.
- parameter taskId: (path) Task Id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateTask(body: [TaskTriggerInfo], taskId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateTaskWithRequestBuilder(body: body, taskId: taskId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Update specified task triggers.
- POST /ScheduledTasks/{taskId}/Triggers
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) Triggers.
- parameter taskId: (path) Task Id.
- returns: RequestBuilder<Void>
*/
open class func updateTaskWithRequestBuilder(body: [TaskTriggerInfo], taskId: String) -> RequestBuilder<Void> {
var path = "/ScheduledTasks/{taskId}/Triggers"
let taskIdPreEscape = "\(taskId)"
let taskIdPostEscape = taskIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{taskId}", with: taskIdPostEscape, options: .literal, range: nil)
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)
}
}

View File

@ -1,167 +0,0 @@
//
// SearchAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class SearchAPI {
/**
Gets the search hint result.
- parameter searchTerm: (query) The search term to filter on.
- parameter startIndex: (query) Optional. The record index to start at. All items with a lower index will be dropped from the results. (optional)
- parameter limit: (query) Optional. The maximum number of records to return. (optional)
- parameter userId: (query) Optional. Supply a user id to search within a user&#x27;s library or omit to search all. (optional)
- parameter includeItemTypes: (query) If specified, only results with the specified item types are returned. This allows multiple, comma delimeted. (optional)
- parameter excludeItemTypes: (query) If specified, results with these item types are filtered out. This allows multiple, comma delimeted. (optional)
- parameter mediaTypes: (query) If specified, only results with the specified media types are returned. This allows multiple, comma delimeted. (optional)
- parameter parentId: (query) If specified, only children of the parent are returned. (optional)
- parameter isMovie: (query) Optional filter for movies. (optional)
- parameter isSeries: (query) Optional filter for series. (optional)
- parameter isNews: (query) Optional filter for news. (optional)
- parameter isKids: (query) Optional filter for kids. (optional)
- parameter isSports: (query) Optional filter for sports. (optional)
- parameter includePeople: (query) Optional filter whether to include people. (optional, default to true)
- parameter includeMedia: (query) Optional filter whether to include media. (optional, default to true)
- parameter includeGenres: (query) Optional filter whether to include genres. (optional, default to true)
- parameter includeStudios: (query) Optional filter whether to include studios. (optional, default to true)
- parameter includeArtists: (query) Optional filter whether to include artists. (optional, default to true)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func callGet(searchTerm: String, startIndex: Int? = nil, limit: Int? = nil, userId: UUID? = nil, includeItemTypes: [String]? = nil, excludeItemTypes: [String]? = nil, mediaTypes: [String]? = nil, parentId: UUID? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, includePeople: Bool? = nil, includeMedia: Bool? = nil, includeGenres: Bool? = nil, includeStudios: Bool? = nil, includeArtists: Bool? = nil, completion: @escaping ((_ data: SearchHintResult?,_ error: Error?) -> Void)) {
callGetWithRequestBuilder(searchTerm: searchTerm, startIndex: startIndex, limit: limit, userId: userId, includeItemTypes: includeItemTypes, excludeItemTypes: excludeItemTypes, mediaTypes: mediaTypes, parentId: parentId, isMovie: isMovie, isSeries: isSeries, isNews: isNews, isKids: isKids, isSports: isSports, includePeople: includePeople, includeMedia: includeMedia, includeGenres: includeGenres, includeStudios: includeStudios, includeArtists: includeArtists).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the search hint result.
- GET /Search/Hints
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"TotalRecordCount" : 9,
"SearchHints" : [ {
"RunTimeTicks" : 5,
"PrimaryImageTag" : "PrimaryImageTag",
"Album" : "Album",
"ParentIndexNumber" : 1,
"ChannelId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ItemId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name",
"StartDate" : "2000-01-23T04:56:07.000+00:00",
"ThumbImageTag" : "ThumbImageTag",
"ProductionYear" : 6,
"AlbumId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ThumbImageItemId" : "ThumbImageItemId",
"MediaType" : "MediaType",
"IndexNumber" : 0,
"PrimaryImageAspectRatio" : 7.061401241503109,
"Status" : "Status",
"EpisodeCount" : 2,
"BackdropImageItemId" : "BackdropImageItemId",
"EndDate" : "2000-01-23T04:56:07.000+00:00",
"MatchedTerm" : "MatchedTerm",
"AlbumArtist" : "AlbumArtist",
"Series" : "Series",
"Type" : "Type",
"ChannelName" : "ChannelName",
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"BackdropImageTag" : "BackdropImageTag",
"IsFolder" : true,
"Artists" : [ "Artists", "Artists" ],
"SongCount" : 5
}, {
"RunTimeTicks" : 5,
"PrimaryImageTag" : "PrimaryImageTag",
"Album" : "Album",
"ParentIndexNumber" : 1,
"ChannelId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ItemId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name",
"StartDate" : "2000-01-23T04:56:07.000+00:00",
"ThumbImageTag" : "ThumbImageTag",
"ProductionYear" : 6,
"AlbumId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ThumbImageItemId" : "ThumbImageItemId",
"MediaType" : "MediaType",
"IndexNumber" : 0,
"PrimaryImageAspectRatio" : 7.061401241503109,
"Status" : "Status",
"EpisodeCount" : 2,
"BackdropImageItemId" : "BackdropImageItemId",
"EndDate" : "2000-01-23T04:56:07.000+00:00",
"MatchedTerm" : "MatchedTerm",
"AlbumArtist" : "AlbumArtist",
"Series" : "Series",
"Type" : "Type",
"ChannelName" : "ChannelName",
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"BackdropImageTag" : "BackdropImageTag",
"IsFolder" : true,
"Artists" : [ "Artists", "Artists" ],
"SongCount" : 5
} ]
}}]
- parameter searchTerm: (query) The search term to filter on.
- parameter startIndex: (query) Optional. The record index to start at. All items with a lower index will be dropped from the results. (optional)
- parameter limit: (query) Optional. The maximum number of records to return. (optional)
- parameter userId: (query) Optional. Supply a user id to search within a user&#x27;s library or omit to search all. (optional)
- parameter includeItemTypes: (query) If specified, only results with the specified item types are returned. This allows multiple, comma delimeted. (optional)
- parameter excludeItemTypes: (query) If specified, results with these item types are filtered out. This allows multiple, comma delimeted. (optional)
- parameter mediaTypes: (query) If specified, only results with the specified media types are returned. This allows multiple, comma delimeted. (optional)
- parameter parentId: (query) If specified, only children of the parent are returned. (optional)
- parameter isMovie: (query) Optional filter for movies. (optional)
- parameter isSeries: (query) Optional filter for series. (optional)
- parameter isNews: (query) Optional filter for news. (optional)
- parameter isKids: (query) Optional filter for kids. (optional)
- parameter isSports: (query) Optional filter for sports. (optional)
- parameter includePeople: (query) Optional filter whether to include people. (optional, default to true)
- parameter includeMedia: (query) Optional filter whether to include media. (optional, default to true)
- parameter includeGenres: (query) Optional filter whether to include genres. (optional, default to true)
- parameter includeStudios: (query) Optional filter whether to include studios. (optional, default to true)
- parameter includeArtists: (query) Optional filter whether to include artists. (optional, default to true)
- returns: RequestBuilder<SearchHintResult>
*/
open class func callGetWithRequestBuilder(searchTerm: String, startIndex: Int? = nil, limit: Int? = nil, userId: UUID? = nil, includeItemTypes: [String]? = nil, excludeItemTypes: [String]? = nil, mediaTypes: [String]? = nil, parentId: UUID? = nil, isMovie: Bool? = nil, isSeries: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isSports: Bool? = nil, includePeople: Bool? = nil, includeMedia: Bool? = nil, includeGenres: Bool? = nil, includeStudios: Bool? = nil, includeArtists: Bool? = nil) -> RequestBuilder<SearchHintResult> {
let path = "/Search/Hints"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"startIndex": startIndex?.encodeToJSON(),
"limit": limit?.encodeToJSON(),
"userId": userId,
"searchTerm": searchTerm,
"includeItemTypes": includeItemTypes,
"excludeItemTypes": excludeItemTypes,
"mediaTypes": mediaTypes,
"parentId": parentId,
"isMovie": isMovie,
"isSeries": isSeries,
"isNews": isNews,
"isKids": isKids,
"isSports": isSports,
"includePeople": includePeople,
"includeMedia": includeMedia,
"includeGenres": includeGenres,
"includeStudios": includeStudios,
"includeArtists": includeArtists
])
let requestBuilder: RequestBuilder<SearchHintResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

View File

@ -1,868 +0,0 @@
//
// SessionAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class SessionAPI {
/**
Adds an additional user to a session.
- parameter sessionId: (path) The session id.
- parameter userId: (path) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func addUserToSession(sessionId: String, userId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
addUserToSessionWithRequestBuilder(sessionId: sessionId, userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Adds an additional user to a session.
- POST /Sessions/{sessionId}/User/{userId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter sessionId: (path) The session id.
- parameter userId: (path) The user id.
- returns: RequestBuilder<Void>
*/
open class func addUserToSessionWithRequestBuilder(sessionId: String, userId: UUID) -> RequestBuilder<Void> {
var path = "/Sessions/{sessionId}/User/{userId}"
let sessionIdPreEscape = "\(sessionId)"
let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil)
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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)
}
/**
Instructs a session to browse to an item or view.
- parameter sessionId: (path) The session Id.
- parameter itemType: (query) The type of item to browse to.
- parameter itemId: (query) The Id of the item.
- parameter itemName: (query) The name of the item.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func displayContent(sessionId: String, itemType: String, itemId: String, itemName: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
displayContentWithRequestBuilder(sessionId: sessionId, itemType: itemType, itemId: itemId, itemName: itemName).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Instructs a session to browse to an item or view.
- POST /Sessions/{sessionId}/Viewing
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter sessionId: (path) The session Id.
- parameter itemType: (query) The type of item to browse to.
- parameter itemId: (query) The Id of the item.
- parameter itemName: (query) The name of the item.
- returns: RequestBuilder<Void>
*/
open class func displayContentWithRequestBuilder(sessionId: String, itemType: String, itemId: String, itemName: String) -> RequestBuilder<Void> {
var path = "/Sessions/{sessionId}/Viewing"
let sessionIdPreEscape = "\(sessionId)"
let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"itemType": itemType,
"itemId": itemId,
"itemName": itemName
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get all auth providers.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getAuthProviders(completion: @escaping ((_ data: [NameIdPair]?,_ error: Error?) -> Void)) {
getAuthProvidersWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get all auth providers.
- GET /Auth/Providers
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Id" : "Id",
"Name" : "Name"
}, {
"Id" : "Id",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[NameIdPair]>
*/
open class func getAuthProvidersWithRequestBuilder() -> RequestBuilder<[NameIdPair]> {
let path = "/Auth/Providers"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[NameIdPair]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Get all password reset providers.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPasswordResetProviders(completion: @escaping ((_ data: [NameIdPair]?,_ error: Error?) -> Void)) {
getPasswordResetProvidersWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get all password reset providers.
- GET /Auth/PasswordResetProviders
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Id" : "Id",
"Name" : "Name"
}, {
"Id" : "Id",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[NameIdPair]>
*/
open class func getPasswordResetProvidersWithRequestBuilder() -> RequestBuilder<[NameIdPair]> {
let path = "/Auth/PasswordResetProviders"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[NameIdPair]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a list of sessions.
- parameter controllableByUserId: (query) Filter by sessions that a given user is allowed to remote control. (optional)
- parameter deviceId: (query) Filter by device Id. (optional)
- parameter activeWithinSeconds: (query) Optional. Filter by sessions that were active in the last n seconds. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getSessions(controllableByUserId: UUID? = nil, deviceId: String? = nil, activeWithinSeconds: Int? = nil, completion: @escaping ((_ data: [SessionInfo]?,_ error: Error?) -> Void)) {
getSessionsWithRequestBuilder(controllableByUserId: controllableByUserId, deviceId: deviceId, activeWithinSeconds: activeWithinSeconds).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a list of sessions.
- GET /Sessions
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"ApplicationVersion" : "ApplicationVersion",
"SupportedCommands" : [ "MoveUp", "MoveUp" ],
"DeviceId" : "DeviceId",
"IsActive" : true,
"NowPlayingQueue" : [ {
"PlaylistItemId" : "PlaylistItemId",
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}, {
"PlaylistItemId" : "PlaylistItemId",
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
} ],
"PlaylistItemId" : "PlaylistItemId",
"ServerId" : "ServerId",
"RemoteEndPoint" : "RemoteEndPoint",
"SupportsRemoteControl" : true,
"HasCustomDeviceName" : true,
"Client" : "Client",
"UserName" : "UserName",
"FullNowPlayingItem" : "",
"SupportsMediaControl" : true,
"UserPrimaryImageTag" : "UserPrimaryImageTag",
"DeviceType" : "DeviceType",
"PlayableMediaTypes" : [ "PlayableMediaTypes", "PlayableMediaTypes" ],
"LastPlaybackCheckIn" : "2000-01-23T04:56:07.000+00:00",
"NowPlayingItem" : "",
"TranscodingInfo" : "",
"Capabilities" : "",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"LastActivityDate" : "2000-01-23T04:56:07.000+00:00",
"Id" : "Id",
"AdditionalUsers" : [ {
"UserName" : "UserName",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}, {
"UserName" : "UserName",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
} ],
"PlayState" : "",
"NowViewingItem" : "",
"DeviceName" : "DeviceName"
}, {
"ApplicationVersion" : "ApplicationVersion",
"SupportedCommands" : [ "MoveUp", "MoveUp" ],
"DeviceId" : "DeviceId",
"IsActive" : true,
"NowPlayingQueue" : [ {
"PlaylistItemId" : "PlaylistItemId",
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}, {
"PlaylistItemId" : "PlaylistItemId",
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
} ],
"PlaylistItemId" : "PlaylistItemId",
"ServerId" : "ServerId",
"RemoteEndPoint" : "RemoteEndPoint",
"SupportsRemoteControl" : true,
"HasCustomDeviceName" : true,
"Client" : "Client",
"UserName" : "UserName",
"FullNowPlayingItem" : "",
"SupportsMediaControl" : true,
"UserPrimaryImageTag" : "UserPrimaryImageTag",
"DeviceType" : "DeviceType",
"PlayableMediaTypes" : [ "PlayableMediaTypes", "PlayableMediaTypes" ],
"LastPlaybackCheckIn" : "2000-01-23T04:56:07.000+00:00",
"NowPlayingItem" : "",
"TranscodingInfo" : "",
"Capabilities" : "",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"LastActivityDate" : "2000-01-23T04:56:07.000+00:00",
"Id" : "Id",
"AdditionalUsers" : [ {
"UserName" : "UserName",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}, {
"UserName" : "UserName",
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
} ],
"PlayState" : "",
"NowViewingItem" : "",
"DeviceName" : "DeviceName"
} ]}]
- parameter controllableByUserId: (query) Filter by sessions that a given user is allowed to remote control. (optional)
- parameter deviceId: (query) Filter by device Id. (optional)
- parameter activeWithinSeconds: (query) Optional. Filter by sessions that were active in the last n seconds. (optional)
- returns: RequestBuilder<[SessionInfo]>
*/
open class func getSessionsWithRequestBuilder(controllableByUserId: UUID? = nil, deviceId: String? = nil, activeWithinSeconds: Int? = nil) -> RequestBuilder<[SessionInfo]> {
let path = "/Sessions"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"controllableByUserId": controllableByUserId,
"deviceId": deviceId,
"activeWithinSeconds": activeWithinSeconds?.encodeToJSON()
])
let requestBuilder: RequestBuilder<[SessionInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Instructs a session to play an item.
- parameter sessionId: (path) The session id.
- parameter playCommand: (query) The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.
- parameter itemIds: (query) The ids of the items to play, comma delimited.
- parameter startPositionTicks: (query) The starting position of the first item. (optional)
- parameter mediaSourceId: (query) Optional. The media source id. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to play. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to play. (optional)
- parameter startIndex: (query) Optional. The start index. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func play(sessionId: String, playCommand: PlayCommand, itemIds: [UUID], startPositionTicks: Int64? = nil, mediaSourceId: String? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, startIndex: Int? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
playWithRequestBuilder(sessionId: sessionId, playCommand: playCommand, itemIds: itemIds, startPositionTicks: startPositionTicks, mediaSourceId: mediaSourceId, audioStreamIndex: audioStreamIndex, subtitleStreamIndex: subtitleStreamIndex, startIndex: startIndex).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Instructs a session to play an item.
- POST /Sessions/{sessionId}/Playing
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter sessionId: (path) The session id.
- parameter playCommand: (query) The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.
- parameter itemIds: (query) The ids of the items to play, comma delimited.
- parameter startPositionTicks: (query) The starting position of the first item. (optional)
- parameter mediaSourceId: (query) Optional. The media source id. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to play. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to play. (optional)
- parameter startIndex: (query) Optional. The start index. (optional)
- returns: RequestBuilder<Void>
*/
open class func playWithRequestBuilder(sessionId: String, playCommand: PlayCommand, itemIds: [UUID], startPositionTicks: Int64? = nil, mediaSourceId: String? = nil, audioStreamIndex: Int? = nil, subtitleStreamIndex: Int? = nil, startIndex: Int? = nil) -> RequestBuilder<Void> {
var path = "/Sessions/{sessionId}/Playing"
let sessionIdPreEscape = "\(sessionId)"
let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"playCommand": playCommand,
"itemIds": itemIds,
"startPositionTicks": startPositionTicks?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"startIndex": startIndex?.encodeToJSON()
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Updates capabilities for a device.
- parameter _id: (query) The session id. (optional)
- parameter playableMediaTypes: (query) A list of playable media types, comma delimited. Audio, Video, Book, Photo. (optional)
- parameter supportedCommands: (query) A list of supported remote control commands, comma delimited. (optional)
- parameter supportsMediaControl: (query) Determines whether media can be played remotely.. (optional, default to false)
- parameter supportsSync: (query) Determines whether sync is supported. (optional, default to false)
- parameter supportsPersistentIdentifier: (query) Determines whether the device supports a unique identifier. (optional, default to true)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func postCapabilities(_id: String? = nil, playableMediaTypes: [String]? = nil, supportedCommands: [GeneralCommandType]? = nil, supportsMediaControl: Bool? = nil, supportsSync: Bool? = nil, supportsPersistentIdentifier: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
postCapabilitiesWithRequestBuilder(_id: _id, playableMediaTypes: playableMediaTypes, supportedCommands: supportedCommands, supportsMediaControl: supportsMediaControl, supportsSync: supportsSync, supportsPersistentIdentifier: supportsPersistentIdentifier).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates capabilities for a device.
- POST /Sessions/Capabilities
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter _id: (query) The session id. (optional)
- parameter playableMediaTypes: (query) A list of playable media types, comma delimited. Audio, Video, Book, Photo. (optional)
- parameter supportedCommands: (query) A list of supported remote control commands, comma delimited. (optional)
- parameter supportsMediaControl: (query) Determines whether media can be played remotely.. (optional, default to false)
- parameter supportsSync: (query) Determines whether sync is supported. (optional, default to false)
- parameter supportsPersistentIdentifier: (query) Determines whether the device supports a unique identifier. (optional, default to true)
- returns: RequestBuilder<Void>
*/
open class func postCapabilitiesWithRequestBuilder(_id: String? = nil, playableMediaTypes: [String]? = nil, supportedCommands: [GeneralCommandType]? = nil, supportsMediaControl: Bool? = nil, supportsSync: Bool? = nil, supportsPersistentIdentifier: Bool? = nil) -> RequestBuilder<Void> {
let path = "/Sessions/Capabilities"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"id": _id,
"playableMediaTypes": playableMediaTypes,
"supportedCommands": supportedCommands,
"supportsMediaControl": supportsMediaControl,
"supportsSync": supportsSync,
"supportsPersistentIdentifier": supportsPersistentIdentifier
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Updates capabilities for a device.
- parameter body: (body) The MediaBrowser.Model.Session.ClientCapabilities.
- parameter _id: (query) The session id. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func postFullCapabilities(body: CapabilitiesFullBody, _id: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
postFullCapabilitiesWithRequestBuilder(body: body, _id: _id).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates capabilities for a device.
- POST /Sessions/Capabilities/Full
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The MediaBrowser.Model.Session.ClientCapabilities.
- parameter _id: (query) The session id. (optional)
- returns: RequestBuilder<Void>
*/
open class func postFullCapabilitiesWithRequestBuilder(body: CapabilitiesFullBody, _id: String? = nil) -> RequestBuilder<Void> {
let path = "/Sessions/Capabilities/Full"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"id": _id
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Removes an additional user from a session.
- parameter sessionId: (path) The session id.
- parameter userId: (path) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func removeUserFromSession(sessionId: String, userId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
removeUserFromSessionWithRequestBuilder(sessionId: sessionId, userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Removes an additional user from a session.
- DELETE /Sessions/{sessionId}/User/{userId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter sessionId: (path) The session id.
- parameter userId: (path) The user id.
- returns: RequestBuilder<Void>
*/
open class func removeUserFromSessionWithRequestBuilder(sessionId: String, userId: UUID) -> RequestBuilder<Void> {
var path = "/Sessions/{sessionId}/User/{userId}"
let sessionIdPreEscape = "\(sessionId)"
let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil)
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Reports that a session has ended.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func reportSessionEnded(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
reportSessionEndedWithRequestBuilder().execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Reports that a session has ended.
- POST /Sessions/Logout
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- returns: RequestBuilder<Void>
*/
open class func reportSessionEndedWithRequestBuilder() -> RequestBuilder<Void> {
let path = "/Sessions/Logout"
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)
}
/**
Reports that a session is viewing an item.
- parameter itemId: (query) The item id.
- parameter sessionId: (query) The session id. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func reportViewing(itemId: String, sessionId: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
reportViewingWithRequestBuilder(itemId: itemId, sessionId: sessionId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Reports that a session is viewing an item.
- POST /Sessions/Viewing
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter itemId: (query) The item id.
- parameter sessionId: (query) The session id. (optional)
- returns: RequestBuilder<Void>
*/
open class func reportViewingWithRequestBuilder(itemId: String, sessionId: String? = nil) -> RequestBuilder<Void> {
let path = "/Sessions/Viewing"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"sessionId": sessionId,
"itemId": itemId
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Issues a full general command to a client.
- parameter body: (body) The MediaBrowser.Model.Session.GeneralCommand.
- parameter sessionId: (path) The session id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func sendFullGeneralCommand(body: SessionIdCommandBody, sessionId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
sendFullGeneralCommandWithRequestBuilder(body: body, sessionId: sessionId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Issues a full general command to a client.
- POST /Sessions/{sessionId}/Command
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The MediaBrowser.Model.Session.GeneralCommand.
- parameter sessionId: (path) The session id.
- returns: RequestBuilder<Void>
*/
open class func sendFullGeneralCommandWithRequestBuilder(body: SessionIdCommandBody, sessionId: String) -> RequestBuilder<Void> {
var path = "/Sessions/{sessionId}/Command"
let sessionIdPreEscape = "\(sessionId)"
let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil)
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)
}
/**
Issues a general command to a client.
- parameter sessionId: (path) The session id.
- parameter command: (path) The command to send.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func sendGeneralCommand(sessionId: String, command: Command, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
sendGeneralCommandWithRequestBuilder(sessionId: sessionId, command: command).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Issues a general command to a client.
- POST /Sessions/{sessionId}/Command/{command}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter sessionId: (path) The session id.
- parameter command: (path) The command to send.
- returns: RequestBuilder<Void>
*/
open class func sendGeneralCommandWithRequestBuilder(sessionId: String, command: Command) -> RequestBuilder<Void> {
var path = "/Sessions/{sessionId}/Command/{command}"
let sessionIdPreEscape = "\(sessionId)"
let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil)
let commandPreEscape = "\(command)"
let commandPostEscape = commandPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{command}", with: commandPostEscape, options: .literal, range: nil)
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)
}
/**
Issues a command to a client to display a message to the user.
- parameter body: (body) The MediaBrowser.Model.Session.MessageCommand object containing Header, Message Text, and TimeoutMs.
- parameter sessionId: (path) The session id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func sendMessageCommand(body: SessionIdMessageBody, sessionId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
sendMessageCommandWithRequestBuilder(body: body, sessionId: sessionId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Issues a command to a client to display a message to the user.
- POST /Sessions/{sessionId}/Message
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The MediaBrowser.Model.Session.MessageCommand object containing Header, Message Text, and TimeoutMs.
- parameter sessionId: (path) The session id.
- returns: RequestBuilder<Void>
*/
open class func sendMessageCommandWithRequestBuilder(body: SessionIdMessageBody, sessionId: String) -> RequestBuilder<Void> {
var path = "/Sessions/{sessionId}/Message"
let sessionIdPreEscape = "\(sessionId)"
let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil)
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)
}
/**
Issues a playstate command to a client.
- parameter sessionId: (path) The session id.
- parameter command: (path) The MediaBrowser.Model.Session.PlaystateCommand.
- parameter seekPositionTicks: (query) The optional position ticks. (optional)
- parameter controllingUserId: (query) The optional controlling user id. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func sendPlaystateCommand(sessionId: String, command: Command1, seekPositionTicks: Int64? = nil, controllingUserId: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
sendPlaystateCommandWithRequestBuilder(sessionId: sessionId, command: command, seekPositionTicks: seekPositionTicks, controllingUserId: controllingUserId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Issues a playstate command to a client.
- POST /Sessions/{sessionId}/Playing/{command}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter sessionId: (path) The session id.
- parameter command: (path) The MediaBrowser.Model.Session.PlaystateCommand.
- parameter seekPositionTicks: (query) The optional position ticks. (optional)
- parameter controllingUserId: (query) The optional controlling user id. (optional)
- returns: RequestBuilder<Void>
*/
open class func sendPlaystateCommandWithRequestBuilder(sessionId: String, command: Command1, seekPositionTicks: Int64? = nil, controllingUserId: String? = nil) -> RequestBuilder<Void> {
var path = "/Sessions/{sessionId}/Playing/{command}"
let sessionIdPreEscape = "\(sessionId)"
let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil)
let commandPreEscape = "\(command)"
let commandPostEscape = commandPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{command}", with: commandPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"seekPositionTicks": seekPositionTicks?.encodeToJSON(),
"controllingUserId": controllingUserId
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Issues a system command to a client.
- parameter sessionId: (path) The session id.
- parameter command: (path) The command to send.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func sendSystemCommand(sessionId: String, command: Command2, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
sendSystemCommandWithRequestBuilder(sessionId: sessionId, command: command).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Issues a system command to a client.
- POST /Sessions/{sessionId}/System/{command}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter sessionId: (path) The session id.
- parameter command: (path) The command to send.
- returns: RequestBuilder<Void>
*/
open class func sendSystemCommandWithRequestBuilder(sessionId: String, command: Command2) -> RequestBuilder<Void> {
var path = "/Sessions/{sessionId}/System/{command}"
let sessionIdPreEscape = "\(sessionId)"
let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil)
let commandPreEscape = "\(command)"
let commandPostEscape = commandPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{command}", with: commandPostEscape, options: .literal, range: nil)
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)
}
}

View File

@ -1,286 +0,0 @@
//
// 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)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,569 +0,0 @@
//
// SubtitleAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class SubtitleAPI {
/**
Deletes an external subtitle file.
- parameter itemId: (path) The item id.
- parameter index: (path) The index of the subtitle file.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func deleteSubtitle(itemId: UUID, index: Int, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
deleteSubtitleWithRequestBuilder(itemId: itemId, index: index).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Deletes an external subtitle file.
- DELETE /Videos/{itemId}/Subtitles/{index}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter itemId: (path) The item id.
- parameter index: (path) The index of the subtitle file.
- returns: RequestBuilder<Void>
*/
open class func deleteSubtitleWithRequestBuilder(itemId: UUID, index: Int) -> RequestBuilder<Void> {
var path = "/Videos/{itemId}/Subtitles/{index}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let indexPreEscape = "\(index)"
let indexPostEscape = indexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{index}", with: indexPostEscape, options: .literal, range: nil)
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: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Downloads a remote subtitle.
- parameter itemId: (path) The item id.
- parameter subtitleId: (path) The subtitle id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func downloadRemoteSubtitles(itemId: UUID, subtitleId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
downloadRemoteSubtitlesWithRequestBuilder(itemId: itemId, subtitleId: subtitleId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Downloads a remote subtitle.
- POST /Items/{itemId}/RemoteSearch/Subtitles/{subtitleId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter itemId: (path) The item id.
- parameter subtitleId: (path) The subtitle id.
- returns: RequestBuilder<Void>
*/
open class func downloadRemoteSubtitlesWithRequestBuilder(itemId: UUID, subtitleId: String) -> RequestBuilder<Void> {
var path = "/Items/{itemId}/RemoteSearch/Subtitles/{subtitleId}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let subtitleIdPreEscape = "\(subtitleId)"
let subtitleIdPostEscape = subtitleIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{subtitleId}", with: subtitleIdPostEscape, options: .literal, range: nil)
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 a fallback font file.
- parameter name: (path) The name of the fallback font file to get.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getFallbackFont(name: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getFallbackFontWithRequestBuilder(name: name).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a fallback font file.
- GET /FallbackFont/Fonts/{name}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter name: (path) The name of the fallback font file to get.
- returns: RequestBuilder<Data>
*/
open class func getFallbackFontWithRequestBuilder(name: String) -> RequestBuilder<Data> {
var path = "/FallbackFont/Fonts/{name}"
let namePreEscape = "\(name)"
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a list of available fallback font files.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getFallbackFontList(completion: @escaping ((_ data: [FontFile]?,_ error: Error?) -> Void)) {
getFallbackFontListWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a list of available fallback font files.
- GET /FallbackFont/Fonts
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Size" : 0,
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"DateModified" : "2000-01-23T04:56:07.000+00:00",
"Name" : "Name"
}, {
"Size" : 0,
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"DateModified" : "2000-01-23T04:56:07.000+00:00",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[FontFile]>
*/
open class func getFallbackFontListWithRequestBuilder() -> RequestBuilder<[FontFile]> {
let path = "/FallbackFont/Fonts"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[FontFile]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets the remote subtitles.
- parameter _id: (path) The item id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getRemoteSubtitles(_id: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getRemoteSubtitlesWithRequestBuilder(_id: _id).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the remote subtitles.
- GET /Providers/Subtitles/Subtitles/{id}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter _id: (path) The item id.
- returns: RequestBuilder<Data>
*/
open class func getRemoteSubtitlesWithRequestBuilder(_id: String) -> RequestBuilder<Data> {
var path = "/Providers/Subtitles/Subtitles/{id}"
let _idPreEscape = "\(_id)"
let _idPostEscape = _idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{id}", with: _idPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets subtitles in a specified format.
- parameter routeItemId: (path) The (route) item id.
- parameter routeMediaSourceId: (path) The (route) media source id.
- parameter routeIndex: (path) The (route) subtitle stream index.
- parameter routeFormat: (path) The (route) format of the returned subtitle.
- parameter itemId: (query) The item id. (optional)
- parameter mediaSourceId: (query) The media source id. (optional)
- parameter index: (query) The subtitle stream index. (optional)
- parameter format: (query) The format of the returned subtitle. (optional)
- parameter endPositionTicks: (query) Optional. The end position of the subtitle in ticks. (optional)
- parameter copyTimestamps: (query) Optional. Whether to copy the timestamps. (optional, default to false)
- parameter addVttTimeMap: (query) Optional. Whether to add a VTT time map. (optional, default to false)
- parameter startPositionTicks: (query) The start position of the subtitle in ticks. (optional, default to 0)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getSubtitle(routeItemId: UUID, routeMediaSourceId: String, routeIndex: Int, routeFormat: String, itemId: UUID? = nil, mediaSourceId: String? = nil, index: Int? = nil, format: String? = nil, endPositionTicks: Int64? = nil, copyTimestamps: Bool? = nil, addVttTimeMap: Bool? = nil, startPositionTicks: Int64? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getSubtitleWithRequestBuilder(routeItemId: routeItemId, routeMediaSourceId: routeMediaSourceId, routeIndex: routeIndex, routeFormat: routeFormat, itemId: itemId, mediaSourceId: mediaSourceId, index: index, format: format, endPositionTicks: endPositionTicks, copyTimestamps: copyTimestamps, addVttTimeMap: addVttTimeMap, startPositionTicks: startPositionTicks).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets subtitles in a specified format.
- GET /Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/Stream.{routeFormat}
-
- examples: [{contentType=application/json, example=""}]
- parameter routeItemId: (path) The (route) item id.
- parameter routeMediaSourceId: (path) The (route) media source id.
- parameter routeIndex: (path) The (route) subtitle stream index.
- parameter routeFormat: (path) The (route) format of the returned subtitle.
- parameter itemId: (query) The item id. (optional)
- parameter mediaSourceId: (query) The media source id. (optional)
- parameter index: (query) The subtitle stream index. (optional)
- parameter format: (query) The format of the returned subtitle. (optional)
- parameter endPositionTicks: (query) Optional. The end position of the subtitle in ticks. (optional)
- parameter copyTimestamps: (query) Optional. Whether to copy the timestamps. (optional, default to false)
- parameter addVttTimeMap: (query) Optional. Whether to add a VTT time map. (optional, default to false)
- parameter startPositionTicks: (query) The start position of the subtitle in ticks. (optional, default to 0)
- returns: RequestBuilder<Data>
*/
open class func getSubtitleWithRequestBuilder(routeItemId: UUID, routeMediaSourceId: String, routeIndex: Int, routeFormat: String, itemId: UUID? = nil, mediaSourceId: String? = nil, index: Int? = nil, format: String? = nil, endPositionTicks: Int64? = nil, copyTimestamps: Bool? = nil, addVttTimeMap: Bool? = nil, startPositionTicks: Int64? = nil) -> RequestBuilder<Data> {
var path = "/Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/Stream.{routeFormat}"
let routeItemIdPreEscape = "\(routeItemId)"
let routeItemIdPostEscape = routeItemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{routeItemId}", with: routeItemIdPostEscape, options: .literal, range: nil)
let routeMediaSourceIdPreEscape = "\(routeMediaSourceId)"
let routeMediaSourceIdPostEscape = routeMediaSourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{routeMediaSourceId}", with: routeMediaSourceIdPostEscape, options: .literal, range: nil)
let routeIndexPreEscape = "\(routeIndex)"
let routeIndexPostEscape = routeIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{routeIndex}", with: routeIndexPostEscape, options: .literal, range: nil)
let routeFormatPreEscape = "\(routeFormat)"
let routeFormatPostEscape = routeFormatPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{routeFormat}", with: routeFormatPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"itemId": itemId,
"mediaSourceId": mediaSourceId,
"index": index?.encodeToJSON(),
"format": format,
"endPositionTicks": endPositionTicks?.encodeToJSON(),
"copyTimestamps": copyTimestamps,
"addVttTimeMap": addVttTimeMap,
"startPositionTicks": startPositionTicks?.encodeToJSON()
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets an HLS subtitle playlist.
- parameter itemId: (path) The item id.
- parameter index: (path) The subtitle stream index.
- parameter mediaSourceId: (path) The media source id.
- parameter segmentLength: (query) The subtitle segment length.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getSubtitlePlaylist(itemId: UUID, index: Int, mediaSourceId: String, segmentLength: Int, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getSubtitlePlaylistWithRequestBuilder(itemId: itemId, index: index, mediaSourceId: mediaSourceId, segmentLength: segmentLength).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets an HLS subtitle playlist.
- GET /Videos/{itemId}/{mediaSourceId}/Subtitles/{index}/subtitles.m3u8
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter index: (path) The subtitle stream index.
- parameter mediaSourceId: (path) The media source id.
- parameter segmentLength: (query) The subtitle segment length.
- returns: RequestBuilder<Data>
*/
open class func getSubtitlePlaylistWithRequestBuilder(itemId: UUID, index: Int, mediaSourceId: String, segmentLength: Int) -> RequestBuilder<Data> {
var path = "/Videos/{itemId}/{mediaSourceId}/Subtitles/{index}/subtitles.m3u8"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let indexPreEscape = "\(index)"
let indexPostEscape = indexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{index}", with: indexPostEscape, options: .literal, range: nil)
let mediaSourceIdPreEscape = "\(mediaSourceId)"
let mediaSourceIdPostEscape = mediaSourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{mediaSourceId}", with: mediaSourceIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"segmentLength": segmentLength.encodeToJSON()
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets subtitles in a specified format.
- parameter routeItemId: (path) The (route) item id.
- parameter routeMediaSourceId: (path) The (route) media source id.
- parameter routeIndex: (path) The (route) subtitle stream index.
- parameter routeStartPositionTicks: (path) The (route) start position of the subtitle in ticks.
- parameter routeFormat: (path) The (route) format of the returned subtitle.
- parameter itemId: (query) The item id. (optional)
- parameter mediaSourceId: (query) The media source id. (optional)
- parameter index: (query) The subtitle stream index. (optional)
- parameter startPositionTicks: (query) The start position of the subtitle in ticks. (optional)
- parameter format: (query) The format of the returned subtitle. (optional)
- parameter endPositionTicks: (query) Optional. The end position of the subtitle in ticks. (optional)
- parameter copyTimestamps: (query) Optional. Whether to copy the timestamps. (optional, default to false)
- parameter addVttTimeMap: (query) Optional. Whether to add a VTT time map. (optional, default to false)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getSubtitleWithTicks(routeItemId: UUID, routeMediaSourceId: String, routeIndex: Int, routeStartPositionTicks: Int64, routeFormat: String, itemId: UUID? = nil, mediaSourceId: String? = nil, index: Int? = nil, startPositionTicks: Int64? = nil, format: String? = nil, endPositionTicks: Int64? = nil, copyTimestamps: Bool? = nil, addVttTimeMap: Bool? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getSubtitleWithTicksWithRequestBuilder(routeItemId: routeItemId, routeMediaSourceId: routeMediaSourceId, routeIndex: routeIndex, routeStartPositionTicks: routeStartPositionTicks, routeFormat: routeFormat, itemId: itemId, mediaSourceId: mediaSourceId, index: index, startPositionTicks: startPositionTicks, format: format, endPositionTicks: endPositionTicks, copyTimestamps: copyTimestamps, addVttTimeMap: addVttTimeMap).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets subtitles in a specified format.
- GET /Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/{routeStartPositionTicks}/Stream.{routeFormat}
-
- examples: [{contentType=application/json, example=""}]
- parameter routeItemId: (path) The (route) item id.
- parameter routeMediaSourceId: (path) The (route) media source id.
- parameter routeIndex: (path) The (route) subtitle stream index.
- parameter routeStartPositionTicks: (path) The (route) start position of the subtitle in ticks.
- parameter routeFormat: (path) The (route) format of the returned subtitle.
- parameter itemId: (query) The item id. (optional)
- parameter mediaSourceId: (query) The media source id. (optional)
- parameter index: (query) The subtitle stream index. (optional)
- parameter startPositionTicks: (query) The start position of the subtitle in ticks. (optional)
- parameter format: (query) The format of the returned subtitle. (optional)
- parameter endPositionTicks: (query) Optional. The end position of the subtitle in ticks. (optional)
- parameter copyTimestamps: (query) Optional. Whether to copy the timestamps. (optional, default to false)
- parameter addVttTimeMap: (query) Optional. Whether to add a VTT time map. (optional, default to false)
- returns: RequestBuilder<Data>
*/
open class func getSubtitleWithTicksWithRequestBuilder(routeItemId: UUID, routeMediaSourceId: String, routeIndex: Int, routeStartPositionTicks: Int64, routeFormat: String, itemId: UUID? = nil, mediaSourceId: String? = nil, index: Int? = nil, startPositionTicks: Int64? = nil, format: String? = nil, endPositionTicks: Int64? = nil, copyTimestamps: Bool? = nil, addVttTimeMap: Bool? = nil) -> RequestBuilder<Data> {
var path = "/Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/{routeStartPositionTicks}/Stream.{routeFormat}"
let routeItemIdPreEscape = "\(routeItemId)"
let routeItemIdPostEscape = routeItemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{routeItemId}", with: routeItemIdPostEscape, options: .literal, range: nil)
let routeMediaSourceIdPreEscape = "\(routeMediaSourceId)"
let routeMediaSourceIdPostEscape = routeMediaSourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{routeMediaSourceId}", with: routeMediaSourceIdPostEscape, options: .literal, range: nil)
let routeIndexPreEscape = "\(routeIndex)"
let routeIndexPostEscape = routeIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{routeIndex}", with: routeIndexPostEscape, options: .literal, range: nil)
let routeStartPositionTicksPreEscape = "\(routeStartPositionTicks)"
let routeStartPositionTicksPostEscape = routeStartPositionTicksPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{routeStartPositionTicks}", with: routeStartPositionTicksPostEscape, options: .literal, range: nil)
let routeFormatPreEscape = "\(routeFormat)"
let routeFormatPostEscape = routeFormatPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{routeFormat}", with: routeFormatPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"itemId": itemId,
"mediaSourceId": mediaSourceId,
"index": index?.encodeToJSON(),
"startPositionTicks": startPositionTicks?.encodeToJSON(),
"format": format,
"endPositionTicks": endPositionTicks?.encodeToJSON(),
"copyTimestamps": copyTimestamps,
"addVttTimeMap": addVttTimeMap
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Search remote subtitles.
- parameter itemId: (path) The item id.
- parameter language: (path) The language of the subtitles.
- parameter isPerfectMatch: (query) Optional. Only show subtitles which are a perfect match. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func searchRemoteSubtitles(itemId: UUID, language: String, isPerfectMatch: Bool? = nil, completion: @escaping ((_ data: [RemoteSubtitleInfo]?,_ error: Error?) -> Void)) {
searchRemoteSubtitlesWithRequestBuilder(itemId: itemId, language: language, isPerfectMatch: isPerfectMatch).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Search remote subtitles.
- GET /Items/{itemId}/RemoteSearch/Subtitles/{language}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"ProviderName" : "ProviderName",
"Comment" : "Comment",
"Format" : "Format",
"ThreeLetterISOLanguageName" : "ThreeLetterISOLanguageName",
"IsHashMatch" : true,
"Author" : "Author",
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"CommunityRating" : 0.8008282,
"Id" : "Id",
"Name" : "Name",
"DownloadCount" : 6
}, {
"ProviderName" : "ProviderName",
"Comment" : "Comment",
"Format" : "Format",
"ThreeLetterISOLanguageName" : "ThreeLetterISOLanguageName",
"IsHashMatch" : true,
"Author" : "Author",
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"CommunityRating" : 0.8008282,
"Id" : "Id",
"Name" : "Name",
"DownloadCount" : 6
} ]}]
- parameter itemId: (path) The item id.
- parameter language: (path) The language of the subtitles.
- parameter isPerfectMatch: (query) Optional. Only show subtitles which are a perfect match. (optional)
- returns: RequestBuilder<[RemoteSubtitleInfo]>
*/
open class func searchRemoteSubtitlesWithRequestBuilder(itemId: UUID, language: String, isPerfectMatch: Bool? = nil) -> RequestBuilder<[RemoteSubtitleInfo]> {
var path = "/Items/{itemId}/RemoteSearch/Subtitles/{language}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let languagePreEscape = "\(language)"
let languagePostEscape = languagePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{language}", with: languagePostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"isPerfectMatch": isPerfectMatch
])
let requestBuilder: RequestBuilder<[RemoteSubtitleInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Upload an external subtitle file.
- parameter body: (body) The request body.
- parameter itemId: (path) The item the subtitle belongs to.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func uploadSubtitle(body: ItemIdSubtitlesBody, itemId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
uploadSubtitleWithRequestBuilder(body: body, itemId: itemId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Upload an external subtitle file.
- POST /Videos/{itemId}/Subtitles
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The request body.
- parameter itemId: (path) The item the subtitle belongs to.
- returns: RequestBuilder<Void>
*/
open class func uploadSubtitleWithRequestBuilder(body: ItemIdSubtitlesBody, itemId: UUID) -> RequestBuilder<Void> {
var path = "/Videos/{itemId}/Subtitles"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
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)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,852 +0,0 @@
//
// SyncPlayAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class SyncPlayAPI {
/**
Notify SyncPlay group that member is buffering.
- parameter body: (body) The player status.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayBuffering(body: SyncPlayBufferingBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayBufferingWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Notify SyncPlay group that member is buffering.
- POST /SyncPlay/Buffering
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The player status.
- returns: RequestBuilder<Void>
*/
open class func syncPlayBufferingWithRequestBuilder(body: SyncPlayBufferingBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/Buffering"
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)
}
/**
Create a new SyncPlay group.
- parameter body: (body) The settings of the new group.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayCreateGroup(body: SyncPlayNewBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayCreateGroupWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Create a new SyncPlay group.
- POST /SyncPlay/New
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The settings of the new group.
- returns: RequestBuilder<Void>
*/
open class func syncPlayCreateGroupWithRequestBuilder(body: SyncPlayNewBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/New"
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)
}
/**
Gets all SyncPlay groups.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayGetGroups(completion: @escaping ((_ data: [GroupInfoDto]?,_ error: Error?) -> Void)) {
syncPlayGetGroupsWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets all SyncPlay groups.
- GET /SyncPlay/List
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"GroupName" : "GroupName",
"LastUpdatedAt" : "2000-01-23T04:56:07.000+00:00",
"State" : "",
"Participants" : [ "Participants", "Participants" ],
"GroupId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}, {
"GroupName" : "GroupName",
"LastUpdatedAt" : "2000-01-23T04:56:07.000+00:00",
"State" : "",
"Participants" : [ "Participants", "Participants" ],
"GroupId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
} ]}]
- returns: RequestBuilder<[GroupInfoDto]>
*/
open class func syncPlayGetGroupsWithRequestBuilder() -> RequestBuilder<[GroupInfoDto]> {
let path = "/SyncPlay/List"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[GroupInfoDto]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Join an existing SyncPlay group.
- parameter body: (body) The group to join.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayJoinGroup(body: SyncPlayJoinBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayJoinGroupWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Join an existing SyncPlay group.
- POST /SyncPlay/Join
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The group to join.
- returns: RequestBuilder<Void>
*/
open class func syncPlayJoinGroupWithRequestBuilder(body: SyncPlayJoinBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/Join"
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)
}
/**
Leave the joined SyncPlay group.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayLeaveGroup(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayLeaveGroupWithRequestBuilder().execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Leave the joined SyncPlay group.
- POST /SyncPlay/Leave
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- returns: RequestBuilder<Void>
*/
open class func syncPlayLeaveGroupWithRequestBuilder() -> RequestBuilder<Void> {
let path = "/SyncPlay/Leave"
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)
}
/**
Request to move an item in the playlist in SyncPlay group.
- parameter body: (body) The new position for the item.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayMovePlaylistItem(body: SyncPlayMovePlaylistItemBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayMovePlaylistItemWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request to move an item in the playlist in SyncPlay group.
- POST /SyncPlay/MovePlaylistItem
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new position for the item.
- returns: RequestBuilder<Void>
*/
open class func syncPlayMovePlaylistItemWithRequestBuilder(body: SyncPlayMovePlaylistItemBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/MovePlaylistItem"
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)
}
/**
Request next item in SyncPlay group.
- parameter body: (body) The current item information.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayNextItem(body: SyncPlayNextItemBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayNextItemWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request next item in SyncPlay group.
- POST /SyncPlay/NextItem
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The current item information.
- returns: RequestBuilder<Void>
*/
open class func syncPlayNextItemWithRequestBuilder(body: SyncPlayNextItemBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/NextItem"
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)
}
/**
Request pause in SyncPlay group.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayPause(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayPauseWithRequestBuilder().execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request pause in SyncPlay group.
- POST /SyncPlay/Pause
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- returns: RequestBuilder<Void>
*/
open class func syncPlayPauseWithRequestBuilder() -> RequestBuilder<Void> {
let path = "/SyncPlay/Pause"
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)
}
/**
Update session ping.
- parameter body: (body) The new ping.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayPing(body: SyncPlayPingBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayPingWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Update session ping.
- POST /SyncPlay/Ping
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new ping.
- returns: RequestBuilder<Void>
*/
open class func syncPlayPingWithRequestBuilder(body: SyncPlayPingBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/Ping"
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)
}
/**
Request previous item in SyncPlay group.
- parameter body: (body) The current item information.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayPreviousItem(body: SyncPlayPreviousItemBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayPreviousItemWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request previous item in SyncPlay group.
- POST /SyncPlay/PreviousItem
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The current item information.
- returns: RequestBuilder<Void>
*/
open class func syncPlayPreviousItemWithRequestBuilder(body: SyncPlayPreviousItemBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/PreviousItem"
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)
}
/**
Request to queue items to the playlist of a SyncPlay group.
- parameter body: (body) The items to add.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayQueue(body: SyncPlayQueueBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayQueueWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request to queue items to the playlist of a SyncPlay group.
- POST /SyncPlay/Queue
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The items to add.
- returns: RequestBuilder<Void>
*/
open class func syncPlayQueueWithRequestBuilder(body: SyncPlayQueueBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/Queue"
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)
}
/**
Notify SyncPlay group that member is ready for playback.
- parameter body: (body) The player status.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayReady(body: SyncPlayReadyBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayReadyWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Notify SyncPlay group that member is ready for playback.
- POST /SyncPlay/Ready
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The player status.
- returns: RequestBuilder<Void>
*/
open class func syncPlayReadyWithRequestBuilder(body: SyncPlayReadyBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/Ready"
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)
}
/**
Request to remove items from the playlist in SyncPlay group.
- parameter body: (body) The items to remove.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayRemoveFromPlaylist(body: SyncPlayRemoveFromPlaylistBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayRemoveFromPlaylistWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request to remove items from the playlist in SyncPlay group.
- POST /SyncPlay/RemoveFromPlaylist
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The items to remove.
- returns: RequestBuilder<Void>
*/
open class func syncPlayRemoveFromPlaylistWithRequestBuilder(body: SyncPlayRemoveFromPlaylistBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/RemoveFromPlaylist"
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)
}
/**
Request seek in SyncPlay group.
- parameter body: (body) The new playback position.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlaySeek(body: SyncPlaySeekBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlaySeekWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request seek in SyncPlay group.
- POST /SyncPlay/Seek
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new playback position.
- returns: RequestBuilder<Void>
*/
open class func syncPlaySeekWithRequestBuilder(body: SyncPlaySeekBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/Seek"
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)
}
/**
Request SyncPlay group to ignore member during group-wait.
- parameter body: (body) The settings to set.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlaySetIgnoreWait(body: SyncPlaySetIgnoreWaitBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlaySetIgnoreWaitWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request SyncPlay group to ignore member during group-wait.
- POST /SyncPlay/SetIgnoreWait
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The settings to set.
- returns: RequestBuilder<Void>
*/
open class func syncPlaySetIgnoreWaitWithRequestBuilder(body: SyncPlaySetIgnoreWaitBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/SetIgnoreWait"
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)
}
/**
Request to set new playlist in SyncPlay group.
- parameter body: (body) The new playlist to play in the group.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlaySetNewQueue(body: SyncPlaySetNewQueueBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlaySetNewQueueWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request to set new playlist in SyncPlay group.
- POST /SyncPlay/SetNewQueue
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new playlist to play in the group.
- returns: RequestBuilder<Void>
*/
open class func syncPlaySetNewQueueWithRequestBuilder(body: SyncPlaySetNewQueueBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/SetNewQueue"
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)
}
/**
Request to change playlist item in SyncPlay group.
- parameter body: (body) The new item to play.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlaySetPlaylistItem(body: SyncPlaySetPlaylistItemBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlaySetPlaylistItemWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request to change playlist item in SyncPlay group.
- POST /SyncPlay/SetPlaylistItem
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new item to play.
- returns: RequestBuilder<Void>
*/
open class func syncPlaySetPlaylistItemWithRequestBuilder(body: SyncPlaySetPlaylistItemBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/SetPlaylistItem"
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)
}
/**
Request to set repeat mode in SyncPlay group.
- parameter body: (body) The new repeat mode.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlaySetRepeatMode(body: SyncPlaySetRepeatModeBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlaySetRepeatModeWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request to set repeat mode in SyncPlay group.
- POST /SyncPlay/SetRepeatMode
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new repeat mode.
- returns: RequestBuilder<Void>
*/
open class func syncPlaySetRepeatModeWithRequestBuilder(body: SyncPlaySetRepeatModeBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/SetRepeatMode"
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)
}
/**
Request to set shuffle mode in SyncPlay group.
- parameter body: (body) The new shuffle mode.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlaySetShuffleMode(body: SyncPlaySetShuffleModeBody, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlaySetShuffleModeWithRequestBuilder(body: body).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request to set shuffle mode in SyncPlay group.
- POST /SyncPlay/SetShuffleMode
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new shuffle mode.
- returns: RequestBuilder<Void>
*/
open class func syncPlaySetShuffleModeWithRequestBuilder(body: SyncPlaySetShuffleModeBody) -> RequestBuilder<Void> {
let path = "/SyncPlay/SetShuffleMode"
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)
}
/**
Request stop in SyncPlay group.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayStop(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayStopWithRequestBuilder().execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request stop in SyncPlay group.
- POST /SyncPlay/Stop
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- returns: RequestBuilder<Void>
*/
open class func syncPlayStopWithRequestBuilder() -> RequestBuilder<Void> {
let path = "/SyncPlay/Stop"
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)
}
/**
Request unpause in SyncPlay group.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func syncPlayUnpause(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
syncPlayUnpauseWithRequestBuilder().execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Request unpause in SyncPlay group.
- POST /SyncPlay/Unpause
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- returns: RequestBuilder<Void>
*/
open class func syncPlayUnpauseWithRequestBuilder() -> RequestBuilder<Void> {
let path = "/SyncPlay/Unpause"
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)
}
}

View File

@ -1,435 +0,0 @@
//
// SystemAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class SystemAPI {
/**
Gets information about the request endpoint.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getEndpointInfo(completion: @escaping ((_ data: EndPointInfo?,_ error: Error?) -> Void)) {
getEndpointInfoWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets information about the request endpoint.
- GET /System/Endpoint
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"IsLocal" : true,
"IsInNetwork" : true
}}]
- returns: RequestBuilder<EndPointInfo>
*/
open class func getEndpointInfoWithRequestBuilder() -> RequestBuilder<EndPointInfo> {
let path = "/System/Endpoint"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<EndPointInfo>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a log file.
- parameter name: (query) The name of the log file to get.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getLogFile(name: String, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getLogFileWithRequestBuilder(name: name).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a log file.
- GET /System/Logs/Log
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter name: (query) The name of the log file to get.
- returns: RequestBuilder<Data>
*/
open class func getLogFileWithRequestBuilder(name: String) -> RequestBuilder<Data> {
let path = "/System/Logs/Log"
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)
}
/**
Pings the system.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPingSystem(completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) {
getPingSystemWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Pings the system.
- GET /System/Ping
-
- examples: [{contentType=application/json, example=""}]
- returns: RequestBuilder<String>
*/
open class func getPingSystemWithRequestBuilder() -> RequestBuilder<String> {
let path = "/System/Ping"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<String>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets public information about the server.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPublicSystemInfo(completion: @escaping ((_ data: PublicSystemInfo?,_ error: Error?) -> Void)) {
getPublicSystemInfoWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets public information about the server.
- GET /System/Info/Public
-
- examples: [{contentType=application/json, example={
"OperatingSystem" : "OperatingSystem",
"LocalAddress" : "LocalAddress",
"ProductName" : "ProductName",
"Version" : "Version",
"ServerName" : "ServerName",
"Id" : "Id",
"StartupWizardCompleted" : true
}}]
- returns: RequestBuilder<PublicSystemInfo>
*/
open class func getPublicSystemInfoWithRequestBuilder() -> RequestBuilder<PublicSystemInfo> {
let path = "/System/Info/Public"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<PublicSystemInfo>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a list of available server log files.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getServerLogs(completion: @escaping ((_ data: [LogFile]?,_ error: Error?) -> Void)) {
getServerLogsWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a list of available server log files.
- GET /System/Logs
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Size" : 0,
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"DateModified" : "2000-01-23T04:56:07.000+00:00",
"Name" : "Name"
}, {
"Size" : 0,
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"DateModified" : "2000-01-23T04:56:07.000+00:00",
"Name" : "Name"
} ]}]
- returns: RequestBuilder<[LogFile]>
*/
open class func getServerLogsWithRequestBuilder() -> RequestBuilder<[LogFile]> {
let path = "/System/Logs"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[LogFile]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets information about the server.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getSystemInfo(completion: @escaping ((_ data: SystemInfo?,_ error: Error?) -> Void)) {
getSystemInfoWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets information about the server.
- GET /System/Info
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"OperatingSystem" : "OperatingSystem",
"ProductName" : "ProductName",
"EncoderLocation" : "",
"PackageName" : "PackageName",
"TranscodingTempPath" : "TranscodingTempPath",
"CanSelfRestart" : true,
"StartupWizardCompleted" : true,
"Version" : "Version",
"CachePath" : "CachePath",
"HasPendingRestart" : true,
"ProgramDataPath" : "ProgramDataPath",
"WebPath" : "WebPath",
"SupportsLibraryMonitor" : true,
"LocalAddress" : "LocalAddress",
"CanLaunchWebBrowser" : true,
"IsShuttingDown" : true,
"SystemArchitecture" : "",
"ItemsByNamePath" : "ItemsByNamePath",
"WebSocketPortNumber" : 0,
"CompletedInstallations" : [ {
"SourceUrl" : "SourceUrl",
"Version" : "",
"Checksum" : "Checksum",
"PackageInfo" : "",
"Guid" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Changelog" : "Changelog",
"Name" : "Name"
}, {
"SourceUrl" : "SourceUrl",
"Version" : "",
"Checksum" : "Checksum",
"PackageInfo" : "",
"Guid" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Changelog" : "Changelog",
"Name" : "Name"
} ],
"OperatingSystemDisplayName" : "OperatingSystemDisplayName",
"InternalMetadataPath" : "InternalMetadataPath",
"ServerName" : "ServerName",
"Id" : "Id",
"HasUpdateAvailable" : true,
"LogPath" : "LogPath"
}}]
- returns: RequestBuilder<SystemInfo>
*/
open class func getSystemInfoWithRequestBuilder() -> RequestBuilder<SystemInfo> {
let path = "/System/Info"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<SystemInfo>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets wake on lan information.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getWakeOnLanInfo(completion: @escaping ((_ data: [WakeOnLanInfo]?,_ error: Error?) -> Void)) {
getWakeOnLanInfoWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets wake on lan information.
- GET /System/WakeOnLanInfo
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Port" : 0,
"MacAddress" : "MacAddress"
}, {
"Port" : 0,
"MacAddress" : "MacAddress"
} ]}]
- returns: RequestBuilder<[WakeOnLanInfo]>
*/
open class func getWakeOnLanInfoWithRequestBuilder() -> RequestBuilder<[WakeOnLanInfo]> {
let path = "/System/WakeOnLanInfo"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[WakeOnLanInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Pings the system.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func postPingSystem(completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) {
postPingSystemWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Pings the system.
- POST /System/Ping
-
- examples: [{contentType=application/json, example=""}]
- returns: RequestBuilder<String>
*/
open class func postPingSystemWithRequestBuilder() -> RequestBuilder<String> {
let path = "/System/Ping"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<String>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Restarts the application.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func restartApplication(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
restartApplicationWithRequestBuilder().execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Restarts the application.
- POST /System/Restart
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- returns: RequestBuilder<Void>
*/
open class func restartApplicationWithRequestBuilder() -> RequestBuilder<Void> {
let path = "/System/Restart"
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)
}
/**
Shuts down the application.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func shutdownApplication(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
shutdownApplicationWithRequestBuilder().execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Shuts down the application.
- POST /System/Shutdown
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- returns: RequestBuilder<Void>
*/
open class func shutdownApplicationWithRequestBuilder() -> RequestBuilder<Void> {
let path = "/System/Shutdown"
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)
}
}

View File

@ -1,48 +0,0 @@
//
// TimeSyncAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class TimeSyncAPI {
/**
Gets the current UTC time.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getUtcTime(completion: @escaping ((_ data: UtcTimeResponse?,_ error: Error?) -> Void)) {
getUtcTimeWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the current UTC time.
- GET /GetUtcTime
-
- examples: [{contentType=application/json, example={
"ResponseTransmissionTime" : "2000-01-23T04:56:07.000+00:00",
"RequestReceptionTime" : "2000-01-23T04:56:07.000+00:00"
}}]
- returns: RequestBuilder<UtcTimeResponse>
*/
open class func getUtcTimeWithRequestBuilder() -> RequestBuilder<UtcTimeResponse> {
let path = "/GetUtcTime"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<UtcTimeResponse>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,199 +0,0 @@
//
// UniversalAudioAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class UniversalAudioAPI {
/**
Gets an audio stream.
- parameter itemId: (path) The item id.
- parameter container: (query) Optional. The audio container. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter userId: (query) Optional. The user id. (optional)
- parameter audioCodec: (query) Optional. The audio codec to transcode to. (optional)
- parameter maxAudioChannels: (query) Optional. The maximum number of audio channels. (optional)
- parameter transcodingAudioChannels: (query) Optional. The number of how many audio channels to transcode to. (optional)
- parameter maxStreamingBitrate: (query) Optional. The maximum streaming bitrate. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter transcodingContainer: (query) Optional. The container to transcode to. (optional)
- parameter transcodingProtocol: (query) Optional. The transcoding protocol. (optional)
- parameter maxAudioSampleRate: (query) Optional. The maximum audio sample rate. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter enableRemoteMedia: (query) Optional. Whether to enable remote media. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional, default to false)
- parameter enableRedirection: (query) Whether to enable redirection. Defaults to true. (optional, default to true)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getUniversalAudioStream(itemId: UUID, container: [String]? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, userId: UUID? = nil, audioCodec: String? = nil, maxAudioChannels: Int? = nil, transcodingAudioChannels: Int? = nil, maxStreamingBitrate: Int? = nil, audioBitRate: Int? = nil, startTimeTicks: Int64? = nil, transcodingContainer: String? = nil, transcodingProtocol: String? = nil, maxAudioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, enableRemoteMedia: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, enableRedirection: Bool? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getUniversalAudioStreamWithRequestBuilder(itemId: itemId, container: container, mediaSourceId: mediaSourceId, deviceId: deviceId, userId: userId, audioCodec: audioCodec, maxAudioChannels: maxAudioChannels, transcodingAudioChannels: transcodingAudioChannels, maxStreamingBitrate: maxStreamingBitrate, audioBitRate: audioBitRate, startTimeTicks: startTimeTicks, transcodingContainer: transcodingContainer, transcodingProtocol: transcodingProtocol, maxAudioSampleRate: maxAudioSampleRate, maxAudioBitDepth: maxAudioBitDepth, enableRemoteMedia: enableRemoteMedia, breakOnNonKeyFrames: breakOnNonKeyFrames, enableRedirection: enableRedirection).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets an audio stream.
- GET /Audio/{itemId}/universal
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (query) Optional. The audio container. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter userId: (query) Optional. The user id. (optional)
- parameter audioCodec: (query) Optional. The audio codec to transcode to. (optional)
- parameter maxAudioChannels: (query) Optional. The maximum number of audio channels. (optional)
- parameter transcodingAudioChannels: (query) Optional. The number of how many audio channels to transcode to. (optional)
- parameter maxStreamingBitrate: (query) Optional. The maximum streaming bitrate. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter transcodingContainer: (query) Optional. The container to transcode to. (optional)
- parameter transcodingProtocol: (query) Optional. The transcoding protocol. (optional)
- parameter maxAudioSampleRate: (query) Optional. The maximum audio sample rate. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter enableRemoteMedia: (query) Optional. Whether to enable remote media. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional, default to false)
- parameter enableRedirection: (query) Whether to enable redirection. Defaults to true. (optional, default to true)
- returns: RequestBuilder<Data>
*/
open class func getUniversalAudioStreamWithRequestBuilder(itemId: UUID, container: [String]? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, userId: UUID? = nil, audioCodec: String? = nil, maxAudioChannels: Int? = nil, transcodingAudioChannels: Int? = nil, maxStreamingBitrate: Int? = nil, audioBitRate: Int? = nil, startTimeTicks: Int64? = nil, transcodingContainer: String? = nil, transcodingProtocol: String? = nil, maxAudioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, enableRemoteMedia: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, enableRedirection: Bool? = nil) -> RequestBuilder<Data> {
var path = "/Audio/{itemId}/universal"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"container": container,
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"userId": userId,
"audioCodec": audioCodec,
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"transcodingAudioChannels": transcodingAudioChannels?.encodeToJSON(),
"maxStreamingBitrate": maxStreamingBitrate?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"transcodingContainer": transcodingContainer,
"transcodingProtocol": transcodingProtocol,
"maxAudioSampleRate": maxAudioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"enableRemoteMedia": enableRemoteMedia,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"enableRedirection": enableRedirection
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets an audio stream.
- parameter itemId: (path) The item id.
- parameter container: (query) Optional. The audio container. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter userId: (query) Optional. The user id. (optional)
- parameter audioCodec: (query) Optional. The audio codec to transcode to. (optional)
- parameter maxAudioChannels: (query) Optional. The maximum number of audio channels. (optional)
- parameter transcodingAudioChannels: (query) Optional. The number of how many audio channels to transcode to. (optional)
- parameter maxStreamingBitrate: (query) Optional. The maximum streaming bitrate. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter transcodingContainer: (query) Optional. The container to transcode to. (optional)
- parameter transcodingProtocol: (query) Optional. The transcoding protocol. (optional)
- parameter maxAudioSampleRate: (query) Optional. The maximum audio sample rate. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter enableRemoteMedia: (query) Optional. Whether to enable remote media. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional, default to false)
- parameter enableRedirection: (query) Whether to enable redirection. Defaults to true. (optional, default to true)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func headUniversalAudioStream(itemId: UUID, container: [String]? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, userId: UUID? = nil, audioCodec: String? = nil, maxAudioChannels: Int? = nil, transcodingAudioChannels: Int? = nil, maxStreamingBitrate: Int? = nil, audioBitRate: Int? = nil, startTimeTicks: Int64? = nil, transcodingContainer: String? = nil, transcodingProtocol: String? = nil, maxAudioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, enableRemoteMedia: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, enableRedirection: Bool? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
headUniversalAudioStreamWithRequestBuilder(itemId: itemId, container: container, mediaSourceId: mediaSourceId, deviceId: deviceId, userId: userId, audioCodec: audioCodec, maxAudioChannels: maxAudioChannels, transcodingAudioChannels: transcodingAudioChannels, maxStreamingBitrate: maxStreamingBitrate, audioBitRate: audioBitRate, startTimeTicks: startTimeTicks, transcodingContainer: transcodingContainer, transcodingProtocol: transcodingProtocol, maxAudioSampleRate: maxAudioSampleRate, maxAudioBitDepth: maxAudioBitDepth, enableRemoteMedia: enableRemoteMedia, breakOnNonKeyFrames: breakOnNonKeyFrames, enableRedirection: enableRedirection).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets an audio stream.
- HEAD /Audio/{itemId}/universal
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (query) Optional. The audio container. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter userId: (query) Optional. The user id. (optional)
- parameter audioCodec: (query) Optional. The audio codec to transcode to. (optional)
- parameter maxAudioChannels: (query) Optional. The maximum number of audio channels. (optional)
- parameter transcodingAudioChannels: (query) Optional. The number of how many audio channels to transcode to. (optional)
- parameter maxStreamingBitrate: (query) Optional. The maximum streaming bitrate. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter transcodingContainer: (query) Optional. The container to transcode to. (optional)
- parameter transcodingProtocol: (query) Optional. The transcoding protocol. (optional)
- parameter maxAudioSampleRate: (query) Optional. The maximum audio sample rate. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter enableRemoteMedia: (query) Optional. Whether to enable remote media. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional, default to false)
- parameter enableRedirection: (query) Whether to enable redirection. Defaults to true. (optional, default to true)
- returns: RequestBuilder<Data>
*/
open class func headUniversalAudioStreamWithRequestBuilder(itemId: UUID, container: [String]? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, userId: UUID? = nil, audioCodec: String? = nil, maxAudioChannels: Int? = nil, transcodingAudioChannels: Int? = nil, maxStreamingBitrate: Int? = nil, audioBitRate: Int? = nil, startTimeTicks: Int64? = nil, transcodingContainer: String? = nil, transcodingProtocol: String? = nil, maxAudioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, enableRemoteMedia: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, enableRedirection: Bool? = nil) -> RequestBuilder<Data> {
var path = "/Audio/{itemId}/universal"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"container": container,
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"userId": userId,
"audioCodec": audioCodec,
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"transcodingAudioChannels": transcodingAudioChannels?.encodeToJSON(),
"maxStreamingBitrate": maxStreamingBitrate?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"transcodingContainer": transcodingContainer,
"transcodingProtocol": transcodingProtocol,
"maxAudioSampleRate": maxAudioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"enableRemoteMedia": enableRemoteMedia,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"enableRedirection": enableRedirection
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

View File

@ -1,776 +0,0 @@
//
// UserAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class UserAPI {
/**
Authenticates a user.
- parameter userId: (path) The user id.
- parameter pw: (query) The password as plain text.
- parameter password: (query) The password sha1-hash. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func authenticateUser(userId: UUID, pw: String, password: String? = nil, completion: @escaping ((_ data: AuthenticationResult?,_ error: Error?) -> Void)) {
authenticateUserWithRequestBuilder(userId: userId, pw: pw, password: password).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Authenticates a user.
- POST /Users/{userId}/Authenticate
-
- examples: [{contentType=application/json, example={
"User" : "",
"ServerId" : "ServerId",
"AccessToken" : "AccessToken",
"SessionInfo" : ""
}}]
- parameter userId: (path) The user id.
- parameter pw: (query) The password as plain text.
- parameter password: (query) The password sha1-hash. (optional)
- returns: RequestBuilder<AuthenticationResult>
*/
open class func authenticateUserWithRequestBuilder(userId: UUID, pw: String, password: String? = nil) -> RequestBuilder<AuthenticationResult> {
var path = "/Users/{userId}/Authenticate"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"pw": pw,
"password": password
])
let requestBuilder: RequestBuilder<AuthenticationResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Authenticates a user by name.
- parameter body: (body) The M:Jellyfin.Api.Controllers.UserController.AuthenticateUserByName(Jellyfin.Api.Models.UserDtos.AuthenticateUserByName) request.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func authenticateUserByName(body: UsersAuthenticateByNameBody, completion: @escaping ((_ data: AuthenticationResult?,_ error: Error?) -> Void)) {
authenticateUserByNameWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Authenticates a user by name.
- POST /Users/AuthenticateByName
-
- examples: [{contentType=application/json, example={
"User" : "",
"ServerId" : "ServerId",
"AccessToken" : "AccessToken",
"SessionInfo" : ""
}}]
- parameter body: (body) The M:Jellyfin.Api.Controllers.UserController.AuthenticateUserByName(Jellyfin.Api.Models.UserDtos.AuthenticateUserByName) request.
- returns: RequestBuilder<AuthenticationResult>
*/
open class func authenticateUserByNameWithRequestBuilder(body: UsersAuthenticateByNameBody) -> RequestBuilder<AuthenticationResult> {
let path = "/Users/AuthenticateByName"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<AuthenticationResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Authenticates a user with quick connect.
- parameter body: (body) The Jellyfin.Api.Models.UserDtos.QuickConnectDto request.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func authenticateWithQuickConnect(body: UsersAuthenticateWithQuickConnectBody, completion: @escaping ((_ data: AuthenticationResult?,_ error: Error?) -> Void)) {
authenticateWithQuickConnectWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Authenticates a user with quick connect.
- POST /Users/AuthenticateWithQuickConnect
-
- examples: [{contentType=application/json, example={
"User" : "",
"ServerId" : "ServerId",
"AccessToken" : "AccessToken",
"SessionInfo" : ""
}}]
- parameter body: (body) The Jellyfin.Api.Models.UserDtos.QuickConnectDto request.
- returns: RequestBuilder<AuthenticationResult>
*/
open class func authenticateWithQuickConnectWithRequestBuilder(body: UsersAuthenticateWithQuickConnectBody) -> RequestBuilder<AuthenticationResult> {
let path = "/Users/AuthenticateWithQuickConnect"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<AuthenticationResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Creates a user.
- parameter body: (body) The create user by name request body.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func createUserByName(body: UsersNewBody, completion: @escaping ((_ data: UserDto?,_ error: Error?) -> Void)) {
createUserByNameWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Creates a user.
- POST /Users/New
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"Policy" : "",
"HasConfiguredEasyPassword" : true,
"EnableAutoLogin" : true,
"Configuration" : "",
"LastLoginDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageTag" : "PrimaryImageTag",
"Name" : "Name",
"ServerId" : "ServerId",
"HasConfiguredPassword" : true,
"ServerName" : "ServerName",
"LastActivityDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageAspectRatio" : 0.8008281904610115,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"HasPassword" : true
}}]
- parameter body: (body) The create user by name request body.
- returns: RequestBuilder<UserDto>
*/
open class func createUserByNameWithRequestBuilder(body: UsersNewBody) -> RequestBuilder<UserDto> {
let path = "/Users/New"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<UserDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Deletes a user.
- parameter userId: (path) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func deleteUser(userId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
deleteUserWithRequestBuilder(userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Deletes a user.
- DELETE /Users/{userId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter userId: (path) The user id.
- returns: RequestBuilder<Void>
*/
open class func deleteUserWithRequestBuilder(userId: UUID) -> RequestBuilder<Void> {
var path = "/Users/{userId}"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Initiates the forgot password process for a local user.
- parameter body: (body) The forgot password request containing the entered username.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func forgotPassword(body: UsersForgotPasswordBody, completion: @escaping ((_ data: ForgotPasswordResult?,_ error: Error?) -> Void)) {
forgotPasswordWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Initiates the forgot password process for a local user.
- POST /Users/ForgotPassword
-
- examples: [{contentType=application/json, example={
"Action" : "",
"PinExpirationDate" : "2000-01-23T04:56:07.000+00:00",
"PinFile" : "PinFile"
}}]
- parameter body: (body) The forgot password request containing the entered username.
- returns: RequestBuilder<ForgotPasswordResult>
*/
open class func forgotPasswordWithRequestBuilder(body: UsersForgotPasswordBody) -> RequestBuilder<ForgotPasswordResult> {
let path = "/Users/ForgotPassword"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<ForgotPasswordResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Redeems a forgot password pin.
- parameter body: (body) The forgot password pin request containing the entered pin.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func forgotPasswordPin(body: ForgotPasswordPinBody, completion: @escaping ((_ data: PinRedeemResult?,_ error: Error?) -> Void)) {
forgotPasswordPinWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Redeems a forgot password pin.
- POST /Users/ForgotPassword/Pin
-
- examples: [{contentType=application/json, example={
"UsersReset" : [ "UsersReset", "UsersReset" ],
"Success" : true
}}]
- parameter body: (body) The forgot password pin request containing the entered pin.
- returns: RequestBuilder<PinRedeemResult>
*/
open class func forgotPasswordPinWithRequestBuilder(body: ForgotPasswordPinBody) -> RequestBuilder<PinRedeemResult> {
let path = "/Users/ForgotPassword/Pin"
let URLString = SwaggerClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<PinRedeemResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
Gets the user based on auth token.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getCurrentUser(completion: @escaping ((_ data: UserDto?,_ error: Error?) -> Void)) {
getCurrentUserWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets the user based on auth token.
- GET /Users/Me
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"Policy" : "",
"HasConfiguredEasyPassword" : true,
"EnableAutoLogin" : true,
"Configuration" : "",
"LastLoginDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageTag" : "PrimaryImageTag",
"Name" : "Name",
"ServerId" : "ServerId",
"HasConfiguredPassword" : true,
"ServerName" : "ServerName",
"LastActivityDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageAspectRatio" : 0.8008281904610115,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"HasPassword" : true
}}]
- returns: RequestBuilder<UserDto>
*/
open class func getCurrentUserWithRequestBuilder() -> RequestBuilder<UserDto> {
let path = "/Users/Me"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<UserDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a list of publicly visible users for display on a login screen.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getPublicUsers(completion: @escaping ((_ data: [UserDto]?,_ error: Error?) -> Void)) {
getPublicUsersWithRequestBuilder().execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a list of publicly visible users for display on a login screen.
- GET /Users/Public
-
- examples: [{contentType=application/json, example=[ {
"Policy" : "",
"HasConfiguredEasyPassword" : true,
"EnableAutoLogin" : true,
"Configuration" : "",
"LastLoginDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageTag" : "PrimaryImageTag",
"Name" : "Name",
"ServerId" : "ServerId",
"HasConfiguredPassword" : true,
"ServerName" : "ServerName",
"LastActivityDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageAspectRatio" : 0.8008281904610115,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"HasPassword" : true
}, {
"Policy" : "",
"HasConfiguredEasyPassword" : true,
"EnableAutoLogin" : true,
"Configuration" : "",
"LastLoginDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageTag" : "PrimaryImageTag",
"Name" : "Name",
"ServerId" : "ServerId",
"HasConfiguredPassword" : true,
"ServerName" : "ServerName",
"LastActivityDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageAspectRatio" : 0.8008281904610115,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"HasPassword" : true
} ]}]
- returns: RequestBuilder<[UserDto]>
*/
open class func getPublicUsersWithRequestBuilder() -> RequestBuilder<[UserDto]> {
let path = "/Users/Public"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<[UserDto]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a user by Id.
- parameter userId: (path) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getUserById(userId: UUID, completion: @escaping ((_ data: UserDto?,_ error: Error?) -> Void)) {
getUserByIdWithRequestBuilder(userId: userId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a user by Id.
- GET /Users/{userId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"Policy" : "",
"HasConfiguredEasyPassword" : true,
"EnableAutoLogin" : true,
"Configuration" : "",
"LastLoginDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageTag" : "PrimaryImageTag",
"Name" : "Name",
"ServerId" : "ServerId",
"HasConfiguredPassword" : true,
"ServerName" : "ServerName",
"LastActivityDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageAspectRatio" : 0.8008281904610115,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"HasPassword" : true
}}]
- parameter userId: (path) The user id.
- returns: RequestBuilder<UserDto>
*/
open class func getUserByIdWithRequestBuilder(userId: UUID) -> RequestBuilder<UserDto> {
var path = "/Users/{userId}"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<UserDto>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a list of users.
- parameter isHidden: (query) Optional filter by IsHidden&#x3D;true or false. (optional)
- parameter isDisabled: (query) Optional filter by IsDisabled&#x3D;true or false. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getUsers(isHidden: Bool? = nil, isDisabled: Bool? = nil, completion: @escaping ((_ data: [UserDto]?,_ error: Error?) -> Void)) {
getUsersWithRequestBuilder(isHidden: isHidden, isDisabled: isDisabled).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a list of users.
- GET /Users
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=[ {
"Policy" : "",
"HasConfiguredEasyPassword" : true,
"EnableAutoLogin" : true,
"Configuration" : "",
"LastLoginDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageTag" : "PrimaryImageTag",
"Name" : "Name",
"ServerId" : "ServerId",
"HasConfiguredPassword" : true,
"ServerName" : "ServerName",
"LastActivityDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageAspectRatio" : 0.8008281904610115,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"HasPassword" : true
}, {
"Policy" : "",
"HasConfiguredEasyPassword" : true,
"EnableAutoLogin" : true,
"Configuration" : "",
"LastLoginDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageTag" : "PrimaryImageTag",
"Name" : "Name",
"ServerId" : "ServerId",
"HasConfiguredPassword" : true,
"ServerName" : "ServerName",
"LastActivityDate" : "2000-01-23T04:56:07.000+00:00",
"PrimaryImageAspectRatio" : 0.8008281904610115,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"HasPassword" : true
} ]}]
- parameter isHidden: (query) Optional filter by IsHidden&#x3D;true or false. (optional)
- parameter isDisabled: (query) Optional filter by IsDisabled&#x3D;true or false. (optional)
- returns: RequestBuilder<[UserDto]>
*/
open class func getUsersWithRequestBuilder(isHidden: Bool? = nil, isDisabled: Bool? = nil) -> RequestBuilder<[UserDto]> {
let path = "/Users"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"isHidden": isHidden,
"isDisabled": isDisabled
])
let requestBuilder: RequestBuilder<[UserDto]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Updates a user.
- parameter body: (body) The updated user model.
- parameter userId: (path) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateUser(body: UsersUserIdBody, userId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateUserWithRequestBuilder(body: body, userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates a user.
- POST /Users/{userId}
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The updated user model.
- parameter userId: (path) The user id.
- returns: RequestBuilder<Void>
*/
open class func updateUserWithRequestBuilder(body: UsersUserIdBody, userId: UUID) -> RequestBuilder<Void> {
var path = "/Users/{userId}"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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)
}
/**
Updates a user configuration.
- parameter body: (body) The new user configuration.
- parameter userId: (path) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateUserConfiguration(body: UserIdConfigurationBody, userId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateUserConfigurationWithRequestBuilder(body: body, userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates a user configuration.
- POST /Users/{userId}/Configuration
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new user configuration.
- parameter userId: (path) The user id.
- returns: RequestBuilder<Void>
*/
open class func updateUserConfigurationWithRequestBuilder(body: UserIdConfigurationBody, userId: UUID) -> RequestBuilder<Void> {
var path = "/Users/{userId}/Configuration"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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)
}
/**
Updates a user's easy password.
- parameter body: (body) The M:Jellyfin.Api.Controllers.UserController.UpdateUserEasyPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserEasyPassword) request.
- parameter userId: (path) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateUserEasyPassword(body: UserIdEasyPasswordBody, userId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateUserEasyPasswordWithRequestBuilder(body: body, userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates a user's easy password.
- POST /Users/{userId}/EasyPassword
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The M:Jellyfin.Api.Controllers.UserController.UpdateUserEasyPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserEasyPassword) request.
- parameter userId: (path) The user id.
- returns: RequestBuilder<Void>
*/
open class func updateUserEasyPasswordWithRequestBuilder(body: UserIdEasyPasswordBody, userId: UUID) -> RequestBuilder<Void> {
var path = "/Users/{userId}/EasyPassword"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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)
}
/**
Updates a user's password.
- parameter body: (body) The M:Jellyfin.Api.Controllers.UserController.UpdateUserPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserPassword) request.
- parameter userId: (path) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateUserPassword(body: UserIdPasswordBody, userId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateUserPasswordWithRequestBuilder(body: body, userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates a user's password.
- POST /Users/{userId}/Password
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The M:Jellyfin.Api.Controllers.UserController.UpdateUserPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserPassword) request.
- parameter userId: (path) The user id.
- returns: RequestBuilder<Void>
*/
open class func updateUserPasswordWithRequestBuilder(body: UserIdPasswordBody, userId: UUID) -> RequestBuilder<Void> {
var path = "/Users/{userId}/Password"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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)
}
/**
Updates a user policy.
- parameter body: (body) The new user policy.
- parameter userId: (path) The user id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func updateUserPolicy(body: UserIdPolicyBody, userId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
updateUserPolicyWithRequestBuilder(body: body, userId: userId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Updates a user policy.
- POST /Users/{userId}/Policy
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter body: (body) The new user policy.
- parameter userId: (path) The user id.
- returns: RequestBuilder<Void>
*/
open class func updateUserPolicyWithRequestBuilder(body: UserIdPolicyBody, userId: UUID) -> RequestBuilder<Void> {
var path = "/Users/{userId}/Policy"
let userIdPreEscape = "\(userId)"
let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil)
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)
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,60 +0,0 @@
//
// VideoAttachmentsAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class VideoAttachmentsAPI {
/**
Get video attachment.
- parameter videoId: (path) Video ID.
- parameter mediaSourceId: (path) Media Source ID.
- parameter index: (path) Attachment Index.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getAttachment(videoId: UUID, mediaSourceId: String, index: Int, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getAttachmentWithRequestBuilder(videoId: videoId, mediaSourceId: mediaSourceId, index: index).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Get video attachment.
- GET /Videos/{videoId}/{mediaSourceId}/Attachments/{index}
-
- examples: [{contentType=application/json, example=""}]
- parameter videoId: (path) Video ID.
- parameter mediaSourceId: (path) Media Source ID.
- parameter index: (path) Attachment Index.
- returns: RequestBuilder<Data>
*/
open class func getAttachmentWithRequestBuilder(videoId: UUID, mediaSourceId: String, index: Int) -> RequestBuilder<Data> {
var path = "/Videos/{videoId}/{mediaSourceId}/Attachments/{index}"
let videoIdPreEscape = "\(videoId)"
let videoIdPostEscape = videoIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{videoId}", with: videoIdPostEscape, options: .literal, range: nil)
let mediaSourceIdPreEscape = "\(mediaSourceId)"
let mediaSourceIdPostEscape = mediaSourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{mediaSourceId}", with: mediaSourceIdPostEscape, options: .literal, range: nil)
let indexPreEscape = "\(index)"
let indexPostEscape = indexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{index}", with: indexPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

View File

@ -1,208 +0,0 @@
//
// VideoHlsAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class VideoHlsAPI {
/**
Gets a hls live stream.
- parameter itemId: (path) The item id.
- parameter container: (query) The audio container. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment lenght. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter maxWidth: (query) Optional. The max width. (optional)
- parameter maxHeight: (query) Optional. The max height. (optional)
- parameter enableSubtitlesInManifest: (query) Optional. Whether to enable subtitles in the manifest. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getLiveHlsStream(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod12? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context12? = nil, streamOptions: [String:String]? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, enableSubtitlesInManifest: Bool? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getLiveHlsStreamWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions, maxWidth: maxWidth, maxHeight: maxHeight, enableSubtitlesInManifest: enableSubtitlesInManifest).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a hls live stream.
- GET /Videos/{itemId}/live.m3u8
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (query) The audio container. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment lenght. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter maxWidth: (query) Optional. The max width. (optional)
- parameter maxHeight: (query) Optional. The max height. (optional)
- parameter enableSubtitlesInManifest: (query) Optional. Whether to enable subtitles in the manifest. (optional)
- returns: RequestBuilder<Data>
*/
open class func getLiveHlsStreamWithRequestBuilder(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod12? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context12? = nil, streamOptions: [String:String]? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, enableSubtitlesInManifest: Bool? = nil) -> RequestBuilder<Data> {
var path = "/Videos/{itemId}/live.m3u8"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"container": container,
"static": _static,
"params": params,
"tag": tag,
"deviceProfileId": deviceProfileId,
"playSessionId": playSessionId,
"segmentContainer": segmentContainer,
"segmentLength": segmentLength?.encodeToJSON(),
"minSegments": minSegments?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"audioCodec": audioCodec,
"enableAutoStreamCopy": enableAutoStreamCopy,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"audioSampleRate": audioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"audioChannels": audioChannels?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"profile": profile,
"level": level,
"framerate": framerate,
"maxFramerate": maxFramerate,
"copyTimestamps": copyTimestamps,
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"width": width?.encodeToJSON(),
"height": height?.encodeToJSON(),
"videoBitRate": videoBitRate?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"subtitleMethod": subtitleMethod,
"maxRefFrames": maxRefFrames?.encodeToJSON(),
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
"requireAvc": requireAvc,
"deInterlace": deInterlace,
"requireNonAnamorphic": requireNonAnamorphic,
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
"liveStreamId": liveStreamId,
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
"videoCodec": videoCodec,
"subtitleCodec": subtitleCodec,
"transcodeReasons": transcodeReasons,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
"context": context,
"streamOptions": streamOptions,
"maxWidth": maxWidth?.encodeToJSON(),
"maxHeight": maxHeight?.encodeToJSON(),
"enableSubtitlesInManifest": enableSubtitlesInManifest
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,422 +0,0 @@
// AlamofireImplementations.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
class AlamofireRequestBuilderFactory: RequestBuilderFactory {
func getNonDecodableBuilder<T>() -> RequestBuilder<T>.Type {
return AlamofireRequestBuilder<T>.self
}
func getBuilder<T:Decodable>() -> RequestBuilder<T>.Type {
return AlamofireDecodableRequestBuilder<T>.self
}
}
// Store manager to retain its reference
private var managerStore: [String: Alamofire.SessionManager] = [:]
// Sync queue to manage safe access to the store manager
private let syncQueue = DispatchQueue(label: "thread-safe-sync-queue", attributes: .concurrent)
open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) {
super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
}
/**
May be overridden by a subclass if you want to control the session
configuration.
*/
open func createSessionManager() -> Alamofire.SessionManager {
let configuration = URLSessionConfiguration.default
configuration.httpAdditionalHeaders = buildHeaders()
return Alamofire.SessionManager(configuration: configuration)
}
/**
May be overridden by a subclass if you want to control the Content-Type
that is given to an uploaded form part.
Return nil to use the default behavior (inferring the Content-Type from
the file extension). Return the desired Content-Type otherwise.
*/
open func contentTypeForFormPart(fileURL: URL) -> String? {
return nil
}
/**
May be overridden by a subclass if you want to control the request
configuration (e.g. to override the cache policy).
*/
open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest {
return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers)
}
override open func execute(_ completion: @escaping (_ response: Response<T>?, _ error: Error?) -> Void) {
let managerId:String = UUID().uuidString
// Create a new manager for each request to customize its request header
let manager = createSessionManager()
syncQueue.async(flags: .barrier) {
managerStore[managerId] = manager
}
let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding()
let xMethod = Alamofire.HTTPMethod(rawValue: method)
let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL }
.map { $0.0 }
if fileKeys.count > 0 {
manager.upload(multipartFormData: { mpForm in
for (k, v) in self.parameters! {
switch v {
case let fileURL as URL:
if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) {
mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType)
}
else {
mpForm.append(fileURL, withName: k)
}
case let string as String:
mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
case let number as NSNumber:
mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
default:
fatalError("Unprocessable value \(v) with key \(k)")
}
}
}, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in
switch encodingResult {
case .success(let upload, _, _):
if let onProgressReady = self.onProgressReady {
onProgressReady(upload.uploadProgress)
}
self.processRequest(request: upload, managerId, completion)
case .failure(let encodingError):
completion(nil, ErrorResponse.error(415, nil, encodingError))
}
})
} else {
let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers)
if let onProgressReady = self.onProgressReady {
onProgressReady(request.progress)
}
processRequest(request: request, managerId, completion)
}
}
fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response<T>?, _ error: Error?) -> Void) {
if let credential = self.credential {
request.authenticate(usingCredential: credential)
}
let cleanupRequest = {
syncQueue.async(flags: .barrier) {
_ = managerStore.removeValue(forKey: managerId)
}
}
let validatedRequest = request.validate()
switch T.self {
case is String.Type:
validatedRequest.responseString(completionHandler: { (stringResponse) in
cleanupRequest()
if stringResponse.result.isFailure {
completion(
nil,
ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!)
)
return
}
completion(
Response(
response: stringResponse.response!,
body: ((stringResponse.result.value ?? "") as! T)
),
nil
)
})
case is URL.Type:
validatedRequest.responseData(completionHandler: { (dataResponse) in
cleanupRequest()
do {
guard !dataResponse.result.isFailure else {
throw DownloadException.responseFailed
}
guard let data = dataResponse.data else {
throw DownloadException.responseDataMissing
}
guard let request = request.request else {
throw DownloadException.requestMissing
}
let fileManager = FileManager.default
let urlRequest = try request.asURLRequest()
let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0]
let requestURL = try self.getURL(from: urlRequest)
var requestPath = try self.getPath(from: requestURL)
if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) {
requestPath = requestPath.appending("/\(headerFileName)")
}
let filePath = documentsDirectory.appendingPathComponent(requestPath)
let directoryPath = filePath.deletingLastPathComponent().path
try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil)
try data.write(to: filePath, options: .atomic)
completion(
Response(
response: dataResponse.response!,
body: (filePath as! T)
),
nil
)
} catch let requestParserError as DownloadException {
completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError))
} catch let error {
completion(nil, ErrorResponse.error(400, dataResponse.data, error))
}
return
})
case is Void.Type:
validatedRequest.responseData(completionHandler: { (voidResponse) in
cleanupRequest()
if voidResponse.result.isFailure {
completion(
nil,
ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!)
)
return
}
completion(
Response(
response: voidResponse.response!,
body: nil),
nil
)
})
default:
validatedRequest.responseData(completionHandler: { (dataResponse) in
cleanupRequest()
if dataResponse.result.isFailure {
completion(
nil,
ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)
)
return
}
completion(
Response(
response: dataResponse.response!,
body: (dataResponse.data as! T)
),
nil
)
})
}
}
open func buildHeaders() -> [String: String] {
var httpHeaders = SessionManager.defaultHTTPHeaders
for (key, value) in self.headers {
httpHeaders[key] = value
}
return httpHeaders
}
fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? {
guard let contentDisposition = contentDisposition else {
return nil
}
let items = contentDisposition.components(separatedBy: ";")
var filename : String? = nil
for contentItem in items {
let filenameKey = "filename="
guard let range = contentItem.range(of: filenameKey) else {
break
}
filename = contentItem
return filename?
.replacingCharacters(in: range, with:"")
.replacingOccurrences(of: "\"", with: "")
.trimmingCharacters(in: .whitespacesAndNewlines)
}
return filename
}
fileprivate func getPath(from url : URL) throws -> String {
guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else {
throw DownloadException.requestMissingPath
}
if path.hasPrefix("/") {
path.remove(at: path.startIndex)
}
return path
}
fileprivate func getURL(from urlRequest : URLRequest) throws -> URL {
guard let url = urlRequest.url else {
throw DownloadException.requestMissingURL
}
return url
}
}
fileprivate enum DownloadException : Error {
case responseDataMissing
case responseFailed
case requestMissing
case requestMissingPath
case requestMissingURL
}
public enum AlamofireDecodableRequestBuilderError: Error {
case emptyDataResponse
case nilHTTPResponse
case jsonDecoding(DecodingError)
case generalError(Error)
}
open class AlamofireDecodableRequestBuilder<T:Decodable>: AlamofireRequestBuilder<T> {
override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response<T>?, _ error: Error?) -> Void) {
if let credential = self.credential {
request.authenticate(usingCredential: credential)
}
let cleanupRequest = {
syncQueue.async(flags: .barrier) {
_ = managerStore.removeValue(forKey: managerId)
}
}
let validatedRequest = request.validate()
switch T.self {
case is String.Type:
validatedRequest.responseString(completionHandler: { (stringResponse) in
cleanupRequest()
if stringResponse.result.isFailure {
completion(
nil,
ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!)
)
return
}
completion(
Response(
response: stringResponse.response!,
body: ((stringResponse.result.value ?? "") as! T)
),
nil
)
})
case is Void.Type:
validatedRequest.responseData(completionHandler: { (voidResponse) in
cleanupRequest()
if voidResponse.result.isFailure {
completion(
nil,
ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!)
)
return
}
completion(
Response(
response: voidResponse.response!,
body: nil),
nil
)
})
case is Data.Type:
validatedRequest.responseData(completionHandler: { (dataResponse) in
cleanupRequest()
if dataResponse.result.isFailure {
completion(
nil,
ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)
)
return
}
completion(
Response(
response: dataResponse.response!,
body: (dataResponse.data as! T)
),
nil
)
})
default:
validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse<Data>) in
cleanupRequest()
guard dataResponse.result.isSuccess else {
completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!))
return
}
guard let data = dataResponse.data, !data.isEmpty else {
completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse))
return
}
guard let httpResponse = dataResponse.response else {
completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse))
return
}
var responseObj: Response<T>? = nil
let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data)
if decodeResult.error == nil {
responseObj = Response(response: httpResponse, body: decodeResult.decodableObj)
}
completion(responseObj, decodeResult.error)
})
}
}
}

View File

@ -1,93 +0,0 @@
//
// CodableHelper.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public typealias EncodeResult = (data: Data?, error: Error?)
enum DateError: String, Error {
case invalidDate
}
open class CodableHelper {
public static var dateformatter: DateFormatter?
open class func decode<T>(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable {
var returnedDecodable: T? = nil
var returnedError: Error? = nil
let decoder = JSONDecoder()
if let df = self.dateformatter {
decoder.dateDecodingStrategy = .formatted(df)
} else {
decoder.dataDecodingStrategy = .base64
decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in
let container = try decoder.singleValueContainer()
let dateStr = try container.decode(String.self)
let formatters = [
"yyyy-MM-dd",
"yyyy-MM-dd'T'HH:mm:ssZZZZZ",
"yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ",
"yyyy-MM-dd'T'HH:mm:ss'Z'",
"yyyy-MM-dd'T'HH:mm:ss.SSS",
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"yyyy-MM-dd HH:mm:ss"
].map { (format: String) -> DateFormatter in
let formatter = DateFormatter()
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.dateFormat = format
return formatter
}
for formatter in formatters {
if let date = formatter.date(from: dateStr) {
return date
}
}
throw DateError.invalidDate
})
}
do {
returnedDecodable = try decoder.decode(type, from: data)
} catch {
returnedError = error
}
return (returnedDecodable, returnedError)
}
open class func encode<T>(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T : Encodable {
var returnedData: Data?
var returnedError: Error? = nil
let encoder = JSONEncoder()
if prettyPrint {
encoder.outputFormatting = .prettyPrinted
}
encoder.dataEncodingStrategy = .base64
let formatter = DateFormatter()
formatter.calendar = Calendar(identifier: .iso8601)
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.timeZone = TimeZone(secondsFromGMT: 0)
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
encoder.dateEncodingStrategy = .formatted(formatter)
do {
returnedData = try encoder.encode(value)
} catch {
returnedError = error
}
return (returnedData, returnedError)
}
}

View File

@ -1,15 +0,0 @@
// Configuration.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
open class Configuration {
// This value is used to configure the date formatter that is used to serialize dates into JSON format.
// You must set it prior to encoding any dates, and it will only be read once.
public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"
}

View File

@ -1,173 +0,0 @@
// Extensions.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
extension Bool: JSONEncodable {
func encodeToJSON() -> Any { return self as Any }
}
extension Float: JSONEncodable {
func encodeToJSON() -> Any { return self as Any }
}
extension Int: JSONEncodable {
func encodeToJSON() -> Any { return self as Any }
}
extension Int32: JSONEncodable {
func encodeToJSON() -> Any { return NSNumber(value: self as Int32) }
}
extension Int64: JSONEncodable {
func encodeToJSON() -> Any { return NSNumber(value: self as Int64) }
}
extension Double: JSONEncodable {
func encodeToJSON() -> Any { return self as Any }
}
extension String: JSONEncodable {
func encodeToJSON() -> Any { return self as Any }
}
private func encodeIfPossible<T>(_ object: T) -> Any {
if let encodableObject = object as? JSONEncodable {
return encodableObject.encodeToJSON()
} else {
return object as Any
}
}
extension Array: JSONEncodable {
func encodeToJSON() -> Any {
return self.map(encodeIfPossible)
}
}
extension Dictionary: JSONEncodable {
func encodeToJSON() -> Any {
var dictionary = [AnyHashable: Any]()
for (key, value) in self {
dictionary[key] = encodeIfPossible(value)
}
return dictionary as Any
}
}
extension Data: JSONEncodable {
func encodeToJSON() -> Any {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
}
private let dateFormatter: DateFormatter = {
let fmt = DateFormatter()
fmt.dateFormat = Configuration.dateFormat
fmt.locale = Locale(identifier: "en_US_POSIX")
return fmt
}()
extension Date: JSONEncodable {
func encodeToJSON() -> Any {
return dateFormatter.string(from: self) as Any
}
}
extension UUID: JSONEncodable {
func encodeToJSON() -> Any {
return self.uuidString
}
}
extension String: CodingKey {
public var stringValue: String {
return self
}
public init?(stringValue: String) {
self.init(stringLiteral: stringValue)
}
public var intValue: Int? {
return nil
}
public init?(intValue: Int) {
return nil
}
}
extension KeyedEncodingContainerProtocol {
public mutating func encodeArray<T>(_ values: [T], forKey key: Self.Key) throws where T : Encodable {
var arrayContainer = nestedUnkeyedContainer(forKey: key)
try arrayContainer.encode(contentsOf: values)
}
public mutating func encodeArrayIfPresent<T>(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable {
if let values = values {
try encodeArray(values, forKey: key)
}
}
public mutating func encodeMap<T>(_ pairs: [Self.Key: T]) throws where T : Encodable {
for (key, value) in pairs {
try encode(value, forKey: key)
}
}
public mutating func encodeMapIfPresent<T>(_ pairs: [Self.Key: T]?) throws where T : Encodable {
if let pairs = pairs {
try encodeMap(pairs)
}
}
}
extension KeyedDecodingContainerProtocol {
public func decodeArray<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable {
var tmpArray = [T]()
var nestedContainer = try nestedUnkeyedContainer(forKey: key)
while !nestedContainer.isAtEnd {
let arrayValue = try nestedContainer.decode(T.self)
tmpArray.append(arrayValue)
}
return tmpArray
}
public func decodeArrayIfPresent<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable {
var tmpArray: [T]? = nil
if contains(key) {
tmpArray = try decodeArray(T.self, forKey: key)
}
return tmpArray
}
public func decodeMap<T>(_ type: T.Type, excludedKeys: Set<Self.Key>) throws -> [Self.Key: T] where T : Decodable {
var map: [Self.Key : T] = [:]
for key in allKeys {
if !excludedKeys.contains(key) {
let value = try decode(T.self, forKey: key)
map[key] = value
}
}
return map
}
}

View File

@ -1,54 +0,0 @@
//
// JSONDataEncoding.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
public struct JSONDataEncoding: ParameterEncoding {
// MARK: Properties
private static let jsonDataKey = "jsonData"
// MARK: Encoding
/// Creates a URL request by encoding parameters and applying them onto an existing request.
///
/// - parameter urlRequest: The request to have parameters applied.
/// - parameter parameters: The parameters to apply. This should have a single key/value
/// pair with "jsonData" as the key and a Data object as the value.
///
/// - throws: An `Error` if the encoding process encounters an error.
///
/// - returns: The encoded request.
public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
var urlRequest = try urlRequest.asURLRequest()
guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else {
return urlRequest
}
if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type")
}
urlRequest.httpBody = jsonData
return urlRequest
}
public static func encodingParameters(jsonData: Data?) -> Parameters? {
var returnedParams: Parameters? = nil
if let jsonData = jsonData, !jsonData.isEmpty {
var params = Parameters()
params[jsonDataKey] = jsonData
returnedParams = params
}
return returnedParams
}
}

View File

@ -1,43 +0,0 @@
//
// JSONEncodingHelper.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class JSONEncodingHelper {
open class func encodingParameters<T:Encodable>(forEncodableObject encodableObj: T?) -> Parameters? {
var params: Parameters? = nil
// Encode the Encodable object
if let encodableObj = encodableObj {
let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true)
if encodeResult.error == nil {
params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data)
}
}
return params
}
open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? {
var params: Parameters? = nil
if let encodableObj = encodableObj {
do {
let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted)
params = JSONDataEncoding.encodingParameters(jsonData: data)
} catch {
print(error)
return nil
}
}
return params
}
}

View File

@ -1,99 +0,0 @@
//
// JSONEncodingHelper.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public enum JSONValue: Codable, Equatable {
case string(String)
case int(Int)
case double(Double)
case bool(Bool)
case object([String: JSONValue])
case array([JSONValue])
case null
public func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
switch self {
case .string(let string): try container.encode(string)
case .int(let int): try container.encode(int)
case .double(let double): try container.encode(double)
case .bool(let bool): try container.encode(bool)
case .object(let object): try container.encode(object)
case .array(let array): try container.encode(array)
case .null: try container.encode(Optional<String>.none)
}
}
public init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
self = try ((try? container.decode(String.self)).map(JSONValue.string))
.or((try? container.decode(Int.self)).map(JSONValue.int))
.or((try? container.decode(Double.self)).map(JSONValue.double))
.or((try? container.decode(Bool.self)).map(JSONValue.bool))
.or((try? container.decode([String: JSONValue].self)).map(JSONValue.object))
.or((try? container.decode([JSONValue].self)).map(JSONValue.array))
.or((container.decodeNil() ? .some(JSONValue.null) : .none))
.resolve(
with: DecodingError.typeMismatch(
JSONValue.self,
DecodingError.Context(
codingPath: container.codingPath,
debugDescription: "Not a JSON value"
)
)
)
}
}
extension JSONValue: ExpressibleByStringLiteral {
public init(stringLiteral value: String) {
self = .string(value)
}
}
extension JSONValue: ExpressibleByIntegerLiteral {
public init(integerLiteral value: Int) {
self = .int(value)
}
}
extension JSONValue: ExpressibleByFloatLiteral {
public init(floatLiteral value: Double) {
self = .double(value)
}
}
extension JSONValue: ExpressibleByBooleanLiteral {
public init(booleanLiteral value: Bool) {
self = .bool(value)
}
}
extension JSONValue: ExpressibleByDictionaryLiteral {
public init(dictionaryLiteral elements: (String, JSONValue)...) {
self = .object([String: JSONValue](uniqueKeysWithValues: elements))
}
}
extension JSONValue: ExpressibleByArrayLiteral {
public init(arrayLiteral elements: JSONValue...) {
self = .array(elements)
}
}
fileprivate extension Optional {
func or(_ other: Optional) -> Optional {
switch self {
case .none: return other
case .some: return self
}
}
func resolve(with error: @autoclosure () -> Error) throws -> Wrapped {
switch self {
case .none: throw error()
case .some(let wrapped): return wrapped
}
}
}

View File

@ -1,36 +0,0 @@
// Models.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
protocol JSONEncodable {
func encodeToJSON() -> Any
}
public enum ErrorResponse : Error {
case error(Int, Data?, Error)
}
open class Response<T> {
public let statusCode: Int
public let header: [String: String]
public let body: T?
public init(statusCode: Int, header: [String: String], body: T?) {
self.statusCode = statusCode
self.header = header
self.body = body
}
public convenience init(response: HTTPURLResponse, body: T?) {
let rawHeader = response.allHeaderFields
var header = [String:String]()
for case let (key, value) as (String, String) in rawHeader {
header[key] = value
}
self.init(statusCode: response.statusCode, header: header, body: body)
}
}

View File

@ -1,42 +0,0 @@
//
// AccessSchedule.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** An entity representing a user&#x27;s access schedule. */
public struct AccessSchedule: Codable {
/** Gets or sets the id of this instance. */
public var _id: Int
/** Gets or sets the id of the associated user. */
public var userId: UUID
/** Gets or sets the day of week. */
public var dayOfWeek: AllOfAccessScheduleDayOfWeek
/** Gets or sets the start hour. */
public var startHour: Double
/** Gets or sets the end hour. */
public var endHour: Double
public init(_id: Int, userId: UUID, dayOfWeek: AllOfAccessScheduleDayOfWeek, startHour: Double, endHour: Double) {
self._id = _id
self.userId = userId
self.dayOfWeek = dayOfWeek
self.startHour = startHour
self.endHour = endHour
}
public enum CodingKeys: String, CodingKey {
case _id = "Id"
case userId = "UserId"
case dayOfWeek = "DayOfWeek"
case startHour = "StartHour"
case endHour = "EndHour"
}
}

View File

@ -1,61 +0,0 @@
//
// ActivityLogEntry.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public struct ActivityLogEntry: Codable {
/** Gets or sets the identifier. */
public var _id: Int64?
/** Gets or sets the name. */
public var name: String?
/** Gets or sets the overview. */
public var overview: String?
/** Gets or sets the short overview. */
public var shortOverview: String?
/** Gets or sets the type. */
public var type: String?
/** Gets or sets the item identifier. */
public var itemId: String?
/** Gets or sets the date. */
public var date: Date?
/** Gets or sets the user identifier. */
public var userId: UUID?
/** Gets or sets the user primary image tag. */
public var userPrimaryImageTag: String?
/** Gets or sets the log severity. */
public var severity: AllOfActivityLogEntrySeverity?
public init(_id: Int64? = nil, name: String? = nil, overview: String? = nil, shortOverview: String? = nil, type: String? = nil, itemId: String? = nil, date: Date? = nil, userId: UUID? = nil, userPrimaryImageTag: String? = nil, severity: AllOfActivityLogEntrySeverity? = nil) {
self._id = _id
self.name = name
self.overview = overview
self.shortOverview = shortOverview
self.type = type
self.itemId = itemId
self.date = date
self.userId = userId
self.userPrimaryImageTag = userPrimaryImageTag
self.severity = severity
}
public enum CodingKeys: String, CodingKey {
case _id = "Id"
case name = "Name"
case overview = "Overview"
case shortOverview = "ShortOverview"
case type = "Type"
case itemId = "ItemId"
case date = "Date"
case userId = "UserId"
case userPrimaryImageTag = "UserPrimaryImageTag"
case severity = "Severity"
}
}

View File

@ -1,33 +0,0 @@
//
// ActivityLogEntryQueryResult.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public struct ActivityLogEntryQueryResult: Codable {
/** Gets or sets the items. */
public var items: [ActivityLogEntry]?
/** The total number of records available. */
public var totalRecordCount: Int?
/** The index of the first record in Items. */
public var startIndex: Int?
public init(items: [ActivityLogEntry]? = nil, totalRecordCount: Int? = nil, startIndex: Int? = nil) {
self.items = items
self.totalRecordCount = totalRecordCount
self.startIndex = startIndex
}
public enum CodingKeys: String, CodingKey {
case items = "Items"
case totalRecordCount = "TotalRecordCount"
case startIndex = "StartIndex"
}
}

View File

@ -1,26 +0,0 @@
//
// AddVirtualFolderDto.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Add virtual folder dto. */
public struct AddVirtualFolderDto: Codable {
/** Gets or sets library options. */
public var libraryOptions: AllOfAddVirtualFolderDtoLibraryOptions?
public init(libraryOptions: AllOfAddVirtualFolderDtoLibraryOptions? = nil) {
self.libraryOptions = libraryOptions
}
public enum CodingKeys: String, CodingKey {
case libraryOptions = "LibraryOptions"
}
}

View File

@ -1,38 +0,0 @@
//
// AdminNotificationDto.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** The admin notification dto. */
public struct AdminNotificationDto: Codable {
/** Gets or sets the notification name. */
public var name: String?
/** Gets or sets the notification description. */
public var _description: String?
/** Gets or sets the notification level. */
public var notificationLevel: AllOfAdminNotificationDtoNotificationLevel?
/** Gets or sets the notification url. */
public var url: String?
public init(name: String? = nil, _description: String? = nil, notificationLevel: AllOfAdminNotificationDtoNotificationLevel? = nil, url: String? = nil) {
self.name = name
self._description = _description
self.notificationLevel = notificationLevel
self.url = url
}
public enum CodingKeys: String, CodingKey {
case name = "Name"
case _description = "Description"
case notificationLevel = "NotificationLevel"
case url = "Url"
}
}

View File

@ -1,68 +0,0 @@
//
// AlbumInfo.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public struct AlbumInfo: Codable {
/** Gets or sets the name. */
public var name: String?
/** Gets or sets the path. */
public var path: String?
/** Gets or sets the metadata language. */
public var metadataLanguage: String?
/** Gets or sets the metadata country code. */
public var metadataCountryCode: String?
/** Gets or sets the provider ids. */
public var providerIds: [String:String]?
/** Gets or sets the year. */
public var year: Int?
public var indexNumber: Int?
public var parentIndexNumber: Int?
public var premiereDate: Date?
public var isAutomated: Bool?
/** Gets or sets the album artist. */
public var albumArtists: [String]?
/** Gets or sets the artist provider ids. */
public var artistProviderIds: [String:String]?
public var songInfos: [SongInfo]?
public init(name: String? = nil, path: String? = nil, metadataLanguage: String? = nil, metadataCountryCode: String? = nil, providerIds: [String:String]? = nil, year: Int? = nil, indexNumber: Int? = nil, parentIndexNumber: Int? = nil, premiereDate: Date? = nil, isAutomated: Bool? = nil, albumArtists: [String]? = nil, artistProviderIds: [String:String]? = nil, songInfos: [SongInfo]? = nil) {
self.name = name
self.path = path
self.metadataLanguage = metadataLanguage
self.metadataCountryCode = metadataCountryCode
self.providerIds = providerIds
self.year = year
self.indexNumber = indexNumber
self.parentIndexNumber = parentIndexNumber
self.premiereDate = premiereDate
self.isAutomated = isAutomated
self.albumArtists = albumArtists
self.artistProviderIds = artistProviderIds
self.songInfos = songInfos
}
public enum CodingKeys: String, CodingKey {
case name = "Name"
case path = "Path"
case metadataLanguage = "MetadataLanguage"
case metadataCountryCode = "MetadataCountryCode"
case providerIds = "ProviderIds"
case year = "Year"
case indexNumber = "IndexNumber"
case parentIndexNumber = "ParentIndexNumber"
case premiereDate = "PremiereDate"
case isAutomated = "IsAutomated"
case albumArtists = "AlbumArtists"
case artistProviderIds = "ArtistProviderIds"
case songInfos = "SongInfos"
}
}

View File

@ -1,35 +0,0 @@
//
// AlbumInfoRemoteSearchQuery.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public struct AlbumInfoRemoteSearchQuery: Codable {
public var searchInfo: AllOfAlbumInfoRemoteSearchQuerySearchInfo?
public var itemId: UUID?
/** Will only search within the given provider when set. */
public var searchProviderName: String?
/** Gets or sets a value indicating whether disabled providers should be included. */
public var includeDisabledProviders: Bool?
public init(searchInfo: AllOfAlbumInfoRemoteSearchQuerySearchInfo? = nil, itemId: UUID? = nil, searchProviderName: String? = nil, includeDisabledProviders: Bool? = nil) {
self.searchInfo = searchInfo
self.itemId = itemId
self.searchProviderName = searchProviderName
self.includeDisabledProviders = includeDisabledProviders
}
public enum CodingKeys: String, CodingKey {
case searchInfo = "SearchInfo"
case itemId = "ItemId"
case searchProviderName = "SearchProviderName"
case includeDisabledProviders = "IncludeDisabledProviders"
}
}

View File

@ -1,18 +0,0 @@
//
// AllOfAccessScheduleDayOfWeek.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets the day of week. */
public struct AllOfAccessScheduleDayOfWeek: Codable {
}

View File

@ -1,18 +0,0 @@
//
// AllOfActivityLogEntrySeverity.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets the log severity. */
public struct AllOfActivityLogEntrySeverity: Codable {
}

View File

@ -1,99 +0,0 @@
//
// AllOfAddVirtualFolderDtoLibraryOptions.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets library options. */
public struct AllOfAddVirtualFolderDtoLibraryOptions: Codable {
public var enablePhotos: Bool?
public var enableRealtimeMonitor: Bool?
public var enableChapterImageExtraction: Bool?
public var extractChapterImagesDuringLibraryScan: Bool?
public var pathInfos: [MediaPathInfo]?
public var saveLocalMetadata: Bool?
public var enableInternetProviders: Bool?
public var enableAutomaticSeriesGrouping: Bool?
public var enableEmbeddedTitles: Bool?
public var enableEmbeddedEpisodeInfos: Bool?
public var automaticRefreshIntervalDays: Int?
/** Gets or sets the preferred metadata language. */
public var preferredMetadataLanguage: String?
/** Gets or sets the metadata country code. */
public var metadataCountryCode: String?
public var seasonZeroDisplayName: String?
public var metadataSavers: [String]?
public var disabledLocalMetadataReaders: [String]?
public var localMetadataReaderOrder: [String]?
public var disabledSubtitleFetchers: [String]?
public var subtitleFetcherOrder: [String]?
public var skipSubtitlesIfEmbeddedSubtitlesPresent: Bool?
public var skipSubtitlesIfAudioTrackMatches: Bool?
public var subtitleDownloadLanguages: [String]?
public var requirePerfectSubtitleMatch: Bool?
public var saveSubtitlesWithMedia: Bool?
public var typeOptions: [TypeOptions]?
public init(enablePhotos: Bool? = nil, enableRealtimeMonitor: Bool? = nil, enableChapterImageExtraction: Bool? = nil, extractChapterImagesDuringLibraryScan: Bool? = nil, pathInfos: [MediaPathInfo]? = nil, saveLocalMetadata: Bool? = nil, enableInternetProviders: Bool? = nil, enableAutomaticSeriesGrouping: Bool? = nil, enableEmbeddedTitles: Bool? = nil, enableEmbeddedEpisodeInfos: Bool? = nil, automaticRefreshIntervalDays: Int? = nil, preferredMetadataLanguage: String? = nil, metadataCountryCode: String? = nil, seasonZeroDisplayName: String? = nil, metadataSavers: [String]? = nil, disabledLocalMetadataReaders: [String]? = nil, localMetadataReaderOrder: [String]? = nil, disabledSubtitleFetchers: [String]? = nil, subtitleFetcherOrder: [String]? = nil, skipSubtitlesIfEmbeddedSubtitlesPresent: Bool? = nil, skipSubtitlesIfAudioTrackMatches: Bool? = nil, subtitleDownloadLanguages: [String]? = nil, requirePerfectSubtitleMatch: Bool? = nil, saveSubtitlesWithMedia: Bool? = nil, typeOptions: [TypeOptions]? = nil) {
self.enablePhotos = enablePhotos
self.enableRealtimeMonitor = enableRealtimeMonitor
self.enableChapterImageExtraction = enableChapterImageExtraction
self.extractChapterImagesDuringLibraryScan = extractChapterImagesDuringLibraryScan
self.pathInfos = pathInfos
self.saveLocalMetadata = saveLocalMetadata
self.enableInternetProviders = enableInternetProviders
self.enableAutomaticSeriesGrouping = enableAutomaticSeriesGrouping
self.enableEmbeddedTitles = enableEmbeddedTitles
self.enableEmbeddedEpisodeInfos = enableEmbeddedEpisodeInfos
self.automaticRefreshIntervalDays = automaticRefreshIntervalDays
self.preferredMetadataLanguage = preferredMetadataLanguage
self.metadataCountryCode = metadataCountryCode
self.seasonZeroDisplayName = seasonZeroDisplayName
self.metadataSavers = metadataSavers
self.disabledLocalMetadataReaders = disabledLocalMetadataReaders
self.localMetadataReaderOrder = localMetadataReaderOrder
self.disabledSubtitleFetchers = disabledSubtitleFetchers
self.subtitleFetcherOrder = subtitleFetcherOrder
self.skipSubtitlesIfEmbeddedSubtitlesPresent = skipSubtitlesIfEmbeddedSubtitlesPresent
self.skipSubtitlesIfAudioTrackMatches = skipSubtitlesIfAudioTrackMatches
self.subtitleDownloadLanguages = subtitleDownloadLanguages
self.requirePerfectSubtitleMatch = requirePerfectSubtitleMatch
self.saveSubtitlesWithMedia = saveSubtitlesWithMedia
self.typeOptions = typeOptions
}
public enum CodingKeys: String, CodingKey {
case enablePhotos = "EnablePhotos"
case enableRealtimeMonitor = "EnableRealtimeMonitor"
case enableChapterImageExtraction = "EnableChapterImageExtraction"
case extractChapterImagesDuringLibraryScan = "ExtractChapterImagesDuringLibraryScan"
case pathInfos = "PathInfos"
case saveLocalMetadata = "SaveLocalMetadata"
case enableInternetProviders = "EnableInternetProviders"
case enableAutomaticSeriesGrouping = "EnableAutomaticSeriesGrouping"
case enableEmbeddedTitles = "EnableEmbeddedTitles"
case enableEmbeddedEpisodeInfos = "EnableEmbeddedEpisodeInfos"
case automaticRefreshIntervalDays = "AutomaticRefreshIntervalDays"
case preferredMetadataLanguage = "PreferredMetadataLanguage"
case metadataCountryCode = "MetadataCountryCode"
case seasonZeroDisplayName = "SeasonZeroDisplayName"
case metadataSavers = "MetadataSavers"
case disabledLocalMetadataReaders = "DisabledLocalMetadataReaders"
case localMetadataReaderOrder = "LocalMetadataReaderOrder"
case disabledSubtitleFetchers = "DisabledSubtitleFetchers"
case subtitleFetcherOrder = "SubtitleFetcherOrder"
case skipSubtitlesIfEmbeddedSubtitlesPresent = "SkipSubtitlesIfEmbeddedSubtitlesPresent"
case skipSubtitlesIfAudioTrackMatches = "SkipSubtitlesIfAudioTrackMatches"
case subtitleDownloadLanguages = "SubtitleDownloadLanguages"
case requirePerfectSubtitleMatch = "RequirePerfectSubtitleMatch"
case saveSubtitlesWithMedia = "SaveSubtitlesWithMedia"
case typeOptions = "TypeOptions"
}
}

View File

@ -1,18 +0,0 @@
//
// AllOfAdminNotificationDtoNotificationLevel.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets the notification level. */
public struct AllOfAdminNotificationDtoNotificationLevel: Codable {
}

View File

@ -1,68 +0,0 @@
//
// AllOfAlbumInfoRemoteSearchQuerySearchInfo.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public struct AllOfAlbumInfoRemoteSearchQuerySearchInfo: Codable {
/** Gets or sets the name. */
public var name: String?
/** Gets or sets the path. */
public var path: String?
/** Gets or sets the metadata language. */
public var metadataLanguage: String?
/** Gets or sets the metadata country code. */
public var metadataCountryCode: String?
/** Gets or sets the provider ids. */
public var providerIds: [String:String]?
/** Gets or sets the year. */
public var year: Int?
public var indexNumber: Int?
public var parentIndexNumber: Int?
public var premiereDate: Date?
public var isAutomated: Bool?
/** Gets or sets the album artist. */
public var albumArtists: [String]?
/** Gets or sets the artist provider ids. */
public var artistProviderIds: [String:String]?
public var songInfos: [SongInfo]?
public init(name: String? = nil, path: String? = nil, metadataLanguage: String? = nil, metadataCountryCode: String? = nil, providerIds: [String:String]? = nil, year: Int? = nil, indexNumber: Int? = nil, parentIndexNumber: Int? = nil, premiereDate: Date? = nil, isAutomated: Bool? = nil, albumArtists: [String]? = nil, artistProviderIds: [String:String]? = nil, songInfos: [SongInfo]? = nil) {
self.name = name
self.path = path
self.metadataLanguage = metadataLanguage
self.metadataCountryCode = metadataCountryCode
self.providerIds = providerIds
self.year = year
self.indexNumber = indexNumber
self.parentIndexNumber = parentIndexNumber
self.premiereDate = premiereDate
self.isAutomated = isAutomated
self.albumArtists = albumArtists
self.artistProviderIds = artistProviderIds
self.songInfos = songInfos
}
public enum CodingKeys: String, CodingKey {
case name = "Name"
case path = "Path"
case metadataLanguage = "MetadataLanguage"
case metadataCountryCode = "MetadataCountryCode"
case providerIds = "ProviderIds"
case year = "Year"
case indexNumber = "IndexNumber"
case parentIndexNumber = "ParentIndexNumber"
case premiereDate = "PremiereDate"
case isAutomated = "IsAutomated"
case albumArtists = "AlbumArtists"
case artistProviderIds = "ArtistProviderIds"
case songInfos = "SongInfos"
}
}

View File

@ -1,38 +0,0 @@
//
// AllOfAllThemeMediaResultSoundtrackSongsResult.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Class ThemeMediaResult. */
public struct AllOfAllThemeMediaResultSoundtrackSongsResult: Codable {
/** Gets or sets the items. */
public var items: [BaseItemDto]?
/** The total number of records available. */
public var totalRecordCount: Int?
/** The index of the first record in Items. */
public var startIndex: Int?
/** Gets or sets the owner id. */
public var ownerId: UUID?
public init(items: [BaseItemDto]? = nil, totalRecordCount: Int? = nil, startIndex: Int? = nil, ownerId: UUID? = nil) {
self.items = items
self.totalRecordCount = totalRecordCount
self.startIndex = startIndex
self.ownerId = ownerId
}
public enum CodingKeys: String, CodingKey {
case items = "Items"
case totalRecordCount = "TotalRecordCount"
case startIndex = "StartIndex"
case ownerId = "OwnerId"
}
}

View File

@ -1,38 +0,0 @@
//
// AllOfAllThemeMediaResultThemeSongsResult.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Class ThemeMediaResult. */
public struct AllOfAllThemeMediaResultThemeSongsResult: Codable {
/** Gets or sets the items. */
public var items: [BaseItemDto]?
/** The total number of records available. */
public var totalRecordCount: Int?
/** The index of the first record in Items. */
public var startIndex: Int?
/** Gets or sets the owner id. */
public var ownerId: UUID?
public init(items: [BaseItemDto]? = nil, totalRecordCount: Int? = nil, startIndex: Int? = nil, ownerId: UUID? = nil) {
self.items = items
self.totalRecordCount = totalRecordCount
self.startIndex = startIndex
self.ownerId = ownerId
}
public enum CodingKeys: String, CodingKey {
case items = "Items"
case totalRecordCount = "TotalRecordCount"
case startIndex = "StartIndex"
case ownerId = "OwnerId"
}
}

View File

@ -1,38 +0,0 @@
//
// AllOfAllThemeMediaResultThemeVideosResult.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Class ThemeMediaResult. */
public struct AllOfAllThemeMediaResultThemeVideosResult: Codable {
/** Gets or sets the items. */
public var items: [BaseItemDto]?
/** The total number of records available. */
public var totalRecordCount: Int?
/** The index of the first record in Items. */
public var startIndex: Int?
/** Gets or sets the owner id. */
public var ownerId: UUID?
public init(items: [BaseItemDto]? = nil, totalRecordCount: Int? = nil, startIndex: Int? = nil, ownerId: UUID? = nil) {
self.items = items
self.totalRecordCount = totalRecordCount
self.startIndex = startIndex
self.ownerId = ownerId
}
public enum CodingKeys: String, CodingKey {
case items = "Items"
case totalRecordCount = "TotalRecordCount"
case startIndex = "StartIndex"
case ownerId = "OwnerId"
}
}

View File

@ -1,60 +0,0 @@
//
// AllOfArtistInfoRemoteSearchQuerySearchInfo.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public struct AllOfArtistInfoRemoteSearchQuerySearchInfo: Codable {
/** Gets or sets the name. */
public var name: String?
/** Gets or sets the path. */
public var path: String?
/** Gets or sets the metadata language. */
public var metadataLanguage: String?
/** Gets or sets the metadata country code. */
public var metadataCountryCode: String?
/** Gets or sets the provider ids. */
public var providerIds: [String:String]?
/** Gets or sets the year. */
public var year: Int?
public var indexNumber: Int?
public var parentIndexNumber: Int?
public var premiereDate: Date?
public var isAutomated: Bool?
public var songInfos: [SongInfo]?
public init(name: String? = nil, path: String? = nil, metadataLanguage: String? = nil, metadataCountryCode: String? = nil, providerIds: [String:String]? = nil, year: Int? = nil, indexNumber: Int? = nil, parentIndexNumber: Int? = nil, premiereDate: Date? = nil, isAutomated: Bool? = nil, songInfos: [SongInfo]? = nil) {
self.name = name
self.path = path
self.metadataLanguage = metadataLanguage
self.metadataCountryCode = metadataCountryCode
self.providerIds = providerIds
self.year = year
self.indexNumber = indexNumber
self.parentIndexNumber = parentIndexNumber
self.premiereDate = premiereDate
self.isAutomated = isAutomated
self.songInfos = songInfos
}
public enum CodingKeys: String, CodingKey {
case name = "Name"
case path = "Path"
case metadataLanguage = "MetadataLanguage"
case metadataCountryCode = "MetadataCountryCode"
case providerIds = "ProviderIds"
case year = "Year"
case indexNumber = "IndexNumber"
case parentIndexNumber = "ParentIndexNumber"
case premiereDate = "PremiereDate"
case isAutomated = "IsAutomated"
case songInfos = "SongInfos"
}
}

View File

@ -1,123 +0,0 @@
//
// AllOfAuthenticationResultSessionInfo.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Class SessionInfo. */
public struct AllOfAuthenticationResultSessionInfo: Codable {
public var playState: Any?
public var additionalUsers: [SessionUserInfo]?
public var capabilities: Any?
/** Gets or sets the remote end point. */
public var remoteEndPoint: String?
/** Gets or sets the playable media types. */
public var playableMediaTypes: [String]?
/** Gets or sets the id. */
public var _id: String?
/** Gets or sets the user id. */
public var userId: UUID?
/** Gets or sets the username. */
public var userName: String?
/** Gets or sets the type of the client. */
public var client: String?
/** Gets or sets the last activity date. */
public var lastActivityDate: Date?
/** Gets or sets the last playback check in. */
public var lastPlaybackCheckIn: Date?
/** Gets or sets the name of the device. */
public var deviceName: String?
/** Gets or sets the type of the device. */
public var deviceType: String?
/** Gets or sets the now playing item. */
public var nowPlayingItem: Any?
/** Class BaseItem. */
public var fullNowPlayingItem: Any?
/** This is strictly used as a data transfer object from the api layer. This holds information about a BaseItem in a format that is convenient for the client. */
public var nowViewingItem: Any?
/** Gets or sets the device id. */
public var deviceId: String?
/** Gets or sets the application version. */
public var applicationVersion: String?
public var transcodingInfo: Any?
/** Gets a value indicating whether this instance is active. */
public var isActive: Bool?
public var supportsMediaControl: Bool?
public var supportsRemoteControl: Bool?
public var nowPlayingQueue: [QueueItem]?
public var hasCustomDeviceName: Bool?
public var playlistItemId: String?
public var serverId: String?
public var userPrimaryImageTag: String?
/** Gets or sets the supported commands. */
public var supportedCommands: [GeneralCommandType]?
public init(playState: Any? = nil, additionalUsers: [SessionUserInfo]? = nil, capabilities: Any? = nil, remoteEndPoint: String? = nil, playableMediaTypes: [String]? = nil, _id: String? = nil, userId: UUID? = nil, userName: String? = nil, client: String? = nil, lastActivityDate: Date? = nil, lastPlaybackCheckIn: Date? = nil, deviceName: String? = nil, deviceType: String? = nil, nowPlayingItem: Any? = nil, fullNowPlayingItem: Any? = nil, nowViewingItem: Any? = nil, deviceId: String? = nil, applicationVersion: String? = nil, transcodingInfo: Any? = nil, isActive: Bool? = nil, supportsMediaControl: Bool? = nil, supportsRemoteControl: Bool? = nil, nowPlayingQueue: [QueueItem]? = nil, hasCustomDeviceName: Bool? = nil, playlistItemId: String? = nil, serverId: String? = nil, userPrimaryImageTag: String? = nil, supportedCommands: [GeneralCommandType]? = nil) {
self.playState = playState
self.additionalUsers = additionalUsers
self.capabilities = capabilities
self.remoteEndPoint = remoteEndPoint
self.playableMediaTypes = playableMediaTypes
self._id = _id
self.userId = userId
self.userName = userName
self.client = client
self.lastActivityDate = lastActivityDate
self.lastPlaybackCheckIn = lastPlaybackCheckIn
self.deviceName = deviceName
self.deviceType = deviceType
self.nowPlayingItem = nowPlayingItem
self.fullNowPlayingItem = fullNowPlayingItem
self.nowViewingItem = nowViewingItem
self.deviceId = deviceId
self.applicationVersion = applicationVersion
self.transcodingInfo = transcodingInfo
self.isActive = isActive
self.supportsMediaControl = supportsMediaControl
self.supportsRemoteControl = supportsRemoteControl
self.nowPlayingQueue = nowPlayingQueue
self.hasCustomDeviceName = hasCustomDeviceName
self.playlistItemId = playlistItemId
self.serverId = serverId
self.userPrimaryImageTag = userPrimaryImageTag
self.supportedCommands = supportedCommands
}
public enum CodingKeys: String, CodingKey {
case playState = "PlayState"
case additionalUsers = "AdditionalUsers"
case capabilities = "Capabilities"
case remoteEndPoint = "RemoteEndPoint"
case playableMediaTypes = "PlayableMediaTypes"
case _id = "Id"
case userId = "UserId"
case userName = "UserName"
case client = "Client"
case lastActivityDate = "LastActivityDate"
case lastPlaybackCheckIn = "LastPlaybackCheckIn"
case deviceName = "DeviceName"
case deviceType = "DeviceType"
case nowPlayingItem = "NowPlayingItem"
case fullNowPlayingItem = "FullNowPlayingItem"
case nowViewingItem = "NowViewingItem"
case deviceId = "DeviceId"
case applicationVersion = "ApplicationVersion"
case transcodingInfo = "TranscodingInfo"
case isActive = "IsActive"
case supportsMediaControl = "SupportsMediaControl"
case supportsRemoteControl = "SupportsRemoteControl"
case nowPlayingQueue = "NowPlayingQueue"
case hasCustomDeviceName = "HasCustomDeviceName"
case playlistItemId = "PlaylistItemId"
case serverId = "ServerId"
case userPrimaryImageTag = "UserPrimaryImageTag"
case supportedCommands = "SupportedCommands"
}
}

View File

@ -1,78 +0,0 @@
//
// AllOfAuthenticationResultUser.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Class UserDto. */
public struct AllOfAuthenticationResultUser: Codable {
/** Gets or sets the name. */
public var name: String?
/** Gets or sets the server identifier. */
public var serverId: String?
/** Gets or sets the name of the server. This is not used by the server and is for client-side usage only. */
public var serverName: String?
/** Gets or sets the id. */
public var _id: UUID?
/** Gets or sets the primary image tag. */
public var primaryImageTag: String?
/** Gets or sets a value indicating whether this instance has password. */
public var hasPassword: Bool?
/** Gets or sets a value indicating whether this instance has configured password. */
public var hasConfiguredPassword: Bool?
/** Gets or sets a value indicating whether this instance has configured easy password. */
public var hasConfiguredEasyPassword: Bool?
/** Gets or sets whether async login is enabled or not. */
public var enableAutoLogin: Bool?
/** Gets or sets the last login date. */
public var lastLoginDate: Date?
/** Gets or sets the last activity date. */
public var lastActivityDate: Date?
/** Gets or sets the configuration. */
public var configuration: Any?
/** Gets or sets the policy. */
public var policy: Any?
/** Gets or sets the primary image aspect ratio. */
public var primaryImageAspectRatio: Double?
public init(name: String? = nil, serverId: String? = nil, serverName: String? = nil, _id: UUID? = nil, primaryImageTag: String? = nil, hasPassword: Bool? = nil, hasConfiguredPassword: Bool? = nil, hasConfiguredEasyPassword: Bool? = nil, enableAutoLogin: Bool? = nil, lastLoginDate: Date? = nil, lastActivityDate: Date? = nil, configuration: Any? = nil, policy: Any? = nil, primaryImageAspectRatio: Double? = nil) {
self.name = name
self.serverId = serverId
self.serverName = serverName
self._id = _id
self.primaryImageTag = primaryImageTag
self.hasPassword = hasPassword
self.hasConfiguredPassword = hasConfiguredPassword
self.hasConfiguredEasyPassword = hasConfiguredEasyPassword
self.enableAutoLogin = enableAutoLogin
self.lastLoginDate = lastLoginDate
self.lastActivityDate = lastActivityDate
self.configuration = configuration
self.policy = policy
self.primaryImageAspectRatio = primaryImageAspectRatio
}
public enum CodingKeys: String, CodingKey {
case name = "Name"
case serverId = "ServerId"
case serverName = "ServerName"
case _id = "Id"
case primaryImageTag = "PrimaryImageTag"
case hasPassword = "HasPassword"
case hasConfiguredPassword = "HasConfiguredPassword"
case hasConfiguredEasyPassword = "HasConfiguredEasyPassword"
case enableAutoLogin = "EnableAutoLogin"
case lastLoginDate = "LastLoginDate"
case lastActivityDate = "LastActivityDate"
case configuration = "Configuration"
case policy = "Policy"
case primaryImageAspectRatio = "PrimaryImageAspectRatio"
}
}

View File

@ -1,18 +0,0 @@
//
// AllOfBaseItemDtoAudio.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets the audio. */
public struct AllOfBaseItemDtoAudio: Codable {
}

View File

@ -1,18 +0,0 @@
//
// AllOfBaseItemDtoChannelType.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets the type of the channel. */
public struct AllOfBaseItemDtoChannelType: Codable {
}

View File

@ -1,590 +0,0 @@
//
// AllOfBaseItemDtoCurrentProgram.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets the current program. */
public struct AllOfBaseItemDtoCurrentProgram: Codable {
/** Gets or sets the name. */
public var name: String?
public var originalTitle: String?
/** Gets or sets the server identifier. */
public var serverId: String?
/** Gets or sets the id. */
public var _id: UUID?
/** Gets or sets the etag. */
public var etag: String?
/** Gets or sets the type of the source. */
public var sourceType: String?
/** Gets or sets the playlist item identifier. */
public var playlistItemId: String?
/** Gets or sets the date created. */
public var dateCreated: Date?
public var dateLastMediaAdded: Date?
public var extraType: String?
public var airsBeforeSeasonNumber: Int?
public var airsAfterSeasonNumber: Int?
public var airsBeforeEpisodeNumber: Int?
public var canDelete: Bool?
public var canDownload: Bool?
public var hasSubtitles: Bool?
public var preferredMetadataLanguage: String?
public var preferredMetadataCountryCode: String?
/** Gets or sets a value indicating whether [supports synchronize]. */
public var supportsSync: Bool?
public var container: String?
/** Gets or sets the name of the sort. */
public var sortName: String?
public var forcedSortName: String?
/** Gets or sets the video3 D format. */
public var video3DFormat: Any?
/** Gets or sets the premiere date. */
public var premiereDate: Date?
/** Gets or sets the external urls. */
public var externalUrls: [ExternalUrl]?
/** Gets or sets the media versions. */
public var mediaSources: [MediaSourceInfo]?
/** Gets or sets the critic rating. */
public var criticRating: Float?
public var productionLocations: [String]?
/** Gets or sets the path. */
public var path: String?
public var enableMediaSourceDisplay: Bool?
/** Gets or sets the official rating. */
public var officialRating: String?
/** Gets or sets the custom rating. */
public var customRating: String?
/** Gets or sets the channel identifier. */
public var channelId: UUID?
public var channelName: String?
/** Gets or sets the overview. */
public var overview: String?
/** Gets or sets the taglines. */
public var taglines: [String]?
/** Gets or sets the genres. */
public var genres: [String]?
/** Gets or sets the community rating. */
public var communityRating: Float?
/** Gets or sets the cumulative run time ticks. */
public var cumulativeRunTimeTicks: Int64?
/** Gets or sets the run time ticks. */
public var runTimeTicks: Int64?
/** Gets or sets the play access. */
public var playAccess: Any?
/** Gets or sets the aspect ratio. */
public var aspectRatio: String?
/** Gets or sets the production year. */
public var productionYear: Int?
/** Gets or sets a value indicating whether this instance is place holder. */
public var isPlaceHolder: Bool?
/** Gets or sets the number. */
public var number: String?
public var channelNumber: String?
/** Gets or sets the index number. */
public var indexNumber: Int?
/** Gets or sets the index number end. */
public var indexNumberEnd: Int?
/** Gets or sets the parent index number. */
public var parentIndexNumber: Int?
/** Gets or sets the trailer urls. */
public var remoteTrailers: [MediaUrl]?
/** Gets or sets the provider ids. */
public var providerIds: [String:String]?
/** Gets or sets a value indicating whether this instance is HD. */
public var isHD: Bool?
/** Gets or sets a value indicating whether this instance is folder. */
public var isFolder: Bool?
/** Gets or sets the parent id. */
public var parentId: UUID?
/** Gets or sets the type. */
public var type: String?
/** Gets or sets the people. */
public var people: [BaseItemPerson]?
/** Gets or sets the studios. */
public var studios: [NameGuidPair]?
public var genreItems: [NameGuidPair]?
/** If the item does not have a logo, this will hold the Id of the Parent that has one. */
public var parentLogoItemId: String?
/** If the item does not have any backdrops, this will hold the Id of the Parent that has one. */
public var parentBackdropItemId: String?
/** Gets or sets the parent backdrop image tags. */
public var parentBackdropImageTags: [String]?
/** Gets or sets the local trailer count. */
public var localTrailerCount: Int?
/** User data for this item based on the user it&#x27;s being requested for. */
public var userData: Any?
/** Gets or sets the recursive item count. */
public var recursiveItemCount: Int?
/** Gets or sets the child count. */
public var childCount: Int?
/** Gets or sets the name of the series. */
public var seriesName: String?
/** Gets or sets the series id. */
public var seriesId: UUID?
/** Gets or sets the season identifier. */
public var seasonId: UUID?
/** Gets or sets the special feature count. */
public var specialFeatureCount: Int?
/** Gets or sets the display preferences id. */
public var displayPreferencesId: String?
/** Gets or sets the status. */
public var status: String?
/** Gets or sets the air time. */
public var airTime: String?
/** Gets or sets the air days. */
public var airDays: [DayOfWeek]?
/** Gets or sets the tags. */
public var tags: [String]?
/** Gets or sets the primary image aspect ratio, after image enhancements. */
public var primaryImageAspectRatio: Double?
/** Gets or sets the artists. */
public var artists: [String]?
/** Gets or sets the artist items. */
public var artistItems: [NameGuidPair]?
/** Gets or sets the album. */
public var album: String?
/** Gets or sets the type of the collection. */
public var collectionType: String?
/** Gets or sets the display order. */
public var displayOrder: String?
/** Gets or sets the album id. */
public var albumId: UUID?
/** Gets or sets the album image tag. */
public var albumPrimaryImageTag: String?
/** Gets or sets the series primary image tag. */
public var seriesPrimaryImageTag: String?
/** Gets or sets the album artist. */
public var albumArtist: String?
/** Gets or sets the album artists. */
public var albumArtists: [NameGuidPair]?
/** Gets or sets the name of the season. */
public var seasonName: String?
/** Gets or sets the media streams. */
public var mediaStreams: [MediaStream]?
/** Gets or sets the type of the video. */
public var videoType: Any?
/** Gets or sets the part count. */
public var partCount: Int?
public var mediaSourceCount: Int?
/** Gets or sets the image tags. */
public var imageTags: [String:String]?
/** Gets or sets the backdrop image tags. */
public var backdropImageTags: [String]?
/** Gets or sets the screenshot image tags. */
public var screenshotImageTags: [String]?
/** Gets or sets the parent logo image tag. */
public var parentLogoImageTag: String?
/** If the item does not have a art, this will hold the Id of the Parent that has one. */
public var parentArtItemId: String?
/** Gets or sets the parent art image tag. */
public var parentArtImageTag: String?
/** Gets or sets the series thumb image tag. */
public var seriesThumbImageTag: String?
public var imageBlurHashes: BaseItemDtoImageBlurHashes?
/** Gets or sets the series studio. */
public var seriesStudio: String?
/** Gets or sets the parent thumb item id. */
public var parentThumbItemId: String?
/** Gets or sets the parent thumb image tag. */
public var parentThumbImageTag: String?
/** Gets or sets the parent primary image item identifier. */
public var parentPrimaryImageItemId: String?
/** Gets or sets the parent primary image tag. */
public var parentPrimaryImageTag: String?
/** Gets or sets the chapters. */
public var chapters: [ChapterInfo]?
/** Gets or sets the type of the location. */
public var locationType: Any?
/** Gets or sets the type of the iso. */
public var isoType: Any?
/** Gets or sets the type of the media. */
public var mediaType: String?
/** Gets or sets the end date. */
public var endDate: Date?
/** Gets or sets the locked fields. */
public var lockedFields: [MetadataField]?
/** Gets or sets the trailer count. */
public var trailerCount: Int?
/** Gets or sets the movie count. */
public var movieCount: Int?
/** Gets or sets the series count. */
public var seriesCount: Int?
public var programCount: Int?
/** Gets or sets the episode count. */
public var episodeCount: Int?
/** Gets or sets the song count. */
public var songCount: Int?
/** Gets or sets the album count. */
public var albumCount: Int?
public var artistCount: Int?
/** Gets or sets the music video count. */
public var musicVideoCount: Int?
/** Gets or sets a value indicating whether [enable internet providers]. */
public var lockData: Bool?
public var width: Int?
public var height: Int?
public var cameraMake: String?
public var cameraModel: String?
public var software: String?
public var exposureTime: Double?
public var focalLength: Double?
public var imageOrientation: Any?
public var aperture: Double?
public var shutterSpeed: Double?
public var latitude: Double?
public var longitude: Double?
public var altitude: Double?
public var isoSpeedRating: Int?
/** Gets or sets the series timer identifier. */
public var seriesTimerId: String?
/** Gets or sets the program identifier. */
public var programId: String?
/** Gets or sets the channel primary image tag. */
public var channelPrimaryImageTag: String?
/** The start date of the recording, in UTC. */
public var startDate: Date?
/** Gets or sets the completion percentage. */
public var completionPercentage: Double?
/** Gets or sets a value indicating whether this instance is repeat. */
public var isRepeat: Bool?
/** Gets or sets the episode title. */
public var episodeTitle: String?
/** Gets or sets the type of the channel. */
public var channelType: Any?
/** Gets or sets the audio. */
public var audio: Any?
/** Gets or sets a value indicating whether this instance is movie. */
public var isMovie: Bool?
/** Gets or sets a value indicating whether this instance is sports. */
public var isSports: Bool?
/** Gets or sets a value indicating whether this instance is series. */
public var isSeries: Bool?
/** Gets or sets a value indicating whether this instance is live. */
public var isLive: Bool?
/** Gets or sets a value indicating whether this instance is news. */
public var isNews: Bool?
/** Gets or sets a value indicating whether this instance is kids. */
public var isKids: Bool?
/** Gets or sets a value indicating whether this instance is premiere. */
public var isPremiere: Bool?
/** Gets or sets the timer identifier. */
public var timerId: String?
/** Gets or sets the current program. */
public var currentProgram: Any?
public init(name: String? = nil, originalTitle: String? = nil, serverId: String? = nil, _id: UUID? = nil, etag: String? = nil, sourceType: String? = nil, playlistItemId: String? = nil, dateCreated: Date? = nil, dateLastMediaAdded: Date? = nil, extraType: String? = nil, airsBeforeSeasonNumber: Int? = nil, airsAfterSeasonNumber: Int? = nil, airsBeforeEpisodeNumber: Int? = nil, canDelete: Bool? = nil, canDownload: Bool? = nil, hasSubtitles: Bool? = nil, preferredMetadataLanguage: String? = nil, preferredMetadataCountryCode: String? = nil, supportsSync: Bool? = nil, container: String? = nil, sortName: String? = nil, forcedSortName: String? = nil, video3DFormat: Any? = nil, premiereDate: Date? = nil, externalUrls: [ExternalUrl]? = nil, mediaSources: [MediaSourceInfo]? = nil, criticRating: Float? = nil, productionLocations: [String]? = nil, path: String? = nil, enableMediaSourceDisplay: Bool? = nil, officialRating: String? = nil, customRating: String? = nil, channelId: UUID? = nil, channelName: String? = nil, overview: String? = nil, taglines: [String]? = nil, genres: [String]? = nil, communityRating: Float? = nil, cumulativeRunTimeTicks: Int64? = nil, runTimeTicks: Int64? = nil, playAccess: Any? = nil, aspectRatio: String? = nil, productionYear: Int? = nil, isPlaceHolder: Bool? = nil, number: String? = nil, channelNumber: String? = nil, indexNumber: Int? = nil, indexNumberEnd: Int? = nil, parentIndexNumber: Int? = nil, remoteTrailers: [MediaUrl]? = nil, providerIds: [String:String]? = nil, isHD: Bool? = nil, isFolder: Bool? = nil, parentId: UUID? = nil, type: String? = nil, people: [BaseItemPerson]? = nil, studios: [NameGuidPair]? = nil, genreItems: [NameGuidPair]? = nil, parentLogoItemId: String? = nil, parentBackdropItemId: String? = nil, parentBackdropImageTags: [String]? = nil, localTrailerCount: Int? = nil, userData: Any? = nil, recursiveItemCount: Int? = nil, childCount: Int? = nil, seriesName: String? = nil, seriesId: UUID? = nil, seasonId: UUID? = nil, specialFeatureCount: Int? = nil, displayPreferencesId: String? = nil, status: String? = nil, airTime: String? = nil, airDays: [DayOfWeek]? = nil, tags: [String]? = nil, primaryImageAspectRatio: Double? = nil, artists: [String]? = nil, artistItems: [NameGuidPair]? = nil, album: String? = nil, collectionType: String? = nil, displayOrder: String? = nil, albumId: UUID? = nil, albumPrimaryImageTag: String? = nil, seriesPrimaryImageTag: String? = nil, albumArtist: String? = nil, albumArtists: [NameGuidPair]? = nil, seasonName: String? = nil, mediaStreams: [MediaStream]? = nil, videoType: Any? = nil, partCount: Int? = nil, mediaSourceCount: Int? = nil, imageTags: [String:String]? = nil, backdropImageTags: [String]? = nil, screenshotImageTags: [String]? = nil, parentLogoImageTag: String? = nil, parentArtItemId: String? = nil, parentArtImageTag: String? = nil, seriesThumbImageTag: String? = nil, imageBlurHashes: BaseItemDtoImageBlurHashes? = nil, seriesStudio: String? = nil, parentThumbItemId: String? = nil, parentThumbImageTag: String? = nil, parentPrimaryImageItemId: String? = nil, parentPrimaryImageTag: String? = nil, chapters: [ChapterInfo]? = nil, locationType: Any? = nil, isoType: Any? = nil, mediaType: String? = nil, endDate: Date? = nil, lockedFields: [MetadataField]? = nil, trailerCount: Int? = nil, movieCount: Int? = nil, seriesCount: Int? = nil, programCount: Int? = nil, episodeCount: Int? = nil, songCount: Int? = nil, albumCount: Int? = nil, artistCount: Int? = nil, musicVideoCount: Int? = nil, lockData: Bool? = nil, width: Int? = nil, height: Int? = nil, cameraMake: String? = nil, cameraModel: String? = nil, software: String? = nil, exposureTime: Double? = nil, focalLength: Double? = nil, imageOrientation: Any? = nil, aperture: Double? = nil, shutterSpeed: Double? = nil, latitude: Double? = nil, longitude: Double? = nil, altitude: Double? = nil, isoSpeedRating: Int? = nil, seriesTimerId: String? = nil, programId: String? = nil, channelPrimaryImageTag: String? = nil, startDate: Date? = nil, completionPercentage: Double? = nil, isRepeat: Bool? = nil, episodeTitle: String? = nil, channelType: Any? = nil, audio: Any? = nil, isMovie: Bool? = nil, isSports: Bool? = nil, isSeries: Bool? = nil, isLive: Bool? = nil, isNews: Bool? = nil, isKids: Bool? = nil, isPremiere: Bool? = nil, timerId: String? = nil, currentProgram: Any? = nil) {
self.name = name
self.originalTitle = originalTitle
self.serverId = serverId
self._id = _id
self.etag = etag
self.sourceType = sourceType
self.playlistItemId = playlistItemId
self.dateCreated = dateCreated
self.dateLastMediaAdded = dateLastMediaAdded
self.extraType = extraType
self.airsBeforeSeasonNumber = airsBeforeSeasonNumber
self.airsAfterSeasonNumber = airsAfterSeasonNumber
self.airsBeforeEpisodeNumber = airsBeforeEpisodeNumber
self.canDelete = canDelete
self.canDownload = canDownload
self.hasSubtitles = hasSubtitles
self.preferredMetadataLanguage = preferredMetadataLanguage
self.preferredMetadataCountryCode = preferredMetadataCountryCode
self.supportsSync = supportsSync
self.container = container
self.sortName = sortName
self.forcedSortName = forcedSortName
self.video3DFormat = video3DFormat
self.premiereDate = premiereDate
self.externalUrls = externalUrls
self.mediaSources = mediaSources
self.criticRating = criticRating
self.productionLocations = productionLocations
self.path = path
self.enableMediaSourceDisplay = enableMediaSourceDisplay
self.officialRating = officialRating
self.customRating = customRating
self.channelId = channelId
self.channelName = channelName
self.overview = overview
self.taglines = taglines
self.genres = genres
self.communityRating = communityRating
self.cumulativeRunTimeTicks = cumulativeRunTimeTicks
self.runTimeTicks = runTimeTicks
self.playAccess = playAccess
self.aspectRatio = aspectRatio
self.productionYear = productionYear
self.isPlaceHolder = isPlaceHolder
self.number = number
self.channelNumber = channelNumber
self.indexNumber = indexNumber
self.indexNumberEnd = indexNumberEnd
self.parentIndexNumber = parentIndexNumber
self.remoteTrailers = remoteTrailers
self.providerIds = providerIds
self.isHD = isHD
self.isFolder = isFolder
self.parentId = parentId
self.type = type
self.people = people
self.studios = studios
self.genreItems = genreItems
self.parentLogoItemId = parentLogoItemId
self.parentBackdropItemId = parentBackdropItemId
self.parentBackdropImageTags = parentBackdropImageTags
self.localTrailerCount = localTrailerCount
self.userData = userData
self.recursiveItemCount = recursiveItemCount
self.childCount = childCount
self.seriesName = seriesName
self.seriesId = seriesId
self.seasonId = seasonId
self.specialFeatureCount = specialFeatureCount
self.displayPreferencesId = displayPreferencesId
self.status = status
self.airTime = airTime
self.airDays = airDays
self.tags = tags
self.primaryImageAspectRatio = primaryImageAspectRatio
self.artists = artists
self.artistItems = artistItems
self.album = album
self.collectionType = collectionType
self.displayOrder = displayOrder
self.albumId = albumId
self.albumPrimaryImageTag = albumPrimaryImageTag
self.seriesPrimaryImageTag = seriesPrimaryImageTag
self.albumArtist = albumArtist
self.albumArtists = albumArtists
self.seasonName = seasonName
self.mediaStreams = mediaStreams
self.videoType = videoType
self.partCount = partCount
self.mediaSourceCount = mediaSourceCount
self.imageTags = imageTags
self.backdropImageTags = backdropImageTags
self.screenshotImageTags = screenshotImageTags
self.parentLogoImageTag = parentLogoImageTag
self.parentArtItemId = parentArtItemId
self.parentArtImageTag = parentArtImageTag
self.seriesThumbImageTag = seriesThumbImageTag
self.imageBlurHashes = imageBlurHashes
self.seriesStudio = seriesStudio
self.parentThumbItemId = parentThumbItemId
self.parentThumbImageTag = parentThumbImageTag
self.parentPrimaryImageItemId = parentPrimaryImageItemId
self.parentPrimaryImageTag = parentPrimaryImageTag
self.chapters = chapters
self.locationType = locationType
self.isoType = isoType
self.mediaType = mediaType
self.endDate = endDate
self.lockedFields = lockedFields
self.trailerCount = trailerCount
self.movieCount = movieCount
self.seriesCount = seriesCount
self.programCount = programCount
self.episodeCount = episodeCount
self.songCount = songCount
self.albumCount = albumCount
self.artistCount = artistCount
self.musicVideoCount = musicVideoCount
self.lockData = lockData
self.width = width
self.height = height
self.cameraMake = cameraMake
self.cameraModel = cameraModel
self.software = software
self.exposureTime = exposureTime
self.focalLength = focalLength
self.imageOrientation = imageOrientation
self.aperture = aperture
self.shutterSpeed = shutterSpeed
self.latitude = latitude
self.longitude = longitude
self.altitude = altitude
self.isoSpeedRating = isoSpeedRating
self.seriesTimerId = seriesTimerId
self.programId = programId
self.channelPrimaryImageTag = channelPrimaryImageTag
self.startDate = startDate
self.completionPercentage = completionPercentage
self.isRepeat = isRepeat
self.episodeTitle = episodeTitle
self.channelType = channelType
self.audio = audio
self.isMovie = isMovie
self.isSports = isSports
self.isSeries = isSeries
self.isLive = isLive
self.isNews = isNews
self.isKids = isKids
self.isPremiere = isPremiere
self.timerId = timerId
self.currentProgram = currentProgram
}
public enum CodingKeys: String, CodingKey {
case name = "Name"
case originalTitle = "OriginalTitle"
case serverId = "ServerId"
case _id = "Id"
case etag = "Etag"
case sourceType = "SourceType"
case playlistItemId = "PlaylistItemId"
case dateCreated = "DateCreated"
case dateLastMediaAdded = "DateLastMediaAdded"
case extraType = "ExtraType"
case airsBeforeSeasonNumber = "AirsBeforeSeasonNumber"
case airsAfterSeasonNumber = "AirsAfterSeasonNumber"
case airsBeforeEpisodeNumber = "AirsBeforeEpisodeNumber"
case canDelete = "CanDelete"
case canDownload = "CanDownload"
case hasSubtitles = "HasSubtitles"
case preferredMetadataLanguage = "PreferredMetadataLanguage"
case preferredMetadataCountryCode = "PreferredMetadataCountryCode"
case supportsSync = "SupportsSync"
case container = "Container"
case sortName = "SortName"
case forcedSortName = "ForcedSortName"
case video3DFormat = "Video3DFormat"
case premiereDate = "PremiereDate"
case externalUrls = "ExternalUrls"
case mediaSources = "MediaSources"
case criticRating = "CriticRating"
case productionLocations = "ProductionLocations"
case path = "Path"
case enableMediaSourceDisplay = "EnableMediaSourceDisplay"
case officialRating = "OfficialRating"
case customRating = "CustomRating"
case channelId = "ChannelId"
case channelName = "ChannelName"
case overview = "Overview"
case taglines = "Taglines"
case genres = "Genres"
case communityRating = "CommunityRating"
case cumulativeRunTimeTicks = "CumulativeRunTimeTicks"
case runTimeTicks = "RunTimeTicks"
case playAccess = "PlayAccess"
case aspectRatio = "AspectRatio"
case productionYear = "ProductionYear"
case isPlaceHolder = "IsPlaceHolder"
case number = "Number"
case channelNumber = "ChannelNumber"
case indexNumber = "IndexNumber"
case indexNumberEnd = "IndexNumberEnd"
case parentIndexNumber = "ParentIndexNumber"
case remoteTrailers = "RemoteTrailers"
case providerIds = "ProviderIds"
case isHD = "IsHD"
case isFolder = "IsFolder"
case parentId = "ParentId"
case type = "Type"
case people = "People"
case studios = "Studios"
case genreItems = "GenreItems"
case parentLogoItemId = "ParentLogoItemId"
case parentBackdropItemId = "ParentBackdropItemId"
case parentBackdropImageTags = "ParentBackdropImageTags"
case localTrailerCount = "LocalTrailerCount"
case userData = "UserData"
case recursiveItemCount = "RecursiveItemCount"
case childCount = "ChildCount"
case seriesName = "SeriesName"
case seriesId = "SeriesId"
case seasonId = "SeasonId"
case specialFeatureCount = "SpecialFeatureCount"
case displayPreferencesId = "DisplayPreferencesId"
case status = "Status"
case airTime = "AirTime"
case airDays = "AirDays"
case tags = "Tags"
case primaryImageAspectRatio = "PrimaryImageAspectRatio"
case artists = "Artists"
case artistItems = "ArtistItems"
case album = "Album"
case collectionType = "CollectionType"
case displayOrder = "DisplayOrder"
case albumId = "AlbumId"
case albumPrimaryImageTag = "AlbumPrimaryImageTag"
case seriesPrimaryImageTag = "SeriesPrimaryImageTag"
case albumArtist = "AlbumArtist"
case albumArtists = "AlbumArtists"
case seasonName = "SeasonName"
case mediaStreams = "MediaStreams"
case videoType = "VideoType"
case partCount = "PartCount"
case mediaSourceCount = "MediaSourceCount"
case imageTags = "ImageTags"
case backdropImageTags = "BackdropImageTags"
case screenshotImageTags = "ScreenshotImageTags"
case parentLogoImageTag = "ParentLogoImageTag"
case parentArtItemId = "ParentArtItemId"
case parentArtImageTag = "ParentArtImageTag"
case seriesThumbImageTag = "SeriesThumbImageTag"
case imageBlurHashes = "ImageBlurHashes"
case seriesStudio = "SeriesStudio"
case parentThumbItemId = "ParentThumbItemId"
case parentThumbImageTag = "ParentThumbImageTag"
case parentPrimaryImageItemId = "ParentPrimaryImageItemId"
case parentPrimaryImageTag = "ParentPrimaryImageTag"
case chapters = "Chapters"
case locationType = "LocationType"
case isoType = "IsoType"
case mediaType = "MediaType"
case endDate = "EndDate"
case lockedFields = "LockedFields"
case trailerCount = "TrailerCount"
case movieCount = "MovieCount"
case seriesCount = "SeriesCount"
case programCount = "ProgramCount"
case episodeCount = "EpisodeCount"
case songCount = "SongCount"
case albumCount = "AlbumCount"
case artistCount = "ArtistCount"
case musicVideoCount = "MusicVideoCount"
case lockData = "LockData"
case width = "Width"
case height = "Height"
case cameraMake = "CameraMake"
case cameraModel = "CameraModel"
case software = "Software"
case exposureTime = "ExposureTime"
case focalLength = "FocalLength"
case imageOrientation = "ImageOrientation"
case aperture = "Aperture"
case shutterSpeed = "ShutterSpeed"
case latitude = "Latitude"
case longitude = "Longitude"
case altitude = "Altitude"
case isoSpeedRating = "IsoSpeedRating"
case seriesTimerId = "SeriesTimerId"
case programId = "ProgramId"
case channelPrimaryImageTag = "ChannelPrimaryImageTag"
case startDate = "StartDate"
case completionPercentage = "CompletionPercentage"
case isRepeat = "IsRepeat"
case episodeTitle = "EpisodeTitle"
case channelType = "ChannelType"
case audio = "Audio"
case isMovie = "IsMovie"
case isSports = "IsSports"
case isSeries = "IsSeries"
case isLive = "IsLive"
case isNews = "IsNews"
case isKids = "IsKids"
case isPremiere = "IsPremiere"
case timerId = "TimerId"
case currentProgram = "CurrentProgram"
}
}

View File

@ -1,17 +0,0 @@
//
// AllOfBaseItemDtoImageOrientation.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
public struct AllOfBaseItemDtoImageOrientation: Codable {
}

View File

@ -1,18 +0,0 @@
//
// AllOfBaseItemDtoIsoType.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets the type of the iso. */
public struct AllOfBaseItemDtoIsoType: Codable {
}

View File

@ -1,18 +0,0 @@
//
// AllOfBaseItemDtoLocationType.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets the type of the location. */
public struct AllOfBaseItemDtoLocationType: Codable {
}

View File

@ -1,18 +0,0 @@
//
// AllOfBaseItemDtoPlayAccess.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** Gets or sets the play access. */
public struct AllOfBaseItemDtoPlayAccess: Codable {
}

View File

@ -1,66 +0,0 @@
//
// AllOfBaseItemDtoUserData.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
/** User data for this item based on the user it&#x27;s being requested for. */
public struct AllOfBaseItemDtoUserData: Codable {
/** Gets or sets the rating. */
public var rating: Double?
/** Gets or sets the played percentage. */
public var playedPercentage: Double?
/** Gets or sets the unplayed item count. */
public var unplayedItemCount: Int?
/** Gets or sets the playback position ticks. */
public var playbackPositionTicks: Int64?
/** Gets or sets the play count. */
public var playCount: Int?
/** Gets or sets a value indicating whether this instance is favorite. */
public var isFavorite: Bool?
/** Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is likes. */
public var likes: Bool?
/** Gets or sets the last played date. */
public var lastPlayedDate: Date?
/** Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is played. */
public var played: Bool?
/** Gets or sets the key. */
public var key: String?
/** Gets or sets the item identifier. */
public var itemId: String?
public init(rating: Double? = nil, playedPercentage: Double? = nil, unplayedItemCount: Int? = nil, playbackPositionTicks: Int64? = nil, playCount: Int? = nil, isFavorite: Bool? = nil, likes: Bool? = nil, lastPlayedDate: Date? = nil, played: Bool? = nil, key: String? = nil, itemId: String? = nil) {
self.rating = rating
self.playedPercentage = playedPercentage
self.unplayedItemCount = unplayedItemCount
self.playbackPositionTicks = playbackPositionTicks
self.playCount = playCount
self.isFavorite = isFavorite
self.likes = likes
self.lastPlayedDate = lastPlayedDate
self.played = played
self.key = key
self.itemId = itemId
}
public enum CodingKeys: String, CodingKey {
case rating = "Rating"
case playedPercentage = "PlayedPercentage"
case unplayedItemCount = "UnplayedItemCount"
case playbackPositionTicks = "PlaybackPositionTicks"
case playCount = "PlayCount"
case isFavorite = "IsFavorite"
case likes = "Likes"
case lastPlayedDate = "LastPlayedDate"
case played = "Played"
case key = "Key"
case itemId = "ItemId"
}
}

Some files were not shown because too many files have changed in this diff Show More