mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 12:47:44 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2
This commit is contained in:
@@ -237,6 +237,8 @@ case .empty:
|
||||
|
||||
### Other models
|
||||
- ``Operations/Account``
|
||||
- ``Operations/Action``
|
||||
- ``Operations/ActiveDirection``
|
||||
- ``Operations/Activity``
|
||||
- ``Operations/AddPlaylistContentsErrors``
|
||||
- ``Operations/AddPlaylistContentsMediaContainer``
|
||||
@@ -265,6 +267,7 @@ case .empty:
|
||||
- ``Operations/ClearPlaylistContentsPlaylistsErrors``
|
||||
- ``Operations/ClearPlaylistContentsRequest``
|
||||
- ``Operations/ClearPlaylistContentsUnauthorized``
|
||||
- ``Operations/Collection``
|
||||
- ``Operations/Connections``
|
||||
- ``Operations/Context``
|
||||
- ``Operations/Country``
|
||||
@@ -276,6 +279,7 @@ case .empty:
|
||||
- ``Operations/CreatePlaylistRequest``
|
||||
- ``Operations/CreatePlaylistResponseBody``
|
||||
- ``Operations/CreatePlaylistUnauthorized``
|
||||
- ``Operations/DefaultDirection``
|
||||
- ``Operations/DefaultSubtitleAccessibility``
|
||||
- ``Operations/DefaultSubtitleForced``
|
||||
- ``Operations/DeleteLibraryErrors``
|
||||
@@ -299,6 +303,7 @@ case .empty:
|
||||
- ``Operations/Field``
|
||||
- ``Operations/FieldType``
|
||||
- ``Operations/Filter``
|
||||
- ``Operations/FlattenSeasons``
|
||||
- ``Operations/Force``
|
||||
- ``Operations/Friend``
|
||||
- ``Operations/Genre``
|
||||
@@ -329,7 +334,10 @@ case .empty:
|
||||
- ``Operations/GetLibraryItemsFieldType``
|
||||
- ``Operations/GetLibraryItemsFilter``
|
||||
- ``Operations/GetLibraryItemsGenre``
|
||||
- ``Operations/GetLibraryItemsImage``
|
||||
- ``Operations/GetLibraryItemsLibraryErrors``
|
||||
- ``Operations/GetLibraryItemsLibraryResponseType``
|
||||
- ``Operations/GetLibraryItemsLibraryType``
|
||||
- ``Operations/GetLibraryItemsMedia``
|
||||
- ``Operations/GetLibraryItemsMediaContainer``
|
||||
- ``Operations/GetLibraryItemsMetadata``
|
||||
@@ -631,6 +639,7 @@ case .empty:
|
||||
- ``Operations/GetUserFriendsPlexErrors``
|
||||
- ``Operations/GetUserFriendsUnauthorized``
|
||||
- ``Operations/Guids``
|
||||
- ``Operations/HasThumbnail``
|
||||
- ``Operations/Hub``
|
||||
- ``Operations/Image``
|
||||
- ``Operations/IncludeCollections``
|
||||
@@ -728,6 +737,7 @@ case .empty:
|
||||
- ``Operations/Setting``
|
||||
- ``Operations/SharedServers``
|
||||
- ``Operations/SharedSources``
|
||||
- ``Operations/ShowOrdering``
|
||||
- ``Operations/Skip``
|
||||
- ``Operations/Smart``
|
||||
- ``Operations/Sort``
|
||||
@@ -766,6 +776,7 @@ case .empty:
|
||||
- ``Operations/TranscodeSession``
|
||||
- ``Operations/Trials``
|
||||
- ``Operations/TypeModel``
|
||||
- ``Operations/UltraBlurColors``
|
||||
- ``Operations/UpdatePlaylistErrors``
|
||||
- ``Operations/UpdatePlaylistPlaylistsErrors``
|
||||
- ``Operations/UpdatePlaylistRequest``
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.ActiveDirection: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.DefaultDirection: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.FlattenSeasons: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsLibraryResponseType: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
@@ -32,9 +32,9 @@ extension Operations.GetLibraryItemsRequest: PathParameterSerializable {
|
||||
extension Operations.GetLibraryItemsRequest: QueryParameterSerializable {
|
||||
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||
let builder = QueryParameterBuilder()
|
||||
try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: includeGuids, named: "includeGuids", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: includeMeta, named: "includeMeta", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: xPlexContainerSize, named: "X-Plex-Container-Size", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: xPlexContainerStart, named: "X-Plex-Container-Start", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
return builder.build()
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsType: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.HasThumbnail: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.ShowOrdering: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
26
Sources/Plexswift/models/operations/Action.swift
Normal file
26
Sources/Plexswift/models/operations/Action.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Action {
|
||||
public let id: String
|
||||
public let key: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(id: String, key: String) {
|
||||
self.id = id
|
||||
self.key = key
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.Action: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case key
|
||||
}
|
||||
}
|
||||
|
||||
11
Sources/Plexswift/models/operations/ActiveDirection.swift
Normal file
11
Sources/Plexswift/models/operations/ActiveDirection.swift
Normal file
@@ -0,0 +1,11 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// The direction of the sort. Can be either `asc` or `desc`.
|
||||
///
|
||||
public enum ActiveDirection: String, Codable, APIValue {
|
||||
case ascending = "asc"
|
||||
case descending = "desc"
|
||||
}}
|
||||
23
Sources/Plexswift/models/operations/Collection.swift
Normal file
23
Sources/Plexswift/models/operations/Collection.swift
Normal file
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Collection {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.Collection: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
11
Sources/Plexswift/models/operations/DefaultDirection.swift
Normal file
11
Sources/Plexswift/models/operations/DefaultDirection.swift
Normal file
@@ -0,0 +1,11 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// The direction of the sort. Can be either `asc` or `desc`.
|
||||
///
|
||||
public enum DefaultDirection: String, Codable, APIValue {
|
||||
case ascending = "asc"
|
||||
case descending = "desc"
|
||||
}}
|
||||
@@ -5,25 +5,37 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Feature {
|
||||
public let type: String
|
||||
public let action: [Operations.Action]?
|
||||
public let directory: [Operations.GetMediaProvidersDirectory]?
|
||||
public let flavor: String?
|
||||
public let key: String?
|
||||
public let type: String?
|
||||
public let scrobbleKey: String?
|
||||
public let unscrobbleKey: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(directory: [Operations.GetMediaProvidersDirectory]? = nil, key: String? = nil, type: String? = nil) {
|
||||
self.directory = directory
|
||||
self.key = key
|
||||
public init(type: String, action: [Operations.Action]? = nil, directory: [Operations.GetMediaProvidersDirectory]? = nil, flavor: String? = nil, key: String? = nil, scrobbleKey: String? = nil, unscrobbleKey: String? = nil) {
|
||||
self.type = type
|
||||
self.action = action
|
||||
self.directory = directory
|
||||
self.flavor = flavor
|
||||
self.key = key
|
||||
self.scrobbleKey = scrobbleKey
|
||||
self.unscrobbleKey = unscrobbleKey
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.Feature: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case directory = "Directory"
|
||||
case key
|
||||
case type
|
||||
case action = "Action"
|
||||
case directory = "Directory"
|
||||
case flavor
|
||||
case key
|
||||
case scrobbleKey
|
||||
case unscrobbleKey
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
Sources/Plexswift/models/operations/FlattenSeasons.swift
Normal file
9
Sources/Plexswift/models/operations/FlattenSeasons.swift
Normal file
@@ -0,0 +1,9 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum FlattenSeasons: String, Codable, APIValue {
|
||||
case `false` = "0"
|
||||
case `true` = "1"
|
||||
}}
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsImage {
|
||||
public let alt: String
|
||||
public let type: Operations.GetLibraryItemsLibraryResponseType
|
||||
public let url: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(alt: String, type: Operations.GetLibraryItemsLibraryResponseType, url: String) {
|
||||
self.alt = alt
|
||||
self.type = type
|
||||
self.url = url
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsImage: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case alt
|
||||
case type
|
||||
case url
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum GetLibraryItemsLibraryResponseType: String, Codable, APIValue {
|
||||
case coverPoster = "coverPoster"
|
||||
case background = "background"
|
||||
case snapshot = "snapshot"
|
||||
case clearLogo = "clearLogo"
|
||||
}}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsLibraryType {
|
||||
public let active: Bool
|
||||
public let key: String
|
||||
public let title: String
|
||||
public let type: String
|
||||
public let field: [Operations.GetLibraryItemsField]?
|
||||
public let filter: [Operations.GetLibraryItemsFilter]?
|
||||
public let sort: [Operations.GetLibraryItemsSort]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(active: Bool, key: String, title: String, type: String, field: [Operations.GetLibraryItemsField]? = nil, filter: [Operations.GetLibraryItemsFilter]? = nil, sort: [Operations.GetLibraryItemsSort]? = nil) {
|
||||
self.active = active
|
||||
self.key = key
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.field = field
|
||||
self.filter = filter
|
||||
self.sort = sort
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsLibraryType: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case active
|
||||
case key
|
||||
case title
|
||||
case type
|
||||
case field = "Field"
|
||||
case filter = "Filter"
|
||||
case sort = "Sort"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,26 +6,28 @@ extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsMedia {
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
public let audioChannels: Int?
|
||||
public let audioCodec: String?
|
||||
public let bitrate: Int?
|
||||
public let container: String?
|
||||
public let duration: Int?
|
||||
public let height: Int?
|
||||
public let id: Int?
|
||||
public let part: [Operations.GetLibraryItemsPart]?
|
||||
public let videoCodec: String?
|
||||
public let videoFrameRate: String?
|
||||
public let videoProfile: String?
|
||||
public let videoResolution: String?
|
||||
public let width: Int?
|
||||
public private(set) var aspectRatio: Double
|
||||
public let audioChannels: Int
|
||||
public let audioCodec: String
|
||||
public let bitrate: Int
|
||||
public let container: String
|
||||
public let duration: Int
|
||||
public let height: Int
|
||||
public let id: Int
|
||||
public let part: [Operations.GetLibraryItemsPart]
|
||||
public let videoCodec: String
|
||||
public let videoFrameRate: String
|
||||
public let videoProfile: String
|
||||
public let videoResolution: String
|
||||
public let width: Int
|
||||
public let audioProfile: String?
|
||||
public let hasVoiceActivity: Bool?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, bitrate: Int? = nil, container: String? = nil, duration: Int? = nil, height: Int? = nil, id: Int? = nil, part: [Operations.GetLibraryItemsPart]? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
public init(aspectRatio: Double, audioChannels: Int, audioCodec: String, bitrate: Int, container: String, duration: Int, height: Int, id: Int, part: [Operations.GetLibraryItemsPart], videoCodec: String, videoFrameRate: String, videoProfile: String, videoResolution: String, width: Int, audioProfile: String? = nil, hasVoiceActivity: Bool? = nil) {
|
||||
self._aspectRatio = DecimalSerialized<Double>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.bitrate = bitrate
|
||||
@@ -39,6 +41,8 @@ extension Operations {
|
||||
self.videoProfile = videoProfile
|
||||
self.videoResolution = videoResolution
|
||||
self.width = width
|
||||
self.audioProfile = audioProfile
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -58,49 +62,53 @@ extension Operations.GetLibraryItemsMedia: Codable {
|
||||
case videoProfile
|
||||
case videoResolution
|
||||
case width
|
||||
case audioProfile
|
||||
case hasVoiceActivity
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self._aspectRatio = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .aspectRatio) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.audioChannels = try container.decodeIfPresent(Int.self, forKey: .audioChannels)
|
||||
self.audioCodec = try container.decodeIfPresent(String.self, forKey: .audioCodec)
|
||||
self.bitrate = try container.decodeIfPresent(Int.self, forKey: .bitrate)
|
||||
self.container = try container.decodeIfPresent(String.self, forKey: .container)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.id = try container.decodeIfPresent(Int.self, forKey: .id)
|
||||
self.part = try container.decodeIfPresent([Operations.GetLibraryItemsPart].self, forKey: .part)
|
||||
self.videoCodec = try container.decodeIfPresent(String.self, forKey: .videoCodec)
|
||||
self.videoFrameRate = try container.decodeIfPresent(String.self, forKey: .videoFrameRate)
|
||||
self.videoProfile = try container.decodeIfPresent(String.self, forKey: .videoProfile)
|
||||
self.videoResolution = try container.decodeIfPresent(String.self, forKey: .videoResolution)
|
||||
self.width = try container.decodeIfPresent(Int.self, forKey: .width)
|
||||
self._aspectRatio = try container.decode(DecimalSerialized<Double>.self, forKey: .aspectRatio)
|
||||
self.audioChannels = try container.decode(Int.self, forKey: .audioChannels)
|
||||
self.audioCodec = try container.decode(String.self, forKey: .audioCodec)
|
||||
self.bitrate = try container.decode(Int.self, forKey: .bitrate)
|
||||
self.container = try container.decode(String.self, forKey: .container)
|
||||
self.duration = try container.decode(Int.self, forKey: .duration)
|
||||
self.height = try container.decode(Int.self, forKey: .height)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.part = try container.decode([Operations.GetLibraryItemsPart].self, forKey: .part)
|
||||
self.videoCodec = try container.decode(String.self, forKey: .videoCodec)
|
||||
self.videoFrameRate = try container.decode(String.self, forKey: .videoFrameRate)
|
||||
self.videoProfile = try container.decode(String.self, forKey: .videoProfile)
|
||||
self.videoResolution = try container.decode(String.self, forKey: .videoResolution)
|
||||
self.width = try container.decode(Int.self, forKey: .width)
|
||||
self.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile)
|
||||
self.hasVoiceActivity = try container.decodeIfPresent(Bool.self, forKey: .hasVoiceActivity)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if self.aspectRatio != nil {
|
||||
try container.encode(self._aspectRatio, forKey: .aspectRatio)
|
||||
}
|
||||
try container.encodeIfPresent(self.audioChannels, forKey: .audioChannels)
|
||||
try container.encodeIfPresent(self.audioCodec, forKey: .audioCodec)
|
||||
try container.encodeIfPresent(self.bitrate, forKey: .bitrate)
|
||||
try container.encodeIfPresent(self.container, forKey: .container)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.id, forKey: .id)
|
||||
try container.encodeIfPresent(self.part, forKey: .part)
|
||||
try container.encodeIfPresent(self.videoCodec, forKey: .videoCodec)
|
||||
try container.encodeIfPresent(self.videoFrameRate, forKey: .videoFrameRate)
|
||||
try container.encodeIfPresent(self.videoProfile, forKey: .videoProfile)
|
||||
try container.encodeIfPresent(self.videoResolution, forKey: .videoResolution)
|
||||
try container.encodeIfPresent(self.width, forKey: .width)
|
||||
try container.encode(self._aspectRatio, forKey: .aspectRatio)
|
||||
try container.encode(self.audioChannels, forKey: .audioChannels)
|
||||
try container.encode(self.audioCodec, forKey: .audioCodec)
|
||||
try container.encode(self.bitrate, forKey: .bitrate)
|
||||
try container.encode(self.container, forKey: .container)
|
||||
try container.encode(self.duration, forKey: .duration)
|
||||
try container.encode(self.height, forKey: .height)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.part, forKey: .part)
|
||||
try container.encode(self.videoCodec, forKey: .videoCodec)
|
||||
try container.encode(self.videoFrameRate, forKey: .videoFrameRate)
|
||||
try container.encode(self.videoProfile, forKey: .videoProfile)
|
||||
try container.encode(self.videoResolution, forKey: .videoResolution)
|
||||
try container.encode(self.width, forKey: .width)
|
||||
try container.encodeIfPresent(self.audioProfile, forKey: .audioProfile)
|
||||
try container.encodeIfPresent(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryItemsMedia {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double?> {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double> {
|
||||
return _aspectRatio
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,22 +7,26 @@ extension Operations {
|
||||
public struct GetLibraryItemsMediaContainer {
|
||||
public let allowSync: Bool
|
||||
public let art: String
|
||||
public let content: String
|
||||
public let identifier: String
|
||||
public let librarySectionID: Operations.LibrarySectionID
|
||||
public let librarySectionTitle: String
|
||||
public let librarySectionUUID: String
|
||||
public let mediaTagPrefix: String
|
||||
public let mediaTagVersion: Int
|
||||
public let metadata: [Operations.GetLibraryItemsMetadata]
|
||||
public let offset: Int
|
||||
public let size: Int
|
||||
public let thumb: String
|
||||
public let title1: String
|
||||
public let title2: String
|
||||
public let totalSize: Int
|
||||
public let viewGroup: String
|
||||
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
|
||||
///
|
||||
public let meta: Operations.Meta?
|
||||
public let metadata: [Operations.GetLibraryItemsMetadata]?
|
||||
public let mixedParents: Bool?
|
||||
public let nocache: Bool?
|
||||
public let viewMode: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
@@ -30,23 +34,27 @@ extension Operations {
|
||||
/// - Parameter meta: The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
|
||||
///
|
||||
///
|
||||
public init(allowSync: Bool, art: String, identifier: String, librarySectionID: Operations.LibrarySectionID, librarySectionTitle: String, librarySectionUUID: String, mediaTagPrefix: String, mediaTagVersion: Int, size: Int, thumb: String, title1: String, title2: String, viewGroup: String, meta: Operations.Meta? = nil, metadata: [Operations.GetLibraryItemsMetadata]? = nil, mixedParents: Bool? = nil, viewMode: Int? = nil) {
|
||||
public init(allowSync: Bool, art: String, content: String, identifier: String, librarySectionID: Operations.LibrarySectionID, librarySectionTitle: String, librarySectionUUID: String, mediaTagPrefix: String, mediaTagVersion: Int, metadata: [Operations.GetLibraryItemsMetadata], offset: Int, size: Int, thumb: String, title1: String, title2: String, totalSize: Int, viewGroup: String, meta: Operations.Meta? = nil, mixedParents: Bool? = nil, nocache: Bool? = nil, viewMode: Int? = nil) {
|
||||
self.allowSync = allowSync
|
||||
self.art = art
|
||||
self.content = content
|
||||
self.identifier = identifier
|
||||
self.librarySectionID = librarySectionID
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.librarySectionUUID = librarySectionUUID
|
||||
self.mediaTagPrefix = mediaTagPrefix
|
||||
self.mediaTagVersion = mediaTagVersion
|
||||
self.metadata = metadata
|
||||
self.offset = offset
|
||||
self.size = size
|
||||
self.thumb = thumb
|
||||
self.title1 = title1
|
||||
self.title2 = title2
|
||||
self.totalSize = totalSize
|
||||
self.viewGroup = viewGroup
|
||||
self.meta = meta
|
||||
self.metadata = metadata
|
||||
self.mixedParents = mixedParents
|
||||
self.nocache = nocache
|
||||
self.viewMode = viewMode
|
||||
}
|
||||
}}
|
||||
@@ -55,20 +63,24 @@ extension Operations.GetLibraryItemsMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case allowSync
|
||||
case art
|
||||
case content
|
||||
case identifier
|
||||
case librarySectionID
|
||||
case librarySectionTitle
|
||||
case librarySectionUUID
|
||||
case mediaTagPrefix
|
||||
case mediaTagVersion
|
||||
case metadata = "Metadata"
|
||||
case offset
|
||||
case size
|
||||
case thumb
|
||||
case title1
|
||||
case title2
|
||||
case totalSize
|
||||
case viewGroup
|
||||
case meta = "Meta"
|
||||
case metadata = "Metadata"
|
||||
case mixedParents
|
||||
case nocache
|
||||
case viewMode
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,37 +5,50 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsMetadata {
|
||||
public let duration: Int
|
||||
/// Unix epoch datetime in seconds
|
||||
public let addedAt: Int
|
||||
public let guid: String
|
||||
public let key: String
|
||||
public let media: [Operations.GetLibraryItemsMedia]
|
||||
/// The rating key (Media ID) of this media item.
|
||||
/// Note: This is always an integer, but is represented as a string in the API.
|
||||
///
|
||||
public let ratingKey: String
|
||||
public let summary: String
|
||||
public let title: String
|
||||
public let type: String
|
||||
public let year: Int
|
||||
public let addedAt: Int?
|
||||
/// The type of media content
|
||||
///
|
||||
public let type: Operations.GetLibraryItemsType
|
||||
public let art: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var audienceRating: Double?
|
||||
public let audienceRatingImage: String?
|
||||
public let banner: String?
|
||||
public let chapterSource: String?
|
||||
public let childCount: Int?
|
||||
public let collection: [Operations.Collection]?
|
||||
public let contentRating: String?
|
||||
public let country: [Operations.GetLibraryItemsCountry]?
|
||||
public let director: [Operations.GetLibraryItemsDirector]?
|
||||
public let duration: Int?
|
||||
public let flattenSeasons: Operations.FlattenSeasons?
|
||||
public let genre: [Operations.GetLibraryItemsGenre]?
|
||||
public let grandparentArt: String?
|
||||
public let grandparentGuid: String?
|
||||
public let grandparentKey: String?
|
||||
public let grandparentRatingKey: String?
|
||||
public let grandparentSlug: String?
|
||||
public let grandparentTheme: String?
|
||||
public let grandparentThumb: String?
|
||||
public let grandparentTitle: String?
|
||||
public let hasPremiumExtras: String?
|
||||
public let hasPremiumPrimaryExtra: String?
|
||||
public let image: [Operations.GetLibraryItemsImage]?
|
||||
public let index: Int?
|
||||
public let lastViewedAt: Int?
|
||||
public let leafCount: Int?
|
||||
/// The Media object is only included when type query is `4` or higher.
|
||||
///
|
||||
public let media: [Operations.GetLibraryItemsMedia]?
|
||||
/// The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
|
||||
///
|
||||
public let mediaGuid: [Operations.MediaGuid]?
|
||||
@@ -45,6 +58,8 @@ extension Operations {
|
||||
public let parentGuid: String?
|
||||
public let parentIndex: Int?
|
||||
public let parentKey: String?
|
||||
/// The rating key of the parent item.
|
||||
///
|
||||
public let parentRatingKey: String?
|
||||
public let parentStudio: String?
|
||||
public let parentTheme: String?
|
||||
@@ -56,55 +71,91 @@ extension Operations {
|
||||
public private(set) var rating: Double?
|
||||
public let ratingImage: String?
|
||||
public let role: [Operations.GetLibraryItemsRole]?
|
||||
public let seasonCount: Int?
|
||||
/// Setting that indicates the episode ordering for the show
|
||||
/// None = Library default,
|
||||
/// tmdbAiring = The Movie Database (Aired),
|
||||
/// aired = TheTVDB (Aired),
|
||||
/// dvd = TheTVDB (DVD),
|
||||
/// absolute = TheTVDB (Absolute)).
|
||||
///
|
||||
public let showOrdering: Operations.ShowOrdering?
|
||||
public let skipChildren: Bool?
|
||||
public let skipCount: Int?
|
||||
public let slug: String?
|
||||
public let studio: String?
|
||||
public let summary: String?
|
||||
public let tagline: String?
|
||||
public let theme: String?
|
||||
public let thumb: String?
|
||||
public let titleSort: String?
|
||||
public let ultraBlurColors: Operations.UltraBlurColors?
|
||||
/// Unix epoch datetime in seconds
|
||||
public let updatedAt: Int?
|
||||
public let viewCount: Int?
|
||||
public let viewedLeafCount: Int?
|
||||
public let viewOffset: Int?
|
||||
public let writer: [Operations.GetLibraryItemsWriter]?
|
||||
public let year: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter addedAt: Unix epoch datetime in seconds
|
||||
/// - Parameter ratingKey: The rating key (Media ID) of this media item.
|
||||
/// Note: This is always an integer, but is represented as a string in the API.
|
||||
///
|
||||
/// - Parameter type: The type of media content
|
||||
///
|
||||
/// - Parameter media: The Media object is only included when type query is `4` or higher.
|
||||
///
|
||||
/// - Parameter mediaGuid: The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
|
||||
///
|
||||
/// - Parameter parentRatingKey: The rating key of the parent item.
|
||||
///
|
||||
/// - Parameter showOrdering: Setting that indicates the episode ordering for the show
|
||||
/// None = Library default,
|
||||
/// tmdbAiring = The Movie Database (Aired),
|
||||
/// aired = TheTVDB (Aired),
|
||||
/// dvd = TheTVDB (DVD),
|
||||
/// absolute = TheTVDB (Absolute)).
|
||||
///
|
||||
/// - Parameter updatedAt: Unix epoch datetime in seconds
|
||||
///
|
||||
public init(duration: Int, guid: String, key: String, media: [Operations.GetLibraryItemsMedia], ratingKey: String, title: String, type: String, year: Int, addedAt: Int? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, contentRating: String? = nil, country: [Operations.GetLibraryItemsCountry]? = nil, director: [Operations.GetLibraryItemsDirector]? = nil, genre: [Operations.GetLibraryItemsGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, hasPremiumExtras: String? = nil, hasPremiumPrimaryExtra: String? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, mediaGuid: [Operations.MediaGuid]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentStudio: String? = nil, parentTheme: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, parentYear: Int? = nil, primaryExtraKey: String? = nil, rating: Double? = nil, ratingImage: String? = nil, role: [Operations.GetLibraryItemsRole]? = nil, skipCount: Int? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, theme: String? = nil, thumb: String? = nil, titleSort: String? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetLibraryItemsWriter]? = nil) {
|
||||
self.duration = duration
|
||||
public init(addedAt: Int, guid: String, key: String, ratingKey: String, summary: String, title: String, type: Operations.GetLibraryItemsType, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, banner: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, collection: [Operations.Collection]? = nil, contentRating: String? = nil, country: [Operations.GetLibraryItemsCountry]? = nil, director: [Operations.GetLibraryItemsDirector]? = nil, duration: Int? = nil, flattenSeasons: Operations.FlattenSeasons? = nil, genre: [Operations.GetLibraryItemsGenre]? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentSlug: String? = nil, grandparentTheme: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, hasPremiumExtras: String? = nil, hasPremiumPrimaryExtra: String? = nil, image: [Operations.GetLibraryItemsImage]? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, media: [Operations.GetLibraryItemsMedia]? = nil, mediaGuid: [Operations.MediaGuid]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentStudio: String? = nil, parentTheme: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, parentYear: Int? = nil, primaryExtraKey: String? = nil, rating: Double? = nil, ratingImage: String? = nil, role: [Operations.GetLibraryItemsRole]? = nil, seasonCount: Int? = nil, showOrdering: Operations.ShowOrdering? = nil, skipChildren: Bool? = nil, skipCount: Int? = nil, slug: String? = nil, studio: String? = nil, tagline: String? = nil, theme: String? = nil, thumb: String? = nil, titleSort: String? = nil, ultraBlurColors: Operations.UltraBlurColors? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetLibraryItemsWriter]? = nil, year: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.guid = guid
|
||||
self.key = key
|
||||
self.media = media
|
||||
self.ratingKey = ratingKey
|
||||
self.summary = summary
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.year = year
|
||||
self.addedAt = addedAt
|
||||
self.art = art
|
||||
self._audienceRating = DecimalSerialized<Double?>(wrappedValue: audienceRating)
|
||||
self.audienceRatingImage = audienceRatingImage
|
||||
self.banner = banner
|
||||
self.chapterSource = chapterSource
|
||||
self.childCount = childCount
|
||||
self.collection = collection
|
||||
self.contentRating = contentRating
|
||||
self.country = country
|
||||
self.director = director
|
||||
self.duration = duration
|
||||
self.flattenSeasons = flattenSeasons
|
||||
self.genre = genre
|
||||
self.grandparentArt = grandparentArt
|
||||
self.grandparentGuid = grandparentGuid
|
||||
self.grandparentKey = grandparentKey
|
||||
self.grandparentRatingKey = grandparentRatingKey
|
||||
self.grandparentSlug = grandparentSlug
|
||||
self.grandparentTheme = grandparentTheme
|
||||
self.grandparentThumb = grandparentThumb
|
||||
self.grandparentTitle = grandparentTitle
|
||||
self.hasPremiumExtras = hasPremiumExtras
|
||||
self.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra
|
||||
self.image = image
|
||||
self.index = index
|
||||
self.lastViewedAt = lastViewedAt
|
||||
self.leafCount = leafCount
|
||||
self.media = media
|
||||
self.mediaGuid = mediaGuid
|
||||
self._originallyAvailableAt = DateOnly<Date?>(wrappedValue: originallyAvailableAt)
|
||||
self.originalTitle = originalTitle
|
||||
@@ -121,53 +172,63 @@ extension Operations {
|
||||
self._rating = DecimalSerialized<Double?>(wrappedValue: rating)
|
||||
self.ratingImage = ratingImage
|
||||
self.role = role
|
||||
self.seasonCount = seasonCount
|
||||
self.showOrdering = showOrdering
|
||||
self.skipChildren = skipChildren
|
||||
self.skipCount = skipCount
|
||||
self.slug = slug
|
||||
self.studio = studio
|
||||
self.summary = summary
|
||||
self.tagline = tagline
|
||||
self.theme = theme
|
||||
self.thumb = thumb
|
||||
self.titleSort = titleSort
|
||||
self.ultraBlurColors = ultraBlurColors
|
||||
self.updatedAt = updatedAt
|
||||
self.viewCount = viewCount
|
||||
self.viewedLeafCount = viewedLeafCount
|
||||
self.viewOffset = viewOffset
|
||||
self.writer = writer
|
||||
self.year = year
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case duration
|
||||
case addedAt
|
||||
case guid
|
||||
case key
|
||||
case media = "Media"
|
||||
case ratingKey
|
||||
case summary
|
||||
case title
|
||||
case type
|
||||
case year
|
||||
case addedAt
|
||||
case art
|
||||
case audienceRating
|
||||
case audienceRatingImage
|
||||
case banner
|
||||
case chapterSource
|
||||
case childCount
|
||||
case collection = "Collection"
|
||||
case contentRating
|
||||
case country = "Country"
|
||||
case director = "Director"
|
||||
case duration
|
||||
case flattenSeasons
|
||||
case genre = "Genre"
|
||||
case grandparentArt
|
||||
case grandparentGuid
|
||||
case grandparentKey
|
||||
case grandparentRatingKey
|
||||
case grandparentSlug
|
||||
case grandparentTheme
|
||||
case grandparentThumb
|
||||
case grandparentTitle
|
||||
case hasPremiumExtras
|
||||
case hasPremiumPrimaryExtra
|
||||
case image = "Image"
|
||||
case index
|
||||
case lastViewedAt
|
||||
case leafCount
|
||||
case media = "Media"
|
||||
case mediaGuid = "Guid"
|
||||
case originallyAvailableAt
|
||||
case originalTitle
|
||||
@@ -184,52 +245,62 @@ extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
case rating
|
||||
case ratingImage
|
||||
case role = "Role"
|
||||
case seasonCount
|
||||
case showOrdering
|
||||
case skipChildren
|
||||
case skipCount
|
||||
case slug
|
||||
case studio
|
||||
case summary
|
||||
case tagline
|
||||
case theme
|
||||
case thumb
|
||||
case titleSort
|
||||
case ultraBlurColors = "UltraBlurColors"
|
||||
case updatedAt
|
||||
case viewCount
|
||||
case viewedLeafCount
|
||||
case viewOffset
|
||||
case writer = "Writer"
|
||||
case year
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.duration = try container.decode(Int.self, forKey: .duration)
|
||||
self.addedAt = try container.decode(Int.self, forKey: .addedAt)
|
||||
self.guid = try container.decode(String.self, forKey: .guid)
|
||||
self.key = try container.decode(String.self, forKey: .key)
|
||||
self.media = try container.decode([Operations.GetLibraryItemsMedia].self, forKey: .media)
|
||||
self.ratingKey = try container.decode(String.self, forKey: .ratingKey)
|
||||
self.summary = try container.decode(String.self, forKey: .summary)
|
||||
self.title = try container.decode(String.self, forKey: .title)
|
||||
self.type = try container.decode(String.self, forKey: .type)
|
||||
self.year = try container.decode(Int.self, forKey: .year)
|
||||
self.addedAt = try container.decodeIfPresent(Int.self, forKey: .addedAt)
|
||||
self.type = try container.decode(Operations.GetLibraryItemsType.self, forKey: .type)
|
||||
self.art = try container.decodeIfPresent(String.self, forKey: .art)
|
||||
self._audienceRating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .audienceRating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.audienceRatingImage = try container.decodeIfPresent(String.self, forKey: .audienceRatingImage)
|
||||
self.banner = try container.decodeIfPresent(String.self, forKey: .banner)
|
||||
self.chapterSource = try container.decodeIfPresent(String.self, forKey: .chapterSource)
|
||||
self.childCount = try container.decodeIfPresent(Int.self, forKey: .childCount)
|
||||
self.collection = try container.decodeIfPresent([Operations.Collection].self, forKey: .collection)
|
||||
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
|
||||
self.country = try container.decodeIfPresent([Operations.GetLibraryItemsCountry].self, forKey: .country)
|
||||
self.director = try container.decodeIfPresent([Operations.GetLibraryItemsDirector].self, forKey: .director)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.flattenSeasons = try container.decodeIfPresent(Operations.FlattenSeasons.self, forKey: .flattenSeasons)
|
||||
self.genre = try container.decodeIfPresent([Operations.GetLibraryItemsGenre].self, forKey: .genre)
|
||||
self.grandparentArt = try container.decodeIfPresent(String.self, forKey: .grandparentArt)
|
||||
self.grandparentGuid = try container.decodeIfPresent(String.self, forKey: .grandparentGuid)
|
||||
self.grandparentKey = try container.decodeIfPresent(String.self, forKey: .grandparentKey)
|
||||
self.grandparentRatingKey = try container.decodeIfPresent(String.self, forKey: .grandparentRatingKey)
|
||||
self.grandparentSlug = try container.decodeIfPresent(String.self, forKey: .grandparentSlug)
|
||||
self.grandparentTheme = try container.decodeIfPresent(String.self, forKey: .grandparentTheme)
|
||||
self.grandparentThumb = try container.decodeIfPresent(String.self, forKey: .grandparentThumb)
|
||||
self.grandparentTitle = try container.decodeIfPresent(String.self, forKey: .grandparentTitle)
|
||||
self.hasPremiumExtras = try container.decodeIfPresent(String.self, forKey: .hasPremiumExtras)
|
||||
self.hasPremiumPrimaryExtra = try container.decodeIfPresent(String.self, forKey: .hasPremiumPrimaryExtra)
|
||||
self.image = try container.decodeIfPresent([Operations.GetLibraryItemsImage].self, forKey: .image)
|
||||
self.index = try container.decodeIfPresent(Int.self, forKey: .index)
|
||||
self.lastViewedAt = try container.decodeIfPresent(Int.self, forKey: .lastViewedAt)
|
||||
self.leafCount = try container.decodeIfPresent(Int.self, forKey: .leafCount)
|
||||
self.media = try container.decodeIfPresent([Operations.GetLibraryItemsMedia].self, forKey: .media)
|
||||
self.mediaGuid = try container.decodeIfPresent([Operations.MediaGuid].self, forKey: .mediaGuid)
|
||||
self._originallyAvailableAt = try container.decodeIfPresent(DateOnly<Date?>.self, forKey: .originallyAvailableAt) ?? DateOnly<Date?>(wrappedValue: nil)
|
||||
self.originalTitle = try container.decodeIfPresent(String.self, forKey: .originalTitle)
|
||||
@@ -246,54 +317,64 @@ extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
self._rating = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .rating) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.ratingImage = try container.decodeIfPresent(String.self, forKey: .ratingImage)
|
||||
self.role = try container.decodeIfPresent([Operations.GetLibraryItemsRole].self, forKey: .role)
|
||||
self.seasonCount = try container.decodeIfPresent(Int.self, forKey: .seasonCount)
|
||||
self.showOrdering = try container.decodeIfPresent(Operations.ShowOrdering.self, forKey: .showOrdering)
|
||||
self.skipChildren = try container.decodeIfPresent(Bool.self, forKey: .skipChildren)
|
||||
self.skipCount = try container.decodeIfPresent(Int.self, forKey: .skipCount)
|
||||
self.slug = try container.decodeIfPresent(String.self, forKey: .slug)
|
||||
self.studio = try container.decodeIfPresent(String.self, forKey: .studio)
|
||||
self.summary = try container.decodeIfPresent(String.self, forKey: .summary)
|
||||
self.tagline = try container.decodeIfPresent(String.self, forKey: .tagline)
|
||||
self.theme = try container.decodeIfPresent(String.self, forKey: .theme)
|
||||
self.thumb = try container.decodeIfPresent(String.self, forKey: .thumb)
|
||||
self.titleSort = try container.decodeIfPresent(String.self, forKey: .titleSort)
|
||||
self.ultraBlurColors = try container.decodeIfPresent(Operations.UltraBlurColors.self, forKey: .ultraBlurColors)
|
||||
self.updatedAt = try container.decodeIfPresent(Int.self, forKey: .updatedAt)
|
||||
self.viewCount = try container.decodeIfPresent(Int.self, forKey: .viewCount)
|
||||
self.viewedLeafCount = try container.decodeIfPresent(Int.self, forKey: .viewedLeafCount)
|
||||
self.viewOffset = try container.decodeIfPresent(Int.self, forKey: .viewOffset)
|
||||
self.writer = try container.decodeIfPresent([Operations.GetLibraryItemsWriter].self, forKey: .writer)
|
||||
self.year = try container.decodeIfPresent(Int.self, forKey: .year)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.duration, forKey: .duration)
|
||||
try container.encode(self.addedAt, forKey: .addedAt)
|
||||
try container.encode(self.guid, forKey: .guid)
|
||||
try container.encode(self.key, forKey: .key)
|
||||
try container.encode(self.media, forKey: .media)
|
||||
try container.encode(self.ratingKey, forKey: .ratingKey)
|
||||
try container.encode(self.summary, forKey: .summary)
|
||||
try container.encode(self.title, forKey: .title)
|
||||
try container.encode(self.type, forKey: .type)
|
||||
try container.encode(self.year, forKey: .year)
|
||||
try container.encodeIfPresent(self.addedAt, forKey: .addedAt)
|
||||
try container.encodeIfPresent(self.art, forKey: .art)
|
||||
if self.audienceRating != nil {
|
||||
try container.encode(self._audienceRating, forKey: .audienceRating)
|
||||
}
|
||||
try container.encodeIfPresent(self.audienceRatingImage, forKey: .audienceRatingImage)
|
||||
try container.encodeIfPresent(self.banner, forKey: .banner)
|
||||
try container.encodeIfPresent(self.chapterSource, forKey: .chapterSource)
|
||||
try container.encodeIfPresent(self.childCount, forKey: .childCount)
|
||||
try container.encodeIfPresent(self.collection, forKey: .collection)
|
||||
try container.encodeIfPresent(self.contentRating, forKey: .contentRating)
|
||||
try container.encodeIfPresent(self.country, forKey: .country)
|
||||
try container.encodeIfPresent(self.director, forKey: .director)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.flattenSeasons, forKey: .flattenSeasons)
|
||||
try container.encodeIfPresent(self.genre, forKey: .genre)
|
||||
try container.encodeIfPresent(self.grandparentArt, forKey: .grandparentArt)
|
||||
try container.encodeIfPresent(self.grandparentGuid, forKey: .grandparentGuid)
|
||||
try container.encodeIfPresent(self.grandparentKey, forKey: .grandparentKey)
|
||||
try container.encodeIfPresent(self.grandparentRatingKey, forKey: .grandparentRatingKey)
|
||||
try container.encodeIfPresent(self.grandparentSlug, forKey: .grandparentSlug)
|
||||
try container.encodeIfPresent(self.grandparentTheme, forKey: .grandparentTheme)
|
||||
try container.encodeIfPresent(self.grandparentThumb, forKey: .grandparentThumb)
|
||||
try container.encodeIfPresent(self.grandparentTitle, forKey: .grandparentTitle)
|
||||
try container.encodeIfPresent(self.hasPremiumExtras, forKey: .hasPremiumExtras)
|
||||
try container.encodeIfPresent(self.hasPremiumPrimaryExtra, forKey: .hasPremiumPrimaryExtra)
|
||||
try container.encodeIfPresent(self.image, forKey: .image)
|
||||
try container.encodeIfPresent(self.index, forKey: .index)
|
||||
try container.encodeIfPresent(self.lastViewedAt, forKey: .lastViewedAt)
|
||||
try container.encodeIfPresent(self.leafCount, forKey: .leafCount)
|
||||
try container.encodeIfPresent(self.media, forKey: .media)
|
||||
try container.encodeIfPresent(self.mediaGuid, forKey: .mediaGuid)
|
||||
if self.originallyAvailableAt != nil {
|
||||
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||||
@@ -314,18 +395,23 @@ extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
}
|
||||
try container.encodeIfPresent(self.ratingImage, forKey: .ratingImage)
|
||||
try container.encodeIfPresent(self.role, forKey: .role)
|
||||
try container.encodeIfPresent(self.seasonCount, forKey: .seasonCount)
|
||||
try container.encodeIfPresent(self.showOrdering, forKey: .showOrdering)
|
||||
try container.encodeIfPresent(self.skipChildren, forKey: .skipChildren)
|
||||
try container.encodeIfPresent(self.skipCount, forKey: .skipCount)
|
||||
try container.encodeIfPresent(self.slug, forKey: .slug)
|
||||
try container.encodeIfPresent(self.studio, forKey: .studio)
|
||||
try container.encodeIfPresent(self.summary, forKey: .summary)
|
||||
try container.encodeIfPresent(self.tagline, forKey: .tagline)
|
||||
try container.encodeIfPresent(self.theme, forKey: .theme)
|
||||
try container.encodeIfPresent(self.thumb, forKey: .thumb)
|
||||
try container.encodeIfPresent(self.titleSort, forKey: .titleSort)
|
||||
try container.encodeIfPresent(self.ultraBlurColors, forKey: .ultraBlurColors)
|
||||
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
|
||||
try container.encodeIfPresent(self.viewCount, forKey: .viewCount)
|
||||
try container.encodeIfPresent(self.viewedLeafCount, forKey: .viewedLeafCount)
|
||||
try container.encodeIfPresent(self.viewOffset, forKey: .viewOffset)
|
||||
try container.encodeIfPresent(self.writer, forKey: .writer)
|
||||
try container.encodeIfPresent(self.year, forKey: .year)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,18 +5,25 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsPart {
|
||||
public let container: String?
|
||||
public let duration: Int?
|
||||
public let file: String?
|
||||
public let id: Int?
|
||||
public let key: String?
|
||||
public let size: Int?
|
||||
public let videoProfile: String?
|
||||
/// The container format of the media file.
|
||||
///
|
||||
public let container: String
|
||||
public let duration: Int
|
||||
public let file: String
|
||||
public let id: Int
|
||||
public let key: String
|
||||
public let size: Int
|
||||
public let videoProfile: String
|
||||
public let audioProfile: String?
|
||||
public let hasThumbnail: Operations.HasThumbnail?
|
||||
public let indexes: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter container: The container format of the media file.
|
||||
///
|
||||
///
|
||||
public init(container: String? = nil, duration: Int? = nil, file: String? = nil, id: Int? = nil, key: String? = nil, size: Int? = nil, videoProfile: String? = nil) {
|
||||
public init(container: String, duration: Int, file: String, id: Int, key: String, size: Int, videoProfile: String, audioProfile: String? = nil, hasThumbnail: Operations.HasThumbnail? = nil, indexes: String? = nil) {
|
||||
self.container = container
|
||||
self.duration = duration
|
||||
self.file = file
|
||||
@@ -24,6 +31,9 @@ extension Operations {
|
||||
self.key = key
|
||||
self.size = size
|
||||
self.videoProfile = videoProfile
|
||||
self.audioProfile = audioProfile
|
||||
self.hasThumbnail = hasThumbnail
|
||||
self.indexes = indexes
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -36,6 +46,9 @@ extension Operations.GetLibraryItemsPart: Codable {
|
||||
case key
|
||||
case size
|
||||
case videoProfile
|
||||
case audioProfile
|
||||
case hasThumbnail
|
||||
case indexes
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,12 @@ extension Operations {
|
||||
public let sectionKey: Int
|
||||
/// A key representing a specific tag within the section.
|
||||
public let tag: Operations.Tag
|
||||
/// Adds the Guids object to the response
|
||||
///
|
||||
public let includeGuids: Operations.IncludeGuids?
|
||||
/// Adds the Meta object to the response
|
||||
///
|
||||
public let includeMeta: Operations.IncludeMeta?
|
||||
/// The type of media to retrieve.
|
||||
/// 1 = movie
|
||||
/// 2 = show
|
||||
@@ -18,13 +24,7 @@ extension Operations {
|
||||
/// 4 = episode
|
||||
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
|
||||
///
|
||||
public let type: Operations.TypeModel
|
||||
/// Adds the Guids object to the response
|
||||
///
|
||||
public let includeGuids: Operations.IncludeGuids?
|
||||
/// Adds the Meta object to the response
|
||||
///
|
||||
public let includeMeta: Operations.IncludeMeta?
|
||||
public let type: Operations.TypeModel?
|
||||
/// The number of items to return. If not specified, all items will be returned.
|
||||
/// If the number of items exceeds the limit, the response will be paginated.
|
||||
/// By default this is 50
|
||||
@@ -42,6 +42,10 @@ extension Operations {
|
||||
/// Note: This is unique in the context of the Plex server.
|
||||
///
|
||||
/// - Parameter tag: A key representing a specific tag within the section.
|
||||
/// - Parameter includeGuids: Adds the Guids object to the response
|
||||
///
|
||||
/// - Parameter includeMeta: Adds the Meta object to the response
|
||||
///
|
||||
/// - Parameter type: The type of media to retrieve.
|
||||
/// 1 = movie
|
||||
/// 2 = show
|
||||
@@ -49,10 +53,6 @@ extension Operations {
|
||||
/// 4 = episode
|
||||
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
|
||||
///
|
||||
/// - Parameter includeGuids: Adds the Guids object to the response
|
||||
///
|
||||
/// - Parameter includeMeta: Adds the Meta object to the response
|
||||
///
|
||||
/// - Parameter xPlexContainerSize: The number of items to return. If not specified, all items will be returned.
|
||||
/// If the number of items exceeds the limit, the response will be paginated.
|
||||
/// By default this is 50
|
||||
@@ -62,12 +62,12 @@ extension Operations {
|
||||
/// By default this is 0
|
||||
///
|
||||
///
|
||||
public init(sectionKey: Int, tag: Operations.Tag, type: Operations.TypeModel, includeGuids: Operations.IncludeGuids? = nil, includeMeta: Operations.IncludeMeta? = nil, xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) {
|
||||
public init(sectionKey: Int, tag: Operations.Tag, includeGuids: Operations.IncludeGuids? = nil, includeMeta: Operations.IncludeMeta? = nil, type: Operations.TypeModel? = nil, xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) {
|
||||
self.sectionKey = sectionKey
|
||||
self.tag = tag
|
||||
self.type = type
|
||||
self.includeGuids = includeGuids
|
||||
self.includeMeta = includeMeta
|
||||
self.type = type
|
||||
self.xPlexContainerSize = xPlexContainerSize
|
||||
self.xPlexContainerStart = xPlexContainerStart
|
||||
}
|
||||
|
||||
@@ -5,20 +5,32 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsSort {
|
||||
public let defaultDirection: String
|
||||
/// The direction of the sort. Can be either `asc` or `desc`.
|
||||
///
|
||||
public let defaultDirection: Operations.DefaultDirection
|
||||
public let key: String
|
||||
public let title: String
|
||||
public let active: Bool?
|
||||
/// The direction of the sort. Can be either `asc` or `desc`.
|
||||
///
|
||||
public let activeDirection: Operations.ActiveDirection?
|
||||
public let `default`: String?
|
||||
public let descKey: String?
|
||||
public let firstCharacterKey: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter defaultDirection: The direction of the sort. Can be either `asc` or `desc`.
|
||||
///
|
||||
/// - Parameter activeDirection: The direction of the sort. Can be either `asc` or `desc`.
|
||||
///
|
||||
///
|
||||
public init(defaultDirection: String, key: String, title: String, `default`: String? = nil, descKey: String? = nil, firstCharacterKey: String? = nil) {
|
||||
public init(defaultDirection: Operations.DefaultDirection, key: String, title: String, active: Bool? = nil, activeDirection: Operations.ActiveDirection? = nil, `default`: String? = nil, descKey: String? = nil, firstCharacterKey: String? = nil) {
|
||||
self.defaultDirection = defaultDirection
|
||||
self.key = key
|
||||
self.title = title
|
||||
self.active = active
|
||||
self.activeDirection = activeDirection
|
||||
self.`default` = `default`
|
||||
self.descKey = descKey
|
||||
self.firstCharacterKey = firstCharacterKey
|
||||
@@ -30,6 +42,8 @@ extension Operations.GetLibraryItemsSort: Codable {
|
||||
case defaultDirection
|
||||
case key
|
||||
case title
|
||||
case active
|
||||
case activeDirection
|
||||
case `default` = "default"
|
||||
case descKey
|
||||
case firstCharacterKey
|
||||
|
||||
@@ -3,39 +3,11 @@
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsType {
|
||||
public let active: Bool
|
||||
public let key: String
|
||||
public let title: String
|
||||
public let type: String
|
||||
public let field: [Operations.GetLibraryItemsField]?
|
||||
public let filter: [Operations.GetLibraryItemsFilter]?
|
||||
public let sort: [Operations.GetLibraryItemsSort]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(active: Bool, key: String, title: String, type: String, field: [Operations.GetLibraryItemsField]? = nil, filter: [Operations.GetLibraryItemsFilter]? = nil, sort: [Operations.GetLibraryItemsSort]? = nil) {
|
||||
self.active = active
|
||||
self.key = key
|
||||
self.title = title
|
||||
self.type = type
|
||||
self.field = field
|
||||
self.filter = filter
|
||||
self.sort = sort
|
||||
}
|
||||
/// The type of media content
|
||||
///
|
||||
public enum GetLibraryItemsType: String, Codable, APIValue {
|
||||
case movie = "movie"
|
||||
case tvShow = "show"
|
||||
case season = "season"
|
||||
case episode = "episode"
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsType: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case active
|
||||
case key
|
||||
case title
|
||||
case type
|
||||
case field = "Field"
|
||||
case filter = "Filter"
|
||||
case sort = "Sort"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ extension Operations {
|
||||
///
|
||||
public enum GetPlaylistContentsQueryParamType: Int, Codable, APIValue {
|
||||
case movie = 1
|
||||
case show = 2
|
||||
case tvShow = 2
|
||||
case season = 3
|
||||
case episode = 4
|
||||
}}
|
||||
|
||||
@@ -15,6 +15,7 @@ extension Operations {
|
||||
public private(set) var adsConsentSetAt: Date
|
||||
/// Unknown
|
||||
public let anonymous: Bool
|
||||
public let attributionPartner: String
|
||||
/// The account token
|
||||
public let authToken: String
|
||||
/// If the two-factor authentication backup codes have been created
|
||||
@@ -127,11 +128,12 @@ extension Operations {
|
||||
/// - Parameter roles: [Might be removed] List of account roles. Plexpass membership listed here
|
||||
///
|
||||
@available(*, deprecated, message: "This initializer uses deprecated fields and will be removed in a future version.")
|
||||
public init(adsConsent: Bool, adsConsentReminderAt: Date, adsConsentSetAt: Date, anonymous: Bool, authToken: String, backupCodesCreated: Bool, confirmed: Bool, country: String, email: String, emailOnlyAuth: Bool, entitlements: [String], experimentalFeatures: Bool, friendlyName: String, guest: Bool, hasPassword: Bool, home: Bool, homeAdmin: Bool, homeSize: Int, id: Int, joinedAt: Int, locale: String, mailingListActive: Bool, mailingListStatus: Operations.MailingListStatus, maxHomeSize: Int, profile: Operations.UserProfile, protected: Bool, rememberExpiresAt: Int, restricted: Bool, scrobbleTypes: String, services: [Operations.Services], subscription: Operations.Subscription, subscriptionDescription: String, subscriptions: [Operations.GetTokenDetailsSubscription], thumb: String, title: String, twoFactorEnabled: Bool, username: String, uuid: String, pin: String? = nil, roles: [String]? = nil) {
|
||||
public init(adsConsent: Bool, adsConsentReminderAt: Date, adsConsentSetAt: Date, anonymous: Bool, attributionPartner: String, authToken: String, backupCodesCreated: Bool, confirmed: Bool, country: String, email: String, emailOnlyAuth: Bool, entitlements: [String], experimentalFeatures: Bool, friendlyName: String, guest: Bool, hasPassword: Bool, home: Bool, homeAdmin: Bool, homeSize: Int, id: Int, joinedAt: Int, locale: String, mailingListActive: Bool, mailingListStatus: Operations.MailingListStatus, maxHomeSize: Int, profile: Operations.UserProfile, protected: Bool, rememberExpiresAt: Int, restricted: Bool, scrobbleTypes: String, services: [Operations.Services], subscription: Operations.Subscription, subscriptionDescription: String, subscriptions: [Operations.GetTokenDetailsSubscription], thumb: String, title: String, twoFactorEnabled: Bool, username: String, uuid: String, pin: String? = nil, roles: [String]? = nil) {
|
||||
self.adsConsent = adsConsent
|
||||
self._adsConsentReminderAt = DateTime<Date>(wrappedValue: adsConsentReminderAt)
|
||||
self._adsConsentSetAt = DateTime<Date>(wrappedValue: adsConsentSetAt)
|
||||
self.anonymous = anonymous
|
||||
self.attributionPartner = attributionPartner
|
||||
self.authToken = authToken
|
||||
self.backupCodesCreated = backupCodesCreated
|
||||
self.confirmed = confirmed
|
||||
@@ -177,6 +179,7 @@ extension Operations.GetTokenDetailsUserPlexAccount: Codable {
|
||||
case adsConsentReminderAt
|
||||
case adsConsentSetAt
|
||||
case anonymous
|
||||
case attributionPartner
|
||||
case authToken
|
||||
case backupCodesCreated
|
||||
case confirmed
|
||||
@@ -221,6 +224,7 @@ extension Operations.GetTokenDetailsUserPlexAccount: Codable {
|
||||
self._adsConsentReminderAt = try container.decode(DateTime<Date>.self, forKey: .adsConsentReminderAt)
|
||||
self._adsConsentSetAt = try container.decode(DateTime<Date>.self, forKey: .adsConsentSetAt)
|
||||
self.anonymous = try container.decode(Bool.self, forKey: .anonymous)
|
||||
self.attributionPartner = try container.decode(String.self, forKey: .attributionPartner)
|
||||
self.authToken = try container.decode(String.self, forKey: .authToken)
|
||||
self.backupCodesCreated = try container.decode(Bool.self, forKey: .backupCodesCreated)
|
||||
self.confirmed = try container.decode(Bool.self, forKey: .confirmed)
|
||||
@@ -265,6 +269,7 @@ extension Operations.GetTokenDetailsUserPlexAccount: Codable {
|
||||
try container.encode(self._adsConsentReminderAt, forKey: .adsConsentReminderAt)
|
||||
try container.encode(self._adsConsentSetAt, forKey: .adsConsentSetAt)
|
||||
try container.encode(self.anonymous, forKey: .anonymous)
|
||||
try container.encode(self.attributionPartner, forKey: .attributionPartner)
|
||||
try container.encode(self.authToken, forKey: .authToken)
|
||||
try container.encode(self.backupCodesCreated, forKey: .backupCodesCreated)
|
||||
try container.encode(self.confirmed, forKey: .confirmed)
|
||||
|
||||
@@ -12,7 +12,7 @@ extension Operations {
|
||||
///
|
||||
public enum GetTopWatchedContentQueryParamType: Int, Codable, APIValue {
|
||||
case movie = 1
|
||||
case show = 2
|
||||
case tvShow = 2
|
||||
case season = 3
|
||||
case episode = 4
|
||||
}}
|
||||
|
||||
9
Sources/Plexswift/models/operations/HasThumbnail.swift
Normal file
9
Sources/Plexswift/models/operations/HasThumbnail.swift
Normal file
@@ -0,0 +1,9 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum HasThumbnail: String, Codable, APIValue {
|
||||
case `false` = "0"
|
||||
case `true` = "1"
|
||||
}}
|
||||
@@ -7,12 +7,12 @@ extension Operations {
|
||||
///
|
||||
public struct Meta {
|
||||
public let fieldType: [Operations.GetLibraryItemsFieldType]?
|
||||
public let type: [Operations.GetLibraryItemsType]?
|
||||
public let type: [Operations.GetLibraryItemsLibraryType]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(fieldType: [Operations.GetLibraryItemsFieldType]? = nil, type: [Operations.GetLibraryItemsType]? = nil) {
|
||||
public init(fieldType: [Operations.GetLibraryItemsFieldType]? = nil, type: [Operations.GetLibraryItemsLibraryType]? = nil) {
|
||||
self.fieldType = fieldType
|
||||
self.type = type
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ extension Operations {
|
||||
public private(set) var adsConsentSetAt: Date
|
||||
/// Unknown
|
||||
public let anonymous: Bool
|
||||
public let attributionPartner: String
|
||||
/// The account token
|
||||
public let authToken: String
|
||||
/// If the two-factor authentication backup codes have been created
|
||||
@@ -129,11 +130,12 @@ extension Operations {
|
||||
/// - Parameter roles: [Might be removed] List of account roles. Plexpass membership listed here
|
||||
///
|
||||
@available(*, deprecated, message: "This initializer uses deprecated fields and will be removed in a future version.")
|
||||
public init(adsConsent: Bool, adsConsentReminderAt: Date, adsConsentSetAt: Date, anonymous: Bool, authToken: String, backupCodesCreated: Bool, confirmed: Bool, country: String, email: String, emailOnlyAuth: Bool, entitlements: [String], experimentalFeatures: Bool, friendlyName: String, guest: Bool, hasPassword: Bool, home: Bool, homeAdmin: Bool, homeSize: Int, id: Int, joinedAt: Int, locale: String, mailingListActive: Bool, mailingListStatus: Operations.PostUsersSignInDataMailingListStatus, maxHomeSize: Int, pastSubscriptions: [Operations.PastSubscription], profile: Operations.PostUsersSignInDataUserProfile, protected: Bool, rememberExpiresAt: Int, restricted: Bool, scrobbleTypes: String, services: [Operations.PostUsersSignInDataServices], subscription: Operations.PostUsersSignInDataSubscription, subscriptionDescription: String, subscriptions: [Operations.PostUsersSignInDataAuthenticationSubscription], thumb: String, title: String, trials: [Operations.Trials], twoFactorEnabled: Bool, username: String, uuid: String, pin: String? = nil, roles: [String]? = nil) {
|
||||
public init(adsConsent: Bool, adsConsentReminderAt: Date, adsConsentSetAt: Date, anonymous: Bool, attributionPartner: String, authToken: String, backupCodesCreated: Bool, confirmed: Bool, country: String, email: String, emailOnlyAuth: Bool, entitlements: [String], experimentalFeatures: Bool, friendlyName: String, guest: Bool, hasPassword: Bool, home: Bool, homeAdmin: Bool, homeSize: Int, id: Int, joinedAt: Int, locale: String, mailingListActive: Bool, mailingListStatus: Operations.PostUsersSignInDataMailingListStatus, maxHomeSize: Int, pastSubscriptions: [Operations.PastSubscription], profile: Operations.PostUsersSignInDataUserProfile, protected: Bool, rememberExpiresAt: Int, restricted: Bool, scrobbleTypes: String, services: [Operations.PostUsersSignInDataServices], subscription: Operations.PostUsersSignInDataSubscription, subscriptionDescription: String, subscriptions: [Operations.PostUsersSignInDataAuthenticationSubscription], thumb: String, title: String, trials: [Operations.Trials], twoFactorEnabled: Bool, username: String, uuid: String, pin: String? = nil, roles: [String]? = nil) {
|
||||
self.adsConsent = adsConsent
|
||||
self._adsConsentReminderAt = DateTime<Date>(wrappedValue: adsConsentReminderAt)
|
||||
self._adsConsentSetAt = DateTime<Date>(wrappedValue: adsConsentSetAt)
|
||||
self.anonymous = anonymous
|
||||
self.attributionPartner = attributionPartner
|
||||
self.authToken = authToken
|
||||
self.backupCodesCreated = backupCodesCreated
|
||||
self.confirmed = confirmed
|
||||
@@ -181,6 +183,7 @@ extension Operations.PostUsersSignInDataUserPlexAccount: Codable {
|
||||
case adsConsentReminderAt
|
||||
case adsConsentSetAt
|
||||
case anonymous
|
||||
case attributionPartner
|
||||
case authToken
|
||||
case backupCodesCreated
|
||||
case confirmed
|
||||
@@ -227,6 +230,7 @@ extension Operations.PostUsersSignInDataUserPlexAccount: Codable {
|
||||
self._adsConsentReminderAt = try container.decode(DateTime<Date>.self, forKey: .adsConsentReminderAt)
|
||||
self._adsConsentSetAt = try container.decode(DateTime<Date>.self, forKey: .adsConsentSetAt)
|
||||
self.anonymous = try container.decode(Bool.self, forKey: .anonymous)
|
||||
self.attributionPartner = try container.decode(String.self, forKey: .attributionPartner)
|
||||
self.authToken = try container.decode(String.self, forKey: .authToken)
|
||||
self.backupCodesCreated = try container.decode(Bool.self, forKey: .backupCodesCreated)
|
||||
self.confirmed = try container.decode(Bool.self, forKey: .confirmed)
|
||||
@@ -273,6 +277,7 @@ extension Operations.PostUsersSignInDataUserPlexAccount: Codable {
|
||||
try container.encode(self._adsConsentReminderAt, forKey: .adsConsentReminderAt)
|
||||
try container.encode(self._adsConsentSetAt, forKey: .adsConsentSetAt)
|
||||
try container.encode(self.anonymous, forKey: .anonymous)
|
||||
try container.encode(self.attributionPartner, forKey: .attributionPartner)
|
||||
try container.encode(self.authToken, forKey: .authToken)
|
||||
try container.encode(self.backupCodesCreated, forKey: .backupCodesCreated)
|
||||
try container.encode(self.confirmed, forKey: .confirmed)
|
||||
|
||||
@@ -12,7 +12,7 @@ extension Operations {
|
||||
///
|
||||
public enum QueryParamType: Int, Codable, APIValue {
|
||||
case movie = 1
|
||||
case show = 2
|
||||
case tvShow = 2
|
||||
case season = 3
|
||||
case episode = 4
|
||||
}}
|
||||
|
||||
19
Sources/Plexswift/models/operations/ShowOrdering.swift
Normal file
19
Sources/Plexswift/models/operations/ShowOrdering.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Setting that indicates the episode ordering for the show
|
||||
/// None = Library default,
|
||||
/// tmdbAiring = The Movie Database (Aired),
|
||||
/// aired = TheTVDB (Aired),
|
||||
/// dvd = TheTVDB (DVD),
|
||||
/// absolute = TheTVDB (Absolute)).
|
||||
///
|
||||
public enum ShowOrdering: String, Codable, APIValue {
|
||||
case `none` = "None"
|
||||
case tmdbAiring = "tmdbAiring"
|
||||
case aired = "aired"
|
||||
case dvd = "dvd"
|
||||
case absolute = "absolute"
|
||||
}}
|
||||
@@ -12,7 +12,7 @@ extension Operations {
|
||||
///
|
||||
public enum TypeModel: Int, Codable, APIValue {
|
||||
case movie = 1
|
||||
case show = 2
|
||||
case tvShow = 2
|
||||
case season = 3
|
||||
case episode = 4
|
||||
}}
|
||||
|
||||
32
Sources/Plexswift/models/operations/UltraBlurColors.swift
Normal file
32
Sources/Plexswift/models/operations/UltraBlurColors.swift
Normal file
@@ -0,0 +1,32 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct UltraBlurColors {
|
||||
public let bottomLeft: String
|
||||
public let bottomRight: String
|
||||
public let topLeft: String
|
||||
public let topRight: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(bottomLeft: String, bottomRight: String, topLeft: String, topRight: String) {
|
||||
self.bottomLeft = bottomLeft
|
||||
self.bottomRight = bottomRight
|
||||
self.topLeft = topLeft
|
||||
self.topRight = topRight
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.UltraBlurColors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case bottomLeft
|
||||
case bottomRight
|
||||
case topLeft
|
||||
case topRight
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ final class URLRequestBuilder: URLRequestConfiguration {
|
||||
urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type")
|
||||
}
|
||||
|
||||
urlRequest.setValue("speakeasy-sdk/swift 0.7.0 2.421.3 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
||||
urlRequest.setValue("speakeasy-sdk/swift 0.7.1 2.421.3 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
||||
|
||||
addSecurityParameters(to: &urlRequest)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user