mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 04:20:52 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
swift:
|
||||
version: 0.8.5
|
||||
version: 0.8.7
|
||||
author: LukeHagar
|
||||
description: Swift Client SDK Generated by Speakeasy
|
||||
imports:
|
||||
|
||||
@@ -9,8 +9,8 @@ sources:
|
||||
- main
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:c52cde0b8d51e160f7b9f1a3d3ea4dbb1aca6d5caad714e549201fb757fadd57
|
||||
sourceBlobDigest: sha256:f417b03ff71356808554313f24c3d06d670474bf51bc9a0631de1ad49c13a361
|
||||
sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e
|
||||
sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
@@ -18,10 +18,10 @@ targets:
|
||||
plexswift:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:c52cde0b8d51e160f7b9f1a3d3ea4dbb1aca6d5caad714e549201fb757fadd57
|
||||
sourceBlobDigest: sha256:f417b03ff71356808554313f24c3d06d670474bf51bc9a0631de1ad49c13a361
|
||||
sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e
|
||||
sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b
|
||||
codeSamplesNamespace: code-samples-swift-plexswift
|
||||
codeSamplesRevisionDigest: sha256:e46cddd9caae008aee2ea7b63b667fea012731501716d7a7e36f646135ab9e20
|
||||
codeSamplesRevisionDigest: sha256:ceb91e4d90a11c0893bbeda90ab2c216f3d5575443f3ea243225243646ef2d9b
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
59
README.md
59
README.md
@@ -50,7 +50,6 @@ The following SDKs are generated from the OpenAPI Specification. They are automa
|
||||
* [SDK Installation](#sdk-installation)
|
||||
* [SDK Example Usage](#sdk-example-usage)
|
||||
* [Available Resources and Operations](#available-resources-and-operations)
|
||||
* [Global Parameters](#global-parameters)
|
||||
* [Authentication](#authentication)
|
||||
<!-- End Table of Contents [toc] -->
|
||||
|
||||
@@ -63,7 +62,7 @@ You can add `plexswift` to your project directly in Xcode `(File > Add Packages.
|
||||
|
||||
```bash
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.8.5"))
|
||||
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.8.7"))
|
||||
]
|
||||
```
|
||||
<!-- End SDK Installation [installation] -->
|
||||
@@ -141,6 +140,7 @@ case .empty:
|
||||
* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
||||
* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
||||
* [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library
|
||||
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||
* [getMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey
|
||||
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||
@@ -271,61 +271,6 @@ case .empty:
|
||||
```
|
||||
<!-- End Authentication [security] -->
|
||||
|
||||
<!-- Start Global Parameters [global-parameters] -->
|
||||
## Global Parameters
|
||||
|
||||
Certain parameters are configured globally. These parameters may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, These global values will be used as defaults on the operations that use them. When such operations are called, there is a place in each to override the global value, if needed.
|
||||
|
||||
For example, you can set `ClientID` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getServerResources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
||||
|
||||
|
||||
### Available Globals
|
||||
|
||||
The following global parameters are available.
|
||||
|
||||
| Name | Type | Required | Description |
|
||||
| ---- | ---- |:--------:| ----------- |
|
||||
| clientID | String | | The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) |
|
||||
| clientName | String | | The clientName parameter. |
|
||||
| clientVersion | String | | The clientVersion parameter. |
|
||||
| clientPlatform | String | | The clientPlatform parameter. |
|
||||
| deviceName | String | | The deviceName parameter. |
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```swift
|
||||
import Foundation
|
||||
import Plexswift
|
||||
|
||||
let client = Client(security: .accessToken("<YOUR_API_KEY_HERE>"))
|
||||
|
||||
let response = try await client.plex.getServerResources(
|
||||
request: Operations.GetServerResourcesRequest(
|
||||
includeHttps: .enable,
|
||||
includeIPv6: .enable,
|
||||
includeRelay: .enable
|
||||
)
|
||||
)
|
||||
|
||||
switch response.data {
|
||||
case .plexDevices(let plexDevices):
|
||||
// Handle response
|
||||
break
|
||||
case .badRequest(let badRequest):
|
||||
// Handle response
|
||||
break
|
||||
case .unauthorized(let unauthorized):
|
||||
// Handle response
|
||||
break
|
||||
case .empty:
|
||||
// Handle empty response
|
||||
break
|
||||
}
|
||||
|
||||
```
|
||||
<!-- End Global Parameters [global-parameters] -->
|
||||
|
||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||
|
||||
# Development
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -733,3 +733,13 @@ Based on:
|
||||
- [swift v0.8.5] .
|
||||
### Releases
|
||||
- [Swift Package Manager v0.8.5] https://github.com/LukeHagar/plexswift/releases/tag/v0.8.5 - .
|
||||
|
||||
## 2024-10-03 00:08:00
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.406.0 (2.429.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [swift v0.8.7] .
|
||||
### Releases
|
||||
- [Swift Package Manager v0.8.7] https://github.com/LukeHagar/plexswift/releases/tag/v0.8.7 - .
|
||||
@@ -125,6 +125,7 @@ case .empty:
|
||||
- ``Operations/GetMetaDataByRatingKeyBadRequest``
|
||||
- ``Operations/GetRecentlyAddedLibraryBadRequest``
|
||||
- ``Operations/GetRefreshLibraryMetadataBadRequest``
|
||||
- ``Operations/GetSearchAllLibrariesBadRequest``
|
||||
- ``Operations/GetSearchLibraryBadRequest``
|
||||
- ``Operations/GetServerResourcesBadRequest``
|
||||
- ``Operations/GetThumbImageBadRequest``
|
||||
@@ -201,6 +202,7 @@ case .empty:
|
||||
- ``Operations/GetRecentlyAddedResponse``
|
||||
- ``Operations/GetRecentlyAddedLibraryResponse``
|
||||
- ``Operations/GetRefreshLibraryMetadataResponse``
|
||||
- ``Operations/GetSearchAllLibrariesResponse``
|
||||
- ``Operations/GetSearchLibraryResponse``
|
||||
- ``Operations/GetServerIdentityResponse``
|
||||
- ``Operations/GetServerResourcesResponse``
|
||||
@@ -323,7 +325,6 @@ case .empty:
|
||||
- ``Operations/EnablePaperTrailUnauthorized``
|
||||
- ``Operations/Errors``
|
||||
- ``Operations/Feature``
|
||||
- ``Operations/Features``
|
||||
- ``Operations/Field``
|
||||
- ``Operations/FieldType``
|
||||
- ``Operations/Filter``
|
||||
@@ -335,6 +336,7 @@ case .empty:
|
||||
- ``Operations/GetAllLibrariesDirectory``
|
||||
- ``Operations/GetAllLibrariesErrors``
|
||||
- ``Operations/GetAllLibrariesLibraryErrors``
|
||||
- ``Operations/GetAllLibrariesLocation``
|
||||
- ``Operations/GetAllLibrariesMediaContainer``
|
||||
- ``Operations/GetAllLibrariesResponseBody``
|
||||
- ``Operations/GetAllLibrariesUnauthorized``
|
||||
@@ -379,6 +381,7 @@ case .empty:
|
||||
- ``Operations/GetLibraryItemsLibraryResponseType``
|
||||
- ``Operations/GetLibraryItemsLibrarySort``
|
||||
- ``Operations/GetLibraryItemsLibraryType``
|
||||
- ``Operations/GetLibraryItemsLocation``
|
||||
- ``Operations/GetLibraryItemsMedia``
|
||||
- ``Operations/GetLibraryItemsMediaContainer``
|
||||
- ``Operations/GetLibraryItemsMediaGuid``
|
||||
@@ -457,6 +460,33 @@ case .empty:
|
||||
- ``Operations/GetRefreshLibraryMetadataLibraryErrors``
|
||||
- ``Operations/GetRefreshLibraryMetadataRequest``
|
||||
- ``Operations/GetRefreshLibraryMetadataUnauthorized``
|
||||
- ``Operations/GetSearchAllLibrariesCollection``
|
||||
- ``Operations/GetSearchAllLibrariesCountry``
|
||||
- ``Operations/GetSearchAllLibrariesDirector``
|
||||
- ``Operations/GetSearchAllLibrariesErrors``
|
||||
- ``Operations/GetSearchAllLibrariesFlattenSeasons``
|
||||
- ``Operations/GetSearchAllLibrariesGenre``
|
||||
- ``Operations/GetSearchAllLibrariesHasThumbnail``
|
||||
- ``Operations/GetSearchAllLibrariesImage``
|
||||
- ``Operations/GetSearchAllLibrariesLibraryErrors``
|
||||
- ``Operations/GetSearchAllLibrariesLibraryType``
|
||||
- ``Operations/GetSearchAllLibrariesLocation``
|
||||
- ``Operations/GetSearchAllLibrariesMedia``
|
||||
- ``Operations/GetSearchAllLibrariesMediaContainer``
|
||||
- ``Operations/GetSearchAllLibrariesMediaGuid``
|
||||
- ``Operations/GetSearchAllLibrariesMetadata``
|
||||
- ``Operations/GetSearchAllLibrariesMetaDataRating``
|
||||
- ``Operations/GetSearchAllLibrariesOptimizedForStreaming``
|
||||
- ``Operations/GetSearchAllLibrariesPart``
|
||||
- ``Operations/GetSearchAllLibrariesRequest``
|
||||
- ``Operations/GetSearchAllLibrariesResponseBody``
|
||||
- ``Operations/GetSearchAllLibrariesRole``
|
||||
- ``Operations/GetSearchAllLibrariesShowOrdering``
|
||||
- ``Operations/GetSearchAllLibrariesStream``
|
||||
- ``Operations/GetSearchAllLibrariesType``
|
||||
- ``Operations/GetSearchAllLibrariesUltraBlurColors``
|
||||
- ``Operations/GetSearchAllLibrariesUnauthorized``
|
||||
- ``Operations/GetSearchAllLibrariesWriter``
|
||||
- ``Operations/GetSearchLibraryErrors``
|
||||
- ``Operations/GetSearchLibraryLibraryErrors``
|
||||
- ``Operations/GetSearchLibraryMediaContainer``
|
||||
@@ -679,7 +709,6 @@ case .empty:
|
||||
- ``Operations/GetTokenDetailsAuthenticationResponseStatus``
|
||||
- ``Operations/GetTokenDetailsAuthenticationStatus``
|
||||
- ``Operations/GetTokenDetailsErrors``
|
||||
- ``Operations/GetTokenDetailsFeatures``
|
||||
- ``Operations/GetTokenDetailsStatus``
|
||||
- ``Operations/GetTokenDetailsSubscription``
|
||||
- ``Operations/GetTokenDetailsUnauthorized``
|
||||
@@ -775,7 +804,6 @@ case .empty:
|
||||
- ``Operations/PlaylistType``
|
||||
- ``Operations/PlexDevice``
|
||||
- ``Operations/PostUsersSignInDataAuthenticationErrors``
|
||||
- ``Operations/PostUsersSignInDataAuthenticationFeatures``
|
||||
- ``Operations/PostUsersSignInDataAuthenticationResponseStatus``
|
||||
- ``Operations/PostUsersSignInDataAuthenticationStatus``
|
||||
- ``Operations/PostUsersSignInDataAuthenticationSubscription``
|
||||
@@ -783,7 +811,6 @@ case .empty:
|
||||
- ``Operations/PostUsersSignInDataDefaultSubtitleAccessibility``
|
||||
- ``Operations/PostUsersSignInDataDefaultSubtitleForced``
|
||||
- ``Operations/PostUsersSignInDataErrors``
|
||||
- ``Operations/PostUsersSignInDataFeatures``
|
||||
- ``Operations/PostUsersSignInDataMailingListStatus``
|
||||
- ``Operations/PostUsersSignInDataMediaReviewsVisibility``
|
||||
- ``Operations/PostUsersSignInDataRequest``
|
||||
@@ -801,6 +828,8 @@ case .empty:
|
||||
- ``Operations/Provider``
|
||||
- ``Operations/QueryParamFilter``
|
||||
- ``Operations/QueryParamForce``
|
||||
- ``Operations/QueryParamIncludeCollections``
|
||||
- ``Operations/QueryParamIncludeExternalMedia``
|
||||
- ``Operations/QueryParamIncludeMeta``
|
||||
- ``Operations/QueryParamOnlyTransient``
|
||||
- ``Operations/QueryParamSmart``
|
||||
@@ -810,6 +839,8 @@ case .empty:
|
||||
- ``Operations/ResponseBody``
|
||||
- ``Operations/Role``
|
||||
- ``Operations/Scope``
|
||||
- ``Operations/SearchResult``
|
||||
- ``Operations/SearchTypes``
|
||||
- ``Operations/Server``
|
||||
- ``Operations/Services``
|
||||
- ``Operations/Session``
|
||||
|
||||
@@ -9,25 +9,29 @@ public struct GlobalParameters {
|
||||
public let clientID: String?
|
||||
public let clientName: String?
|
||||
public let clientVersion: String?
|
||||
public let clientPlatform: String?
|
||||
public let deviceName: String?
|
||||
public let platform: String?
|
||||
public let deviceNickname: String?
|
||||
|
||||
/// Creates an object with the given parameters
|
||||
///
|
||||
/// - Parameter clientID: The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device)
|
||||
/// - Parameter clientID: An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
/// - Parameter clientName: The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
/// - Parameter clientVersion: The version of the client application.
|
||||
/// - Parameter deviceNickname: A relatively friendly name for the client device
|
||||
/// - Parameter platform: The platform of the client application.
|
||||
///
|
||||
public init(
|
||||
clientID: String? = nil,
|
||||
clientName: String? = nil,
|
||||
clientVersion: String? = nil,
|
||||
clientPlatform: String? = nil,
|
||||
deviceName: String? = nil
|
||||
platform: String? = nil,
|
||||
deviceNickname: String? = nil
|
||||
) {
|
||||
self.clientID = clientID
|
||||
self.clientName = clientName
|
||||
self.clientVersion = clientVersion
|
||||
self.clientPlatform = clientPlatform
|
||||
self.deviceName = deviceName
|
||||
self.platform = platform
|
||||
self.deviceNickname = deviceNickname
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,11 +44,6 @@ extension GlobalParameters: ParameterDefaults {
|
||||
|
||||
public func defaultQueryParameter(for key: String) -> AnyValue? {
|
||||
switch key {
|
||||
case "ClientID": return clientID.map { AnyValue($0) }
|
||||
case "ClientName": return clientName.map { AnyValue($0) }
|
||||
case "ClientVersion": return clientVersion.map { AnyValue($0) }
|
||||
case "ClientPlatform": return clientPlatform.map { AnyValue($0) }
|
||||
case "DeviceName": return deviceName.map { AnyValue($0) }
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ private func configureGetTokenDetailsRequest(with configuration: URLRequestConfi
|
||||
private func configurePostUsersSignInDataRequest(with configuration: URLRequestConfiguration, request: Operations.PostUsersSignInDataRequest) throws {
|
||||
configuration.path = "/users/signin"
|
||||
configuration.method = .post
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.contentType = "application/x-www-form-urlencoded"
|
||||
configuration.body = try serializeFormData(with: request.requestBody)
|
||||
configuration.telemetryHeader = .userAgent
|
||||
|
||||
@@ -82,6 +82,15 @@ class _LibraryAPI: LibraryAPI {
|
||||
)
|
||||
}
|
||||
|
||||
public func getSearchAllLibraries(request: Operations.GetSearchAllLibrariesRequest) async throws -> Response<Operations.GetSearchAllLibrariesResponse> {
|
||||
return try await client.makeRequest(
|
||||
configureRequest: { configuration in
|
||||
try configureGetSearchAllLibrariesRequest(with: configuration, request: request)
|
||||
},
|
||||
handleResponse: handleGetSearchAllLibrariesResponse
|
||||
)
|
||||
}
|
||||
|
||||
public func getMetaDataByRatingKey(request: Operations.GetMetaDataByRatingKeyRequest) async throws -> Response<Operations.GetMetaDataByRatingKeyResponse> {
|
||||
return try await client.makeRequest(
|
||||
configureRequest: { configuration in
|
||||
@@ -181,6 +190,14 @@ private func configureGetSearchLibraryRequest(with configuration: URLRequestConf
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
private func configureGetSearchAllLibrariesRequest(with configuration: URLRequestConfiguration, request: Operations.GetSearchAllLibrariesRequest) throws {
|
||||
configuration.path = "/library/search"
|
||||
configuration.method = .get
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
private func configureGetMetaDataByRatingKeyRequest(with configuration: URLRequestConfiguration, request: Operations.GetMetaDataByRatingKeyRequest) throws {
|
||||
configuration.path = "/library/metadata/{ratingKey}"
|
||||
configuration.method = .get
|
||||
@@ -449,6 +466,38 @@ private func handleGetSearchLibraryResponse(response: Client.APIResponse) throws
|
||||
return .empty
|
||||
}
|
||||
|
||||
private func handleGetSearchAllLibrariesResponse(response: Client.APIResponse) throws -> Operations.GetSearchAllLibrariesResponse {
|
||||
let httpResponse = response.httpResponse
|
||||
|
||||
if httpResponse.statusCode == 200 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .object(try JSONDecoder().decode(Operations.GetSearchAllLibrariesResponseBody.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
} else if httpResponse.statusCode == 400 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .badRequest(try JSONDecoder().decode(Operations.GetSearchAllLibrariesBadRequest.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
} else if httpResponse.statusCode == 401 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .unauthorized(try JSONDecoder().decode(Operations.GetSearchAllLibrariesUnauthorized.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return .empty
|
||||
}
|
||||
|
||||
private func handleGetMetaDataByRatingKeyResponse(response: Client.APIResponse) throws -> Operations.GetMetaDataByRatingKeyResponse {
|
||||
let httpResponse = response.httpResponse
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ private func configureGetBannerImageRequest(with configuration: URLRequestConfig
|
||||
configuration.method = .get
|
||||
configuration.pathParameterSerializable = request
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
@@ -93,6 +94,7 @@ private func configureGetThumbImageRequest(with configuration: URLRequestConfigu
|
||||
configuration.method = .get
|
||||
configuration.pathParameterSerializable = request
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ private func configureGetServerResourcesRequest(with configuration: URLRequestCo
|
||||
configuration.path = "/resources"
|
||||
configuration.method = .get
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
@@ -118,6 +119,7 @@ private func configureGetPinRequest(with configuration: URLRequestConfiguration,
|
||||
configuration.path = "/pins"
|
||||
configuration.method = .post
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
@@ -125,7 +127,7 @@ private func configureGetTokenByPinIdRequest(with configuration: URLRequestConfi
|
||||
configuration.path = "/pins/{pinID}"
|
||||
configuration.method = .get
|
||||
configuration.pathParameterSerializable = request
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ private func configureGetResizedPhotoRequest(with configuration: URLRequestConfi
|
||||
private func configureGetMediaProvidersRequest(with configuration: URLRequestConfiguration, request: Operations.GetMediaProvidersRequest) throws {
|
||||
configuration.path = "/media/providers"
|
||||
configuration.method = .get
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ private func configureGetWatchListRequest(with configuration: URLRequestConfigur
|
||||
configuration.method = .get
|
||||
configuration.pathParameterSerializable = request
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ extension Operations.GetBannerImageRequest: Serializable {
|
||||
return try serializePathParameterSerializable(self, with: format)
|
||||
case .query:
|
||||
return try serializeQueryParameterSerializable(self, with: format)
|
||||
case .header, .multipart, .form:
|
||||
case .header:
|
||||
return serializeModel(with: try serializedHeaderParameters(), format: format)
|
||||
case .multipart, .form:
|
||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetBannerImageRequest", format: format.formatDescription)
|
||||
}
|
||||
}
|
||||
@@ -35,7 +37,14 @@ extension Operations.GetBannerImageRequest: QueryParameterSerializable {
|
||||
try builder.addQueryParameters(from: minSize, named: "minSize", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: upscale, named: "upscale", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: width, named: "width", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: xPlexToken, named: "X-Plex-Token", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
return builder.build()
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetBannerImageRequest: HeaderParameterSerializable {
|
||||
func serializedHeaderParameters() throws -> [SerializedParameter] {
|
||||
return [
|
||||
SerializedParameter(name: "X-Plex-Token", serialized: try xPlexToken.serialize(with: .header(explode: false)))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ extension Operations.GetLibraryItemsRequest: Serializable {
|
||||
extension Operations.GetLibraryItemsRequest: PathParameterSerializable {
|
||||
func serializedPathParameters(formatOverride: SerializableFormat?) throws -> [String: String] {
|
||||
return [
|
||||
"sectionKey": try sectionKey.serialize(with: formatOverride ?? .path(explode: false)),
|
||||
"tag": try tag.serialize(with: formatOverride ?? .path(explode: false)),
|
||||
"sectionKey": try sectionKey.serialize(with: formatOverride ?? .path(explode: false)),
|
||||
].compactMapValues { $0 }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,22 +6,18 @@ import Foundation
|
||||
extension Operations.GetMediaProvidersRequest: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
switch format {
|
||||
case .query:
|
||||
return try serializeQueryParameterSerializable(self, with: format)
|
||||
case .path, .header, .multipart, .form:
|
||||
case .header:
|
||||
return serializeModel(with: try serializedHeaderParameters(), format: format)
|
||||
case .path, .query, .multipart, .form:
|
||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetMediaProvidersRequest", format: format.formatDescription)
|
||||
}
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetMediaProvidersRequest: QueryParameterSerializable {
|
||||
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||
let builder = QueryParameterBuilder()
|
||||
try builder.addQueryParameters(from: xPlexToken, named: "X-Plex-Token", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
return builder.build()
|
||||
extension Operations.GetMediaProvidersRequest: HeaderParameterSerializable {
|
||||
func serializedHeaderParameters() throws -> [SerializedParameter] {
|
||||
return [
|
||||
SerializedParameter(name: "X-Plex-Token", serialized: try xPlexToken.serialize(with: .header(explode: false)))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@ extension Operations.GetPinRequest: Serializable {
|
||||
switch format {
|
||||
case .query:
|
||||
return try serializeQueryParameterSerializable(self, with: format)
|
||||
case .path, .header, .multipart, .form:
|
||||
case .header:
|
||||
return serializeModel(with: try serializedHeaderParameters(), format: format)
|
||||
case .path, .multipart, .form:
|
||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetPinRequest", format: format.formatDescription)
|
||||
}
|
||||
}
|
||||
@@ -21,12 +23,19 @@ extension Operations.GetPinRequest: Serializable {
|
||||
extension Operations.GetPinRequest: QueryParameterSerializable {
|
||||
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||
let builder = QueryParameterBuilder()
|
||||
try builder.addQueryParameters(from: clientID, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: clientName, named: "X-Plex-Product", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: clientPlatform, named: "X-Plex-Platform", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: clientVersion, named: "X-Plex-Version", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: deviceName, named: "X-Plex-Device", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: strong, named: "strong", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
return builder.build()
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetPinRequest: HeaderParameterSerializable {
|
||||
func serializedHeaderParameters() throws -> [SerializedParameter] {
|
||||
return [
|
||||
SerializedParameter(name: "X-Plex-Client-Identifier", serialized: try clientID?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Product", serialized: try clientName?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Version", serialized: try clientVersion?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Device", serialized: try deviceNickname?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Platform", serialized: try platform?.serialize(with: .header(explode: false)))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.PostUsersSignInDataAuthenticationFeatures: Serializable {
|
||||
extension Operations.GetSearchAllLibrariesFlattenSeasons: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetSearchAllLibrariesHasThumbnail: 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.GetSearchAllLibrariesLibraryType: 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.GetSearchAllLibrariesOptimizedForStreaming: 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,41 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetSearchAllLibrariesRequest: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
switch format {
|
||||
case .query:
|
||||
return try serializeQueryParameterSerializable(self, with: format)
|
||||
case .header:
|
||||
return serializeModel(with: try serializedHeaderParameters(), format: format)
|
||||
case .path, .multipart, .form:
|
||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetSearchAllLibrariesRequest", format: format.formatDescription)
|
||||
}
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesRequest: QueryParameterSerializable {
|
||||
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||
let builder = QueryParameterBuilder()
|
||||
try builder.addQueryParameters(from: query, named: "query", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: includeCollections, named: "includeCollections", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: includeExternalMedia, named: "includeExternalMedia", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: limit, named: "limit", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: searchTypes, named: "searchTypes", format: formatOverride ?? .query(style: .form, explode: false), parameterDefaults: parameterDefaults)
|
||||
return builder.build()
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesRequest: HeaderParameterSerializable {
|
||||
func serializedHeaderParameters() throws -> [SerializedParameter] {
|
||||
return [
|
||||
SerializedParameter(name: "X-Plex-Client-Identifier", serialized: try clientID?.serialize(with: .header(explode: false)))
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetSearchAllLibrariesShowOrdering: 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))]
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetTokenDetailsFeatures: Serializable {
|
||||
extension Operations.GetSearchAllLibrariesType: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
@@ -8,7 +8,9 @@ extension Operations.GetServerResourcesRequest: Serializable {
|
||||
switch format {
|
||||
case .query:
|
||||
return try serializeQueryParameterSerializable(self, with: format)
|
||||
case .path, .header, .multipart, .form:
|
||||
case .header:
|
||||
return serializeModel(with: try serializedHeaderParameters(), format: format)
|
||||
case .path, .multipart, .form:
|
||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetServerResourcesRequest", format: format.formatDescription)
|
||||
}
|
||||
}
|
||||
@@ -21,10 +23,17 @@ extension Operations.GetServerResourcesRequest: Serializable {
|
||||
extension Operations.GetServerResourcesRequest: QueryParameterSerializable {
|
||||
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||
let builder = QueryParameterBuilder()
|
||||
try builder.addQueryParameters(from: clientID, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: includeHttps, named: "includeHttps", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: includeIPv6, named: "includeIPv6", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: includeRelay, named: "includeRelay", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
return builder.build()
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetServerResourcesRequest: HeaderParameterSerializable {
|
||||
func serializedHeaderParameters() throws -> [SerializedParameter] {
|
||||
return [
|
||||
SerializedParameter(name: "X-Plex-Client-Identifier", serialized: try clientID?.serialize(with: .header(explode: false)))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@ extension Operations.GetThumbImageRequest: Serializable {
|
||||
return try serializePathParameterSerializable(self, with: format)
|
||||
case .query:
|
||||
return try serializeQueryParameterSerializable(self, with: format)
|
||||
case .header, .multipart, .form:
|
||||
case .header:
|
||||
return serializeModel(with: try serializedHeaderParameters(), format: format)
|
||||
case .multipart, .form:
|
||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetThumbImageRequest", format: format.formatDescription)
|
||||
}
|
||||
}
|
||||
@@ -35,7 +37,14 @@ extension Operations.GetThumbImageRequest: QueryParameterSerializable {
|
||||
try builder.addQueryParameters(from: minSize, named: "minSize", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: upscale, named: "upscale", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: width, named: "width", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: xPlexToken, named: "X-Plex-Token", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
return builder.build()
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetThumbImageRequest: HeaderParameterSerializable {
|
||||
func serializedHeaderParameters() throws -> [SerializedParameter] {
|
||||
return [
|
||||
SerializedParameter(name: "X-Plex-Token", serialized: try xPlexToken.serialize(with: .header(explode: false)))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,16 +8,12 @@ extension Operations.GetTokenByPinIdRequest: Serializable {
|
||||
switch format {
|
||||
case .path:
|
||||
return try serializePathParameterSerializable(self, with: format)
|
||||
case .query:
|
||||
return try serializeQueryParameterSerializable(self, with: format)
|
||||
case .header, .multipart, .form:
|
||||
case .header:
|
||||
return serializeModel(with: try serializedHeaderParameters(), format: format)
|
||||
case .query, .multipart, .form:
|
||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetTokenByPinIdRequest", format: format.formatDescription)
|
||||
}
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetTokenByPinIdRequest: PathParameterSerializable {
|
||||
@@ -28,14 +24,14 @@ extension Operations.GetTokenByPinIdRequest: PathParameterSerializable {
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetTokenByPinIdRequest: QueryParameterSerializable {
|
||||
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||
let builder = QueryParameterBuilder()
|
||||
try builder.addQueryParameters(from: clientID, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: clientName, named: "X-Plex-Product", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: clientPlatform, named: "X-Plex-Platform", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: clientVersion, named: "X-Plex-Version", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: deviceName, named: "X-Plex-Device", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
return builder.build()
|
||||
extension Operations.GetTokenByPinIdRequest: HeaderParameterSerializable {
|
||||
func serializedHeaderParameters() throws -> [SerializedParameter] {
|
||||
return [
|
||||
SerializedParameter(name: "X-Plex-Client-Identifier", serialized: try clientID?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Product", serialized: try clientName?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Version", serialized: try clientVersion?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Device", serialized: try deviceNickname?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Platform", serialized: try platform?.serialize(with: .header(explode: false)))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@ extension Operations.GetWatchListRequest: Serializable {
|
||||
return try serializePathParameterSerializable(self, with: format)
|
||||
case .query:
|
||||
return try serializeQueryParameterSerializable(self, with: format)
|
||||
case .header, .multipart, .form:
|
||||
case .header:
|
||||
return serializeModel(with: try serializedHeaderParameters(), format: format)
|
||||
case .multipart, .form:
|
||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetWatchListRequest", format: format.formatDescription)
|
||||
}
|
||||
}
|
||||
@@ -31,7 +33,6 @@ extension Operations.GetWatchListRequest: PathParameterSerializable {
|
||||
extension Operations.GetWatchListRequest: QueryParameterSerializable {
|
||||
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||
let builder = QueryParameterBuilder()
|
||||
try builder.addQueryParameters(from: xPlexToken, named: "X-Plex-Token", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: includeCollections, named: "includeCollections", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: includeExternalMedia, named: "includeExternalMedia", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: libtype, named: "libtype", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
@@ -42,3 +43,11 @@ extension Operations.GetWatchListRequest: QueryParameterSerializable {
|
||||
return builder.build()
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetWatchListRequest: HeaderParameterSerializable {
|
||||
func serializedHeaderParameters() throws -> [SerializedParameter] {
|
||||
return [
|
||||
SerializedParameter(name: "X-Plex-Token", serialized: try xPlexToken.serialize(with: .header(explode: false)))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,26 +6,22 @@ import Foundation
|
||||
extension Operations.PostUsersSignInDataRequest: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
switch format {
|
||||
case .query:
|
||||
return try serializeQueryParameterSerializable(self, with: format)
|
||||
case .path, .header, .multipart, .form:
|
||||
case .header:
|
||||
return serializeModel(with: try serializedHeaderParameters(), format: format)
|
||||
case .path, .query, .multipart, .form:
|
||||
throw SerializationError.invalidSerializationParameter(type: "Operations.PostUsersSignInDataRequest", format: format.formatDescription)
|
||||
}
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.PostUsersSignInDataRequest: QueryParameterSerializable {
|
||||
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||
let builder = QueryParameterBuilder()
|
||||
try builder.addQueryParameters(from: clientID, named: "X-Plex-Client-Identifier", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: clientName, named: "X-Plex-Product", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: clientPlatform, named: "X-Plex-Platform", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: clientVersion, named: "X-Plex-Version", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
try builder.addQueryParameters(from: deviceName, named: "X-Plex-Device", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||
return builder.build()
|
||||
extension Operations.PostUsersSignInDataRequest: HeaderParameterSerializable {
|
||||
func serializedHeaderParameters() throws -> [SerializedParameter] {
|
||||
return [
|
||||
SerializedParameter(name: "X-Plex-Client-Identifier", serialized: try clientID?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Product", serialized: try clientName?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Version", serialized: try clientVersion?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Device", serialized: try deviceNickname?.serialize(with: .header(explode: false))),
|
||||
SerializedParameter(name: "X-Plex-Platform", serialized: try platform?.serialize(with: .header(explode: false)))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.PostUsersSignInDataFeatures: Serializable {
|
||||
extension Operations.QueryParamIncludeCollections: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.QueryParamIncludeExternalMedia: 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))]
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.Features: Serializable {
|
||||
extension Operations.SearchTypes: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum Features: String, Codable, APIValue {
|
||||
case androidDolbyVision = "Android - Dolby Vision"
|
||||
case androidPiP = "Android - PiP"
|
||||
case cuSunset = "CU Sunset"
|
||||
case hrkEnableEur = "HRK_enable_EUR"
|
||||
case trebleShowFeatures = "TREBLE-show-features"
|
||||
case adCountdownTimer = "ad-countdown-timer"
|
||||
case adaptiveBitrate = "adaptive_bitrate"
|
||||
case albumTypes = "album-types"
|
||||
case allowDvr = "allow_dvr"
|
||||
case amazonLoopDebug = "amazon-loop-debug"
|
||||
case avodAdAnalysis = "avod-ad-analysis"
|
||||
case avodNewMedia = "avod-new-media"
|
||||
case blacklistGetSignin = "blacklist_get_signin"
|
||||
case boostVoices = "boost-voices"
|
||||
case cameraUpload = "camera_upload"
|
||||
case clientRadioStations = "client-radio-stations"
|
||||
case cloudflareTurnstileRequired = "cloudflare-turnstile-required"
|
||||
case cloudsync = "cloudsync"
|
||||
case collections = "collections"
|
||||
case commentsAndRepliesPushNotifications = "comments_and_replies_push_notifications"
|
||||
case communityAccessPlexTv = "community_access_plex_tv"
|
||||
case companionsSonos = "companions_sonos"
|
||||
case contentFilter = "content_filter"
|
||||
case customHomeRemoval = "custom-home-removal"
|
||||
case disableHomeUserFriendships = "disable_home_user_friendships"
|
||||
case disableSharingFriendships = "disable_sharing_friendships"
|
||||
case downloadsGating = "downloads-gating"
|
||||
case drmSupport = "drm_support"
|
||||
case dvr = "dvr"
|
||||
case dvrBlockUnsupportedCountries = "dvr-block-unsupported-countries"
|
||||
case epgRecentChannels = "epg-recent-channels"
|
||||
case excludeRestrictions = "exclude restrictions"
|
||||
case federatedAuth = "federated-auth"
|
||||
case friendRequestPushNotifications = "friend_request_push_notifications"
|
||||
case grandfatherSync = "grandfather-sync"
|
||||
case guidedUpgrade = "guided-upgrade"
|
||||
case hardwareTranscoding = "hardware_transcoding"
|
||||
case home = "home"
|
||||
case hwtranscode = "hwtranscode"
|
||||
case imaggaV2 = "imagga-v2"
|
||||
case increasePasswordComplexity = "increase-password-complexity"
|
||||
case ios14PrivacyBanner = "ios14-privacy-banner"
|
||||
case iterableNotificationTokens = "iterable-notification-tokens"
|
||||
case itemClusters = "item_clusters"
|
||||
case keepPaymentMethod = "keep-payment-method"
|
||||
case kevinBacon = "kevin-bacon"
|
||||
case koreaConsent = "korea-consent"
|
||||
case leIsrgRootX1 = "le_isrg_root_x1"
|
||||
case letsEncrypt = "lets_encrypt"
|
||||
case lightningDvrPivot = "lightning-dvr-pivot"
|
||||
case liveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments"
|
||||
case livetv = "livetv"
|
||||
case lyrics = "lyrics"
|
||||
case metadataSearch = "metadata_search"
|
||||
case musicAnalysis = "music-analysis"
|
||||
case musicVideos = "music_videos"
|
||||
case newPlexPassPrices = "new_plex_pass_prices"
|
||||
case newsProviderSunsetModal = "news-provider-sunset-modal"
|
||||
case nominatim = "nominatim"
|
||||
case pass = "pass"
|
||||
case photosFavorites = "photos-favorites"
|
||||
case photosMetadataEdition = "photos-metadata-edition"
|
||||
case photosV6Edit = "photosV6-edit"
|
||||
case photosV6TvAlbums = "photosV6-tv-albums"
|
||||
case pmsHealth = "pms_health"
|
||||
case premiumDashboard = "premium-dashboard"
|
||||
case premiumMusicMetadata = "premium_music_metadata"
|
||||
case radio = "radio"
|
||||
case rateLimitClientToken = "rate-limit-client-token"
|
||||
case scrobblingServicePlexTv = "scrobbling-service-plex-tv"
|
||||
case sessionBandwidthRestrictions = "session_bandwidth_restrictions"
|
||||
case sessionKick = "session_kick"
|
||||
case sharedServerNotification = "shared_server_notification"
|
||||
case sharedSourceNotification = "shared_source_notification"
|
||||
case signinNotification = "signin_notification"
|
||||
case signinWithApple = "signin_with_apple"
|
||||
case silenceRemoval = "silence-removal"
|
||||
case sleepTimer = "sleep-timer"
|
||||
case springServeAdProvider = "spring_serve_ad_provider"
|
||||
case sync = "sync"
|
||||
case sweetFades = "sweet-fades"
|
||||
case transcoderCache = "transcoder_cache"
|
||||
case trailers = "trailers"
|
||||
case tunerSharing = "tuner-sharing"
|
||||
case twoFactorAuthentication = "two-factor-authentication"
|
||||
case unsupportedtuners = "unsupportedtuners"
|
||||
case upgrade3Ds2 = "upgrade-3ds2"
|
||||
case visualizers = "visualizers"
|
||||
case vodSchema = "vod-schema"
|
||||
case vodCloudflare = "vod_cloudflare"
|
||||
case volumeLeveling = "volume-leveling"
|
||||
case watchTogetherInvite = "watch-together-invite"
|
||||
case watchlistRss = "watchlist-rss"
|
||||
case webServerDashboard = "web_server_dashboard"
|
||||
case webhooks = "webhooks"
|
||||
}}
|
||||
@@ -19,7 +19,7 @@ extension Operations {
|
||||
public let hidden: Int
|
||||
public let key: String
|
||||
public let language: String
|
||||
public let location: [Operations.Location]
|
||||
public let location: [Operations.GetAllLibrariesLocation]
|
||||
public let refreshing: Bool
|
||||
/// Unix epoch datetime in seconds
|
||||
public let scannedAt: Int
|
||||
@@ -38,7 +38,7 @@ extension Operations {
|
||||
/// - Parameter scannedAt: Unix epoch datetime in seconds
|
||||
/// - Parameter updatedAt: Unix epoch datetime in seconds
|
||||
///
|
||||
public init(agent: String, allowSync: Bool, art: String, composite: String, content: Bool, contentChangedAt: Int, createdAt: Int, directory: Bool, filters: Bool, hidden: Int, key: String, language: String, location: [Operations.Location], refreshing: Bool, scannedAt: Int, scanner: String, thumb: String, title: String, type: String, updatedAt: Int, uuid: String) {
|
||||
public init(agent: String, allowSync: Bool, art: String, composite: String, content: Bool, contentChangedAt: Int, createdAt: Int, directory: Bool, filters: Bool, hidden: Int, key: String, language: String, location: [Operations.GetAllLibrariesLocation], refreshing: Bool, scannedAt: Int, scanner: String, thumb: String, title: String, type: String, updatedAt: Int, uuid: String) {
|
||||
self.agent = agent
|
||||
self.allowSync = allowSync
|
||||
self.art = art
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetAllLibrariesLocation {
|
||||
public let id: Int
|
||||
public let path: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(id: Int, path: String) {
|
||||
self.id = id
|
||||
self.path = path
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetAllLibrariesLocation: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case path
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ extension Operations {
|
||||
public let ratingKey: Int
|
||||
public let upscale: Int
|
||||
public let width: Int
|
||||
/// Plex Authentication Token
|
||||
/// An authentication token, obtained from plex.tv
|
||||
public let xPlexToken: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter ratingKey: the id of the library item to return the children of.
|
||||
/// - Parameter xPlexToken: Plex Authentication Token
|
||||
/// - Parameter xPlexToken: An authentication token, obtained from plex.tv
|
||||
///
|
||||
public init(height: Int, minSize: Int, ratingKey: Int, upscale: Int, width: Int, xPlexToken: String) {
|
||||
self.height = height
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetLibraryItemsLocation {
|
||||
public let path: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(path: String? = nil) {
|
||||
self.path = path
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsLocation: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case path
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,120 +5,122 @@ import Foundation
|
||||
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
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
public let audioChannels: Int?
|
||||
public let audioCodec: String?
|
||||
public let audioProfile: String?
|
||||
public let bitrate: Int?
|
||||
public let duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
public let hasVoiceActivity: Bool?
|
||||
public let height: Int?
|
||||
public let optimizedForStreaming: Operations.GetLibraryItemsOptimizedForStreaming?
|
||||
public let videoCodec: String?
|
||||
public let videoFrameRate: String?
|
||||
public let videoProfile: String?
|
||||
public let videoResolution: String?
|
||||
public let width: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
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, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, optimizedForStreaming: Operations.GetLibraryItemsOptimizedForStreaming? = nil) {
|
||||
self._aspectRatio = DecimalSerialized<Double>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.bitrate = bitrate
|
||||
public init(container: String, id: Int, part: [Operations.GetLibraryItemsPart], aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.GetLibraryItemsOptimizedForStreaming? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.container = container
|
||||
self.duration = duration
|
||||
self.height = height
|
||||
self.id = id
|
||||
self.part = part
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.audioProfile = audioProfile
|
||||
self.bitrate = bitrate
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.height = height
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.videoCodec = videoCodec
|
||||
self.videoFrameRate = videoFrameRate
|
||||
self.videoProfile = videoProfile
|
||||
self.videoResolution = videoResolution
|
||||
self.width = width
|
||||
self.audioProfile = audioProfile
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsMedia: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case container
|
||||
case id
|
||||
case part = "Part"
|
||||
case aspectRatio
|
||||
case audioChannels
|
||||
case audioCodec
|
||||
case audioProfile
|
||||
case bitrate
|
||||
case container
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case height
|
||||
case id
|
||||
case part = "Part"
|
||||
case optimizedForStreaming
|
||||
case videoCodec
|
||||
case videoFrameRate
|
||||
case videoProfile
|
||||
case videoResolution
|
||||
case width
|
||||
case audioProfile
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case optimizedForStreaming
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
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._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.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile)
|
||||
self.bitrate = try container.decodeIfPresent(Int.self, forKey: .bitrate)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.has64bitOffsets = try container.decodeIfPresent(Bool.self, forKey: .has64bitOffsets)
|
||||
self.hasVoiceActivity = try container.decodeIfPresent(Bool.self, forKey: .hasVoiceActivity)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.optimizedForStreaming = try container.decodeIfPresent(Operations.GetLibraryItemsOptimizedForStreaming.self, forKey: .optimizedForStreaming)
|
||||
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)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
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)
|
||||
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.audioProfile, forKey: .audioProfile)
|
||||
try container.encodeIfPresent(self.bitrate, forKey: .bitrate)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.has64bitOffsets, forKey: .has64bitOffsets)
|
||||
try container.encodeIfPresent(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.optimizedForStreaming, forKey: .optimizedForStreaming)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetLibraryItemsMedia {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double> {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double?> {
|
||||
return _aspectRatio
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ extension Operations {
|
||||
public let librarySectionID: Int?
|
||||
public let librarySectionKey: String?
|
||||
public let librarySectionTitle: String?
|
||||
public let location: [Operations.GetLibraryItemsLocation]?
|
||||
/// The Media object is only included when type query is `4` or higher.
|
||||
///
|
||||
public let media: [Operations.GetLibraryItemsMedia]?
|
||||
@@ -125,7 +126,7 @@ extension Operations {
|
||||
///
|
||||
/// - Parameter updatedAt: Unix epoch datetime in seconds
|
||||
///
|
||||
public init(addedAt: Int, guid: String, key: String, ratingKey: String, summary: String, title: String, type: Operations.GetLibraryItemsLibraryType, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, banner: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, collection: [Operations.GetLibraryItemsCollection]? = nil, contentRating: String? = nil, country: [Operations.GetLibraryItemsCountry]? = nil, director: [Operations.GetLibraryItemsDirector]? = nil, duration: Int? = nil, flattenSeasons: Operations.GetLibraryItemsFlattenSeasons? = 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, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, media: [Operations.GetLibraryItemsMedia]? = nil, mediaGuid: [Operations.GetLibraryItemsMediaGuid]? = nil, metaDataRating: [Operations.GetLibraryItemsMetaDataRating]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentSlug: 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.GetLibraryItemsShowOrdering? = 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.GetLibraryItemsUltraBlurColors? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetLibraryItemsWriter]? = nil, year: Int? = nil) {
|
||||
public init(addedAt: Int, guid: String, key: String, ratingKey: String, summary: String, title: String, type: Operations.GetLibraryItemsLibraryType, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, banner: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, collection: [Operations.GetLibraryItemsCollection]? = nil, contentRating: String? = nil, country: [Operations.GetLibraryItemsCountry]? = nil, director: [Operations.GetLibraryItemsDirector]? = nil, duration: Int? = nil, flattenSeasons: Operations.GetLibraryItemsFlattenSeasons? = 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, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, location: [Operations.GetLibraryItemsLocation]? = nil, media: [Operations.GetLibraryItemsMedia]? = nil, mediaGuid: [Operations.GetLibraryItemsMediaGuid]? = nil, metaDataRating: [Operations.GetLibraryItemsMetaDataRating]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentSlug: 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.GetLibraryItemsShowOrdering? = 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.GetLibraryItemsUltraBlurColors? = 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
|
||||
@@ -163,6 +164,7 @@ extension Operations {
|
||||
self.librarySectionID = librarySectionID
|
||||
self.librarySectionKey = librarySectionKey
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.location = location
|
||||
self.media = media
|
||||
self.mediaGuid = mediaGuid
|
||||
self.metaDataRating = metaDataRating
|
||||
@@ -241,6 +243,7 @@ extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
case librarySectionID
|
||||
case librarySectionKey
|
||||
case librarySectionTitle
|
||||
case location = "Location"
|
||||
case media = "Media"
|
||||
case mediaGuid = "Guid"
|
||||
case metaDataRating = "Rating"
|
||||
@@ -318,6 +321,7 @@ extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
self.librarySectionID = try container.decodeIfPresent(Int.self, forKey: .librarySectionID)
|
||||
self.librarySectionKey = try container.decodeIfPresent(String.self, forKey: .librarySectionKey)
|
||||
self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle)
|
||||
self.location = try container.decodeIfPresent([Operations.GetLibraryItemsLocation].self, forKey: .location)
|
||||
self.media = try container.decodeIfPresent([Operations.GetLibraryItemsMedia].self, forKey: .media)
|
||||
self.mediaGuid = try container.decodeIfPresent([Operations.GetLibraryItemsMediaGuid].self, forKey: .mediaGuid)
|
||||
self.metaDataRating = try container.decodeIfPresent([Operations.GetLibraryItemsMetaDataRating].self, forKey: .metaDataRating)
|
||||
@@ -397,6 +401,7 @@ extension Operations.GetLibraryItemsMetadata: Codable {
|
||||
try container.encodeIfPresent(self.librarySectionID, forKey: .librarySectionID)
|
||||
try container.encodeIfPresent(self.librarySectionKey, forKey: .librarySectionKey)
|
||||
try container.encodeIfPresent(self.librarySectionTitle, forKey: .librarySectionTitle)
|
||||
try container.encodeIfPresent(self.location, forKey: .location)
|
||||
try container.encodeIfPresent(self.media, forKey: .media)
|
||||
try container.encodeIfPresent(self.mediaGuid, forKey: .mediaGuid)
|
||||
try container.encodeIfPresent(self.metaDataRating, forKey: .metaDataRating)
|
||||
|
||||
@@ -8,56 +8,56 @@ extension Operations {
|
||||
/// 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 duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
public let hasThumbnail: Operations.GetLibraryItemsHasThumbnail?
|
||||
public let indexes: String?
|
||||
public let optimizedForStreaming: Bool?
|
||||
public let stream: [Operations.GetLibraryItemsStream]?
|
||||
public let videoProfile: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter container: The container format of the media file.
|
||||
///
|
||||
///
|
||||
public init(container: String, duration: Int, file: String, id: Int, key: String, size: Int, videoProfile: String, audioProfile: String? = nil, has64bitOffsets: Bool? = nil, hasThumbnail: Operations.GetLibraryItemsHasThumbnail? = nil, indexes: String? = nil, optimizedForStreaming: Bool? = nil, stream: [Operations.GetLibraryItemsStream]? = nil) {
|
||||
public init(container: String, file: String, id: Int, key: String, size: Int, audioProfile: String? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasThumbnail: Operations.GetLibraryItemsHasThumbnail? = nil, indexes: String? = nil, optimizedForStreaming: Bool? = nil, stream: [Operations.GetLibraryItemsStream]? = nil, videoProfile: String? = nil) {
|
||||
self.container = container
|
||||
self.duration = duration
|
||||
self.file = file
|
||||
self.id = id
|
||||
self.key = key
|
||||
self.size = size
|
||||
self.videoProfile = videoProfile
|
||||
self.audioProfile = audioProfile
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasThumbnail = hasThumbnail
|
||||
self.indexes = indexes
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.stream = stream
|
||||
self.videoProfile = videoProfile
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetLibraryItemsPart: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case container
|
||||
case duration
|
||||
case file
|
||||
case id
|
||||
case key
|
||||
case size
|
||||
case videoProfile
|
||||
case audioProfile
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasThumbnail
|
||||
case indexes
|
||||
case optimizedForStreaming
|
||||
case stream = "Stream"
|
||||
case videoProfile
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetMediaProvidersRequest: APIValue {
|
||||
/// Plex Authentication Token
|
||||
/// An authentication token, obtained from plex.tv
|
||||
public let xPlexToken: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter xPlexToken: Plex Authentication Token
|
||||
/// - Parameter xPlexToken: An authentication token, obtained from plex.tv
|
||||
///
|
||||
public init(xPlexToken: String) {
|
||||
self.xPlexToken = xPlexToken
|
||||
|
||||
@@ -5,12 +5,16 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetPinRequest: APIValue {
|
||||
/// The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device)
|
||||
/// An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
public let clientID: String?
|
||||
/// The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
public let clientName: String?
|
||||
public let clientPlatform: String?
|
||||
/// The version of the client application.
|
||||
public let clientVersion: String?
|
||||
public let deviceName: String?
|
||||
/// A relatively friendly name for the client device
|
||||
public let deviceNickname: String?
|
||||
/// The platform of the client application.
|
||||
public let platform: String?
|
||||
/// Determines the kind of code returned by the API call
|
||||
/// Strong codes are used for Pin authentication flows
|
||||
/// Non-Strong codes are used for `Plex.tv/link`
|
||||
@@ -19,18 +23,22 @@ extension Operations {
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter clientID: The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device)
|
||||
/// - Parameter clientID: An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
/// - Parameter clientName: The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
/// - Parameter clientVersion: The version of the client application.
|
||||
/// - Parameter deviceNickname: A relatively friendly name for the client device
|
||||
/// - Parameter platform: The platform of the client application.
|
||||
/// - Parameter strong: Determines the kind of code returned by the API call
|
||||
/// Strong codes are used for Pin authentication flows
|
||||
/// Non-Strong codes are used for `Plex.tv/link`
|
||||
///
|
||||
///
|
||||
public init(clientID: String? = nil, clientName: String? = nil, clientPlatform: String? = nil, clientVersion: String? = nil, deviceName: String? = nil, strong: Bool? = nil) {
|
||||
public init(clientID: String? = nil, clientName: String? = nil, clientVersion: String? = nil, deviceNickname: String? = nil, platform: String? = nil, strong: Bool? = nil) {
|
||||
self.clientID = clientID
|
||||
self.clientName = clientName
|
||||
self.clientPlatform = clientPlatform
|
||||
self.clientVersion = clientVersion
|
||||
self.deviceName = deviceName
|
||||
self.deviceNickname = deviceNickname
|
||||
self.platform = platform
|
||||
self.strong = strong
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -49,6 +49,7 @@ extension Operations {
|
||||
public let librarySectionID: Int?
|
||||
public let librarySectionKey: String?
|
||||
public let librarySectionTitle: String?
|
||||
public let location: [Operations.Location]?
|
||||
/// The Media object is only included when type query is `4` or higher.
|
||||
///
|
||||
public let media: [Operations.Media]?
|
||||
@@ -125,7 +126,7 @@ extension Operations {
|
||||
///
|
||||
/// - Parameter updatedAt: Unix epoch datetime in seconds
|
||||
///
|
||||
public init(addedAt: Int, guid: String, key: String, ratingKey: String, summary: String, title: String, type: Operations.GetRecentlyAddedHubsType, 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.Country]? = nil, director: [Operations.Director]? = nil, duration: Int? = nil, flattenSeasons: Operations.FlattenSeasons? = nil, genre: [Operations.Genre]? = 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.GetRecentlyAddedImage]? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, media: [Operations.Media]? = nil, mediaGuid: [Operations.MediaGuid]? = nil, metaDataRating: [Operations.MetaDataRating]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentSlug: 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.Role]? = 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.Writer]? = nil, year: Int? = nil) {
|
||||
public init(addedAt: Int, guid: String, key: String, ratingKey: String, summary: String, title: String, type: Operations.GetRecentlyAddedHubsType, 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.Country]? = nil, director: [Operations.Director]? = nil, duration: Int? = nil, flattenSeasons: Operations.FlattenSeasons? = nil, genre: [Operations.Genre]? = 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.GetRecentlyAddedImage]? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, location: [Operations.Location]? = nil, media: [Operations.Media]? = nil, mediaGuid: [Operations.MediaGuid]? = nil, metaDataRating: [Operations.MetaDataRating]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentSlug: 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.Role]? = 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.Writer]? = nil, year: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.guid = guid
|
||||
self.key = key
|
||||
@@ -163,6 +164,7 @@ extension Operations {
|
||||
self.librarySectionID = librarySectionID
|
||||
self.librarySectionKey = librarySectionKey
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.location = location
|
||||
self.media = media
|
||||
self.mediaGuid = mediaGuid
|
||||
self.metaDataRating = metaDataRating
|
||||
@@ -241,6 +243,7 @@ extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
case librarySectionID
|
||||
case librarySectionKey
|
||||
case librarySectionTitle
|
||||
case location = "Location"
|
||||
case media = "Media"
|
||||
case mediaGuid = "Guid"
|
||||
case metaDataRating = "Rating"
|
||||
@@ -318,6 +321,7 @@ extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
self.librarySectionID = try container.decodeIfPresent(Int.self, forKey: .librarySectionID)
|
||||
self.librarySectionKey = try container.decodeIfPresent(String.self, forKey: .librarySectionKey)
|
||||
self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle)
|
||||
self.location = try container.decodeIfPresent([Operations.Location].self, forKey: .location)
|
||||
self.media = try container.decodeIfPresent([Operations.Media].self, forKey: .media)
|
||||
self.mediaGuid = try container.decodeIfPresent([Operations.MediaGuid].self, forKey: .mediaGuid)
|
||||
self.metaDataRating = try container.decodeIfPresent([Operations.MetaDataRating].self, forKey: .metaDataRating)
|
||||
@@ -397,6 +401,7 @@ extension Operations.GetRecentlyAddedMetadata: Codable {
|
||||
try container.encodeIfPresent(self.librarySectionID, forKey: .librarySectionID)
|
||||
try container.encodeIfPresent(self.librarySectionKey, forKey: .librarySectionKey)
|
||||
try container.encodeIfPresent(self.librarySectionTitle, forKey: .librarySectionTitle)
|
||||
try container.encodeIfPresent(self.location, forKey: .location)
|
||||
try container.encodeIfPresent(self.media, forKey: .media)
|
||||
try container.encodeIfPresent(self.mediaGuid, forKey: .mediaGuid)
|
||||
try container.encodeIfPresent(self.metaDataRating, forKey: .metaDataRating)
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
public struct GetSearchAllLibrariesBadRequest {
|
||||
public let errors: [Operations.GetSearchAllLibrariesErrors]?
|
||||
|
||||
/// Creates a request model with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetSearchAllLibrariesErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesBadRequest: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesCollection {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesCollection: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesCountry {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesCountry: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesDirector {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesDirector: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesErrors {
|
||||
public let code: Int?
|
||||
public let message: String?
|
||||
public let status: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Int? = nil, message: String? = nil, status: Int? = nil) {
|
||||
self.code = code
|
||||
self.message = message
|
||||
self.status = status
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum GetSearchAllLibrariesFlattenSeasons: String, Codable, APIValue {
|
||||
case `false` = "0"
|
||||
case `true` = "1"
|
||||
}}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesGenre {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesGenre: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum GetSearchAllLibrariesHasThumbnail: 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 GetSearchAllLibrariesImage {
|
||||
public let alt: String
|
||||
public let type: Operations.GetSearchAllLibrariesLibraryType
|
||||
public let url: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(alt: String, type: Operations.GetSearchAllLibrariesLibraryType, url: String) {
|
||||
self.alt = alt
|
||||
self.type = type
|
||||
self.url = url
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesImage: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case alt
|
||||
case type
|
||||
case url
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesLibraryErrors {
|
||||
public let code: Int?
|
||||
public let message: String?
|
||||
public let status: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(code: Int? = nil, message: String? = nil, status: Int? = nil) {
|
||||
self.code = code
|
||||
self.message = message
|
||||
self.status = status
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesLibraryErrors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case code
|
||||
case message
|
||||
case status
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum GetSearchAllLibrariesLibraryType: String, Codable, APIValue {
|
||||
case coverPoster = "coverPoster"
|
||||
case background = "background"
|
||||
case snapshot = "snapshot"
|
||||
case clearLogo = "clearLogo"
|
||||
}}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesLocation {
|
||||
public let path: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(path: String? = nil) {
|
||||
self.path = path
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesLocation: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case path
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesMedia {
|
||||
public let container: String
|
||||
public let id: Int
|
||||
public let part: [Operations.GetSearchAllLibrariesPart]
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
public let audioChannels: Int?
|
||||
public let audioCodec: String?
|
||||
public let audioProfile: String?
|
||||
public let bitrate: Int?
|
||||
public let duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
public let hasVoiceActivity: Bool?
|
||||
public let height: Int?
|
||||
public let optimizedForStreaming: Operations.GetSearchAllLibrariesOptimizedForStreaming?
|
||||
public let videoCodec: String?
|
||||
public let videoFrameRate: String?
|
||||
public let videoProfile: String?
|
||||
public let videoResolution: String?
|
||||
public let width: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(container: String, id: Int, part: [Operations.GetSearchAllLibrariesPart], aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.GetSearchAllLibrariesOptimizedForStreaming? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.container = container
|
||||
self.id = id
|
||||
self.part = part
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.audioProfile = audioProfile
|
||||
self.bitrate = bitrate
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.height = height
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.videoCodec = videoCodec
|
||||
self.videoFrameRate = videoFrameRate
|
||||
self.videoProfile = videoProfile
|
||||
self.videoResolution = videoResolution
|
||||
self.width = width
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesMedia: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case container
|
||||
case id
|
||||
case part = "Part"
|
||||
case aspectRatio
|
||||
case audioChannels
|
||||
case audioCodec
|
||||
case audioProfile
|
||||
case bitrate
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case height
|
||||
case optimizedForStreaming
|
||||
case videoCodec
|
||||
case videoFrameRate
|
||||
case videoProfile
|
||||
case videoResolution
|
||||
case width
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.container = try container.decode(String.self, forKey: .container)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.part = try container.decode([Operations.GetSearchAllLibrariesPart].self, forKey: .part)
|
||||
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.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile)
|
||||
self.bitrate = try container.decodeIfPresent(Int.self, forKey: .bitrate)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.has64bitOffsets = try container.decodeIfPresent(Bool.self, forKey: .has64bitOffsets)
|
||||
self.hasVoiceActivity = try container.decodeIfPresent(Bool.self, forKey: .hasVoiceActivity)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.optimizedForStreaming = try container.decodeIfPresent(Operations.GetSearchAllLibrariesOptimizedForStreaming.self, forKey: .optimizedForStreaming)
|
||||
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)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.container, forKey: .container)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.part, forKey: .part)
|
||||
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.audioProfile, forKey: .audioProfile)
|
||||
try container.encodeIfPresent(self.bitrate, forKey: .bitrate)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.has64bitOffsets, forKey: .has64bitOffsets)
|
||||
try container.encodeIfPresent(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.optimizedForStreaming, forKey: .optimizedForStreaming)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesMedia {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double?> {
|
||||
return _aspectRatio
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesMediaContainer {
|
||||
public let searchResult: [Operations.SearchResult]
|
||||
@DecimalSerialized
|
||||
public private(set) var size: Double
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(searchResult: [Operations.SearchResult], size: Double) {
|
||||
self.searchResult = searchResult
|
||||
self._size = DecimalSerialized<Double>(wrappedValue: size)
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesMediaContainer: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case searchResult = "SearchResult"
|
||||
case size
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.searchResult = try container.decode([Operations.SearchResult].self, forKey: .searchResult)
|
||||
self._size = try container.decode(DecimalSerialized<Double>.self, forKey: .size)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.searchResult, forKey: .searchResult)
|
||||
try container.encode(self._size, forKey: .size)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesMediaContainer {
|
||||
var sizeWrapper: DecimalSerialized<Double> {
|
||||
return _size
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesMediaGuid {
|
||||
/// Can be one of the following formats:
|
||||
/// imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
///
|
||||
public let id: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter id: Can be one of the following formats:
|
||||
/// imdb://tt13015952, tmdb://2434012, tvdb://7945991
|
||||
///
|
||||
///
|
||||
public init(id: String) {
|
||||
self.id = id
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesMediaGuid: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesMetaDataRating {
|
||||
/// A URI or path to the rating image.
|
||||
public let image: String
|
||||
/// The type of rating (e.g., audience, critic).
|
||||
public let type: String
|
||||
/// The value of the rating.
|
||||
@DecimalSerialized
|
||||
public private(set) var value: Double
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter image: A URI or path to the rating image.
|
||||
/// - Parameter type: The type of rating (e.g., audience, critic).
|
||||
/// - Parameter value: The value of the rating.
|
||||
///
|
||||
public init(image: String, type: String, value: Double) {
|
||||
self.image = image
|
||||
self.type = type
|
||||
self._value = DecimalSerialized<Double>(wrappedValue: value)
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesMetaDataRating: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case image
|
||||
case type
|
||||
case value
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.image = try container.decode(String.self, forKey: .image)
|
||||
self.type = try container.decode(String.self, forKey: .type)
|
||||
self._value = try container.decode(DecimalSerialized<Double>.self, forKey: .value)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.image, forKey: .image)
|
||||
try container.encode(self.type, forKey: .type)
|
||||
try container.encode(self._value, forKey: .value)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesMetaDataRating {
|
||||
var valueWrapper: DecimalSerialized<Double> {
|
||||
return _value
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,458 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesMetadata {
|
||||
/// Unix epoch datetime in seconds
|
||||
public let addedAt: Int
|
||||
public let guid: String
|
||||
public let key: String
|
||||
/// 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
|
||||
/// The type of media content
|
||||
///
|
||||
public let type: Operations.GetSearchAllLibrariesType
|
||||
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.GetSearchAllLibrariesCollection]?
|
||||
public let contentRating: String?
|
||||
public let country: [Operations.GetSearchAllLibrariesCountry]?
|
||||
public let director: [Operations.GetSearchAllLibrariesDirector]?
|
||||
public let duration: Int?
|
||||
public let flattenSeasons: Operations.GetSearchAllLibrariesFlattenSeasons?
|
||||
public let genre: [Operations.GetSearchAllLibrariesGenre]?
|
||||
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.GetSearchAllLibrariesImage]?
|
||||
public let index: Int?
|
||||
public let lastViewedAt: Int?
|
||||
public let leafCount: Int?
|
||||
public let librarySectionID: Int?
|
||||
public let librarySectionKey: String?
|
||||
public let librarySectionTitle: String?
|
||||
public let location: [Operations.GetSearchAllLibrariesLocation]?
|
||||
/// The Media object is only included when type query is `4` or higher.
|
||||
///
|
||||
public let media: [Operations.GetSearchAllLibrariesMedia]?
|
||||
/// The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
|
||||
///
|
||||
public let mediaGuid: [Operations.GetSearchAllLibrariesMediaGuid]?
|
||||
public let metaDataRating: [Operations.GetSearchAllLibrariesMetaDataRating]?
|
||||
@DateOnly
|
||||
public private(set) var originallyAvailableAt: Date?
|
||||
public let originalTitle: String?
|
||||
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 parentSlug: String?
|
||||
public let parentStudio: String?
|
||||
public let parentTheme: String?
|
||||
public let parentThumb: String?
|
||||
public let parentTitle: String?
|
||||
public let parentYear: Int?
|
||||
public let primaryExtraKey: String?
|
||||
@DecimalSerialized
|
||||
public private(set) var rating: Double?
|
||||
public let ratingImage: String?
|
||||
public let role: [Operations.GetSearchAllLibrariesRole]?
|
||||
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.GetSearchAllLibrariesShowOrdering?
|
||||
public let skipChildren: Bool?
|
||||
public let skipCount: Int?
|
||||
public let slug: String?
|
||||
public let studio: String?
|
||||
public let tagline: String?
|
||||
public let theme: String?
|
||||
public let thumb: String?
|
||||
public let titleSort: String?
|
||||
public let ultraBlurColors: Operations.GetSearchAllLibrariesUltraBlurColors?
|
||||
/// 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.GetSearchAllLibrariesWriter]?
|
||||
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(addedAt: Int, guid: String, key: String, ratingKey: String, summary: String, title: String, type: Operations.GetSearchAllLibrariesType, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, banner: String? = nil, chapterSource: String? = nil, childCount: Int? = nil, collection: [Operations.GetSearchAllLibrariesCollection]? = nil, contentRating: String? = nil, country: [Operations.GetSearchAllLibrariesCountry]? = nil, director: [Operations.GetSearchAllLibrariesDirector]? = nil, duration: Int? = nil, flattenSeasons: Operations.GetSearchAllLibrariesFlattenSeasons? = nil, genre: [Operations.GetSearchAllLibrariesGenre]? = 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.GetSearchAllLibrariesImage]? = nil, index: Int? = nil, lastViewedAt: Int? = nil, leafCount: Int? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, location: [Operations.GetSearchAllLibrariesLocation]? = nil, media: [Operations.GetSearchAllLibrariesMedia]? = nil, mediaGuid: [Operations.GetSearchAllLibrariesMediaGuid]? = nil, metaDataRating: [Operations.GetSearchAllLibrariesMetaDataRating]? = nil, originallyAvailableAt: Date? = nil, originalTitle: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentSlug: 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.GetSearchAllLibrariesRole]? = nil, seasonCount: Int? = nil, showOrdering: Operations.GetSearchAllLibrariesShowOrdering? = 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.GetSearchAllLibrariesUltraBlurColors? = nil, updatedAt: Int? = nil, viewCount: Int? = nil, viewedLeafCount: Int? = nil, viewOffset: Int? = nil, writer: [Operations.GetSearchAllLibrariesWriter]? = nil, year: Int? = nil) {
|
||||
self.addedAt = addedAt
|
||||
self.guid = guid
|
||||
self.key = key
|
||||
self.ratingKey = ratingKey
|
||||
self.summary = summary
|
||||
self.title = title
|
||||
self.type = type
|
||||
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.librarySectionID = librarySectionID
|
||||
self.librarySectionKey = librarySectionKey
|
||||
self.librarySectionTitle = librarySectionTitle
|
||||
self.location = location
|
||||
self.media = media
|
||||
self.mediaGuid = mediaGuid
|
||||
self.metaDataRating = metaDataRating
|
||||
self._originallyAvailableAt = DateOnly<Date?>(wrappedValue: originallyAvailableAt)
|
||||
self.originalTitle = originalTitle
|
||||
self.parentGuid = parentGuid
|
||||
self.parentIndex = parentIndex
|
||||
self.parentKey = parentKey
|
||||
self.parentRatingKey = parentRatingKey
|
||||
self.parentSlug = parentSlug
|
||||
self.parentStudio = parentStudio
|
||||
self.parentTheme = parentTheme
|
||||
self.parentThumb = parentThumb
|
||||
self.parentTitle = parentTitle
|
||||
self.parentYear = parentYear
|
||||
self.primaryExtraKey = primaryExtraKey
|
||||
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.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.GetSearchAllLibrariesMetadata: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case addedAt
|
||||
case guid
|
||||
case key
|
||||
case ratingKey
|
||||
case summary
|
||||
case title
|
||||
case type
|
||||
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 librarySectionID
|
||||
case librarySectionKey
|
||||
case librarySectionTitle
|
||||
case location = "Location"
|
||||
case media = "Media"
|
||||
case mediaGuid = "Guid"
|
||||
case metaDataRating = "Rating"
|
||||
case originallyAvailableAt
|
||||
case originalTitle
|
||||
case parentGuid
|
||||
case parentIndex
|
||||
case parentKey
|
||||
case parentRatingKey
|
||||
case parentSlug
|
||||
case parentStudio
|
||||
case parentTheme
|
||||
case parentThumb
|
||||
case parentTitle
|
||||
case parentYear
|
||||
case primaryExtraKey
|
||||
case rating
|
||||
case ratingImage
|
||||
case role = "Role"
|
||||
case seasonCount
|
||||
case showOrdering
|
||||
case skipChildren
|
||||
case skipCount
|
||||
case slug
|
||||
case studio
|
||||
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.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.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(Operations.GetSearchAllLibrariesType.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.GetSearchAllLibrariesCollection].self, forKey: .collection)
|
||||
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
|
||||
self.country = try container.decodeIfPresent([Operations.GetSearchAllLibrariesCountry].self, forKey: .country)
|
||||
self.director = try container.decodeIfPresent([Operations.GetSearchAllLibrariesDirector].self, forKey: .director)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.flattenSeasons = try container.decodeIfPresent(Operations.GetSearchAllLibrariesFlattenSeasons.self, forKey: .flattenSeasons)
|
||||
self.genre = try container.decodeIfPresent([Operations.GetSearchAllLibrariesGenre].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.GetSearchAllLibrariesImage].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.librarySectionID = try container.decodeIfPresent(Int.self, forKey: .librarySectionID)
|
||||
self.librarySectionKey = try container.decodeIfPresent(String.self, forKey: .librarySectionKey)
|
||||
self.librarySectionTitle = try container.decodeIfPresent(String.self, forKey: .librarySectionTitle)
|
||||
self.location = try container.decodeIfPresent([Operations.GetSearchAllLibrariesLocation].self, forKey: .location)
|
||||
self.media = try container.decodeIfPresent([Operations.GetSearchAllLibrariesMedia].self, forKey: .media)
|
||||
self.mediaGuid = try container.decodeIfPresent([Operations.GetSearchAllLibrariesMediaGuid].self, forKey: .mediaGuid)
|
||||
self.metaDataRating = try container.decodeIfPresent([Operations.GetSearchAllLibrariesMetaDataRating].self, forKey: .metaDataRating)
|
||||
self._originallyAvailableAt = try container.decodeIfPresent(DateOnly<Date?>.self, forKey: .originallyAvailableAt) ?? DateOnly<Date?>(wrappedValue: nil)
|
||||
self.originalTitle = try container.decodeIfPresent(String.self, forKey: .originalTitle)
|
||||
self.parentGuid = try container.decodeIfPresent(String.self, forKey: .parentGuid)
|
||||
self.parentIndex = try container.decodeIfPresent(Int.self, forKey: .parentIndex)
|
||||
self.parentKey = try container.decodeIfPresent(String.self, forKey: .parentKey)
|
||||
self.parentRatingKey = try container.decodeIfPresent(String.self, forKey: .parentRatingKey)
|
||||
self.parentSlug = try container.decodeIfPresent(String.self, forKey: .parentSlug)
|
||||
self.parentStudio = try container.decodeIfPresent(String.self, forKey: .parentStudio)
|
||||
self.parentTheme = try container.decodeIfPresent(String.self, forKey: .parentTheme)
|
||||
self.parentThumb = try container.decodeIfPresent(String.self, forKey: .parentThumb)
|
||||
self.parentTitle = try container.decodeIfPresent(String.self, forKey: .parentTitle)
|
||||
self.parentYear = try container.decodeIfPresent(Int.self, forKey: .parentYear)
|
||||
self.primaryExtraKey = try container.decodeIfPresent(String.self, forKey: .primaryExtraKey)
|
||||
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.GetSearchAllLibrariesRole].self, forKey: .role)
|
||||
self.seasonCount = try container.decodeIfPresent(Int.self, forKey: .seasonCount)
|
||||
self.showOrdering = try container.decodeIfPresent(Operations.GetSearchAllLibrariesShowOrdering.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.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.GetSearchAllLibrariesUltraBlurColors.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.GetSearchAllLibrariesWriter].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.addedAt, forKey: .addedAt)
|
||||
try container.encode(self.guid, forKey: .guid)
|
||||
try container.encode(self.key, forKey: .key)
|
||||
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.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.librarySectionID, forKey: .librarySectionID)
|
||||
try container.encodeIfPresent(self.librarySectionKey, forKey: .librarySectionKey)
|
||||
try container.encodeIfPresent(self.librarySectionTitle, forKey: .librarySectionTitle)
|
||||
try container.encodeIfPresent(self.location, forKey: .location)
|
||||
try container.encodeIfPresent(self.media, forKey: .media)
|
||||
try container.encodeIfPresent(self.mediaGuid, forKey: .mediaGuid)
|
||||
try container.encodeIfPresent(self.metaDataRating, forKey: .metaDataRating)
|
||||
if self.originallyAvailableAt != nil {
|
||||
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||||
}
|
||||
try container.encodeIfPresent(self.originalTitle, forKey: .originalTitle)
|
||||
try container.encodeIfPresent(self.parentGuid, forKey: .parentGuid)
|
||||
try container.encodeIfPresent(self.parentIndex, forKey: .parentIndex)
|
||||
try container.encodeIfPresent(self.parentKey, forKey: .parentKey)
|
||||
try container.encodeIfPresent(self.parentRatingKey, forKey: .parentRatingKey)
|
||||
try container.encodeIfPresent(self.parentSlug, forKey: .parentSlug)
|
||||
try container.encodeIfPresent(self.parentStudio, forKey: .parentStudio)
|
||||
try container.encodeIfPresent(self.parentTheme, forKey: .parentTheme)
|
||||
try container.encodeIfPresent(self.parentThumb, forKey: .parentThumb)
|
||||
try container.encodeIfPresent(self.parentTitle, forKey: .parentTitle)
|
||||
try container.encodeIfPresent(self.parentYear, forKey: .parentYear)
|
||||
try container.encodeIfPresent(self.primaryExtraKey, forKey: .primaryExtraKey)
|
||||
if self.rating != nil {
|
||||
try container.encode(self._rating, forKey: .rating)
|
||||
}
|
||||
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.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)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesMetadata {
|
||||
var ratingWrapper: DecimalSerialized<Double?> {
|
||||
return _rating
|
||||
}
|
||||
var audienceRatingWrapper: DecimalSerialized<Double?> {
|
||||
return _audienceRating
|
||||
}
|
||||
var originallyAvailableAtWrapper: DateOnly<Date?> {
|
||||
return _originallyAvailableAt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum GetSearchAllLibrariesOptimizedForStreaming: Int, Codable, APIValue {
|
||||
case disable = 0
|
||||
case enable = 1
|
||||
}}
|
||||
@@ -0,0 +1,63 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesPart {
|
||||
/// The container format of the media file.
|
||||
///
|
||||
public let container: String
|
||||
public let file: String
|
||||
public let id: Int
|
||||
public let key: String
|
||||
public let size: Int
|
||||
public let audioProfile: String?
|
||||
public let duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
public let hasThumbnail: Operations.GetSearchAllLibrariesHasThumbnail?
|
||||
public let indexes: String?
|
||||
public let optimizedForStreaming: Bool?
|
||||
public let stream: [Operations.GetSearchAllLibrariesStream]?
|
||||
public let videoProfile: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter container: The container format of the media file.
|
||||
///
|
||||
///
|
||||
public init(container: String, file: String, id: Int, key: String, size: Int, audioProfile: String? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasThumbnail: Operations.GetSearchAllLibrariesHasThumbnail? = nil, indexes: String? = nil, optimizedForStreaming: Bool? = nil, stream: [Operations.GetSearchAllLibrariesStream]? = nil, videoProfile: String? = nil) {
|
||||
self.container = container
|
||||
self.file = file
|
||||
self.id = id
|
||||
self.key = key
|
||||
self.size = size
|
||||
self.audioProfile = audioProfile
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasThumbnail = hasThumbnail
|
||||
self.indexes = indexes
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.stream = stream
|
||||
self.videoProfile = videoProfile
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesPart: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case container
|
||||
case file
|
||||
case id
|
||||
case key
|
||||
case size
|
||||
case audioProfile
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasThumbnail
|
||||
case indexes
|
||||
case optimizedForStreaming
|
||||
case stream = "Stream"
|
||||
case videoProfile
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesRequest: APIValue {
|
||||
/// The search query term.
|
||||
public let query: String
|
||||
/// An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
public let clientID: String?
|
||||
/// Whether to include collections in the search results.
|
||||
public let includeCollections: Operations.QueryParamIncludeCollections?
|
||||
/// Whether to include external media in the search results.
|
||||
public let includeExternalMedia: Operations.QueryParamIncludeExternalMedia?
|
||||
/// Limit the number of results returned.
|
||||
public let limit: Int?
|
||||
/// A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv.
|
||||
///
|
||||
public let searchTypes: [Operations.SearchTypes]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter query: The search query term.
|
||||
/// - Parameter clientID: An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
/// - Parameter includeCollections: Whether to include collections in the search results.
|
||||
/// - Parameter includeExternalMedia: Whether to include external media in the search results.
|
||||
/// - Parameter limit: Limit the number of results returned.
|
||||
/// - Parameter searchTypes: A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv.
|
||||
///
|
||||
///
|
||||
public init(query: String, clientID: String? = nil, includeCollections: Operations.QueryParamIncludeCollections? = nil, includeExternalMedia: Operations.QueryParamIncludeExternalMedia? = nil, limit: Int? = nil, searchTypes: [Operations.SearchTypes]? = nil) {
|
||||
self.query = query
|
||||
self.clientID = clientID
|
||||
self.includeCollections = includeCollections
|
||||
self.includeExternalMedia = includeExternalMedia
|
||||
self.limit = limit
|
||||
self.searchTypes = searchTypes
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A response model
|
||||
public enum GetSearchAllLibrariesResponse {
|
||||
case empty
|
||||
case badRequest(Operations.GetSearchAllLibrariesBadRequest)
|
||||
case object(Operations.GetSearchAllLibrariesResponseBody)
|
||||
case unauthorized(Operations.GetSearchAllLibrariesUnauthorized)
|
||||
|
||||
var isEmpty: Bool {
|
||||
if case .empty = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func badRequest() throws -> Operations.GetSearchAllLibrariesBadRequest {
|
||||
guard case .badRequest(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func object() throws -> Operations.GetSearchAllLibrariesResponseBody {
|
||||
guard case .object(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
public func unauthorized() throws -> Operations.GetSearchAllLibrariesUnauthorized {
|
||||
guard case .unauthorized(let value) = self else {
|
||||
throw PlexswiftError.missingResponseData
|
||||
}
|
||||
return value
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// The libraries available on the Server
|
||||
public struct GetSearchAllLibrariesResponseBody {
|
||||
public let mediaContainer: Operations.GetSearchAllLibrariesMediaContainer
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(mediaContainer: Operations.GetSearchAllLibrariesMediaContainer) {
|
||||
self.mediaContainer = mediaContainer
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesResponseBody: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case mediaContainer = "MediaContainer"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesRole {
|
||||
/// The filter used to find the actor or tag.
|
||||
public let filter: String?
|
||||
/// The ID of the tag or actor.
|
||||
public let id: Int?
|
||||
/// The role of the actor or tag in the media.
|
||||
public let role: String?
|
||||
/// The name of the tag or actor.
|
||||
public let tag: String?
|
||||
/// Unique identifier for the tag.
|
||||
public let tagKey: String?
|
||||
/// The thumbnail of the actor
|
||||
public let thumb: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter filter: The filter used to find the actor or tag.
|
||||
/// - Parameter id: The ID of the tag or actor.
|
||||
/// - Parameter role: The role of the actor or tag in the media.
|
||||
/// - Parameter tag: The name of the tag or actor.
|
||||
/// - Parameter tagKey: Unique identifier for the tag.
|
||||
/// - Parameter thumb: The thumbnail of the actor
|
||||
///
|
||||
public init(filter: String? = nil, id: Int? = nil, role: String? = nil, tag: String? = nil, tagKey: String? = nil, thumb: String? = nil) {
|
||||
self.filter = filter
|
||||
self.id = id
|
||||
self.role = role
|
||||
self.tag = tag
|
||||
self.tagKey = tagKey
|
||||
self.thumb = thumb
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesRole: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case filter
|
||||
case id
|
||||
case role
|
||||
case tag
|
||||
case tagKey
|
||||
case thumb
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 GetSearchAllLibrariesShowOrdering: String, Codable, APIValue {
|
||||
case `none` = "None"
|
||||
case tmdbAiring = "tmdbAiring"
|
||||
case aired = "aired"
|
||||
case dvd = "dvd"
|
||||
case absolute = "absolute"
|
||||
}}
|
||||
@@ -0,0 +1,294 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesStream {
|
||||
/// Codec used by the stream
|
||||
public let codec: String
|
||||
public let id: Int
|
||||
/// The index of the stream
|
||||
public let index: Int
|
||||
/// Type of stream (1 = video, 2 = audio, 3 = subtitle)
|
||||
public let streamType: Int
|
||||
/// The audio channel layout
|
||||
public let audioChannelLayout: String?
|
||||
/// The bit depth of the video stream
|
||||
public let bitDepth: Int?
|
||||
/// The bitrate of the stream in kbps
|
||||
public let bitrate: Int?
|
||||
/// Indicates if the subtitle stream can auto-sync
|
||||
public let canAutoSync: Bool?
|
||||
/// Number of audio channels (for audio streams)
|
||||
public let channels: Int?
|
||||
/// The chroma location of the video stream
|
||||
public let chromaLocation: String?
|
||||
/// The chroma subsampling format
|
||||
public let chromaSubsampling: String?
|
||||
public let closedCaptions: Bool?
|
||||
/// The coded height of the video stream
|
||||
public let codedHeight: Int?
|
||||
/// The coded width of the video stream
|
||||
public let codedWidth: Int?
|
||||
/// The color primaries of the video stream
|
||||
public let colorPrimaries: String?
|
||||
/// The color range of the video stream
|
||||
public let colorRange: String?
|
||||
/// The color space of the video stream
|
||||
public let colorSpace: String?
|
||||
/// The transfer characteristics (TRC) of the video stream
|
||||
public let colorTrc: String?
|
||||
/// Indicates if this is the default stream
|
||||
public let `default`: Bool?
|
||||
/// Display title of the stream
|
||||
public let displayTitle: String?
|
||||
public let embeddedInVideo: String?
|
||||
/// Extended display title of the stream
|
||||
public let extendedDisplayTitle: String?
|
||||
/// The frame rate of the video stream
|
||||
@DecimalSerialized
|
||||
public private(set) var frameRate: Double?
|
||||
/// Indicates if the stream has a scaling matrix
|
||||
public let hasScalingMatrix: Bool?
|
||||
public let hearingImpaired: Bool?
|
||||
/// The height of the video stream
|
||||
public let height: Int?
|
||||
/// The language of the stream (for audio/subtitle streams)
|
||||
public let language: String?
|
||||
/// Language code of the stream
|
||||
public let languageCode: String?
|
||||
/// Language tag of the stream
|
||||
public let languageTag: String?
|
||||
/// The level of the video codec
|
||||
public let level: Int?
|
||||
/// The profile of the video codec
|
||||
public let profile: String?
|
||||
/// Number of reference frames
|
||||
public let refFrames: Int?
|
||||
/// Sampling rate of the audio stream in Hz
|
||||
public let samplingRate: Int?
|
||||
/// The scan type (progressive or interlaced)
|
||||
public let scanType: String?
|
||||
/// Indicates if the stream is selected
|
||||
public let selected: Bool?
|
||||
/// The identifier of the video stream
|
||||
public let streamIdentifier: String?
|
||||
/// Title of the subtitle track (for subtitle streams)
|
||||
public let title: String?
|
||||
/// The width of the video stream
|
||||
public let width: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter codec: Codec used by the stream
|
||||
/// - Parameter index: The index of the stream
|
||||
/// - Parameter streamType: Type of stream (1 = video, 2 = audio, 3 = subtitle)
|
||||
/// - Parameter audioChannelLayout: The audio channel layout
|
||||
/// - Parameter bitDepth: The bit depth of the video stream
|
||||
/// - Parameter bitrate: The bitrate of the stream in kbps
|
||||
/// - Parameter canAutoSync: Indicates if the subtitle stream can auto-sync
|
||||
/// - Parameter channels: Number of audio channels (for audio streams)
|
||||
/// - Parameter chromaLocation: The chroma location of the video stream
|
||||
/// - Parameter chromaSubsampling: The chroma subsampling format
|
||||
/// - Parameter codedHeight: The coded height of the video stream
|
||||
/// - Parameter codedWidth: The coded width of the video stream
|
||||
/// - Parameter colorPrimaries: The color primaries of the video stream
|
||||
/// - Parameter colorRange: The color range of the video stream
|
||||
/// - Parameter colorSpace: The color space of the video stream
|
||||
/// - Parameter colorTrc: The transfer characteristics (TRC) of the video stream
|
||||
/// - Parameter `default`: Indicates if this is the default stream
|
||||
/// - Parameter displayTitle: Display title of the stream
|
||||
/// - Parameter extendedDisplayTitle: Extended display title of the stream
|
||||
/// - Parameter frameRate: The frame rate of the video stream
|
||||
/// - Parameter hasScalingMatrix: Indicates if the stream has a scaling matrix
|
||||
/// - Parameter height: The height of the video stream
|
||||
/// - Parameter language: The language of the stream (for audio/subtitle streams)
|
||||
/// - Parameter languageCode: Language code of the stream
|
||||
/// - Parameter languageTag: Language tag of the stream
|
||||
/// - Parameter level: The level of the video codec
|
||||
/// - Parameter profile: The profile of the video codec
|
||||
/// - Parameter refFrames: Number of reference frames
|
||||
/// - Parameter samplingRate: Sampling rate of the audio stream in Hz
|
||||
/// - Parameter scanType: The scan type (progressive or interlaced)
|
||||
/// - Parameter selected: Indicates if the stream is selected
|
||||
/// - Parameter streamIdentifier: The identifier of the video stream
|
||||
/// - Parameter title: Title of the subtitle track (for subtitle streams)
|
||||
/// - Parameter width: The width of the video stream
|
||||
///
|
||||
public init(codec: String, id: Int, index: Int, streamType: Int, audioChannelLayout: String? = nil, bitDepth: Int? = nil, bitrate: Int? = nil, canAutoSync: Bool? = nil, channels: Int? = nil, chromaLocation: String? = nil, chromaSubsampling: String? = nil, closedCaptions: Bool? = nil, codedHeight: Int? = nil, codedWidth: Int? = nil, colorPrimaries: String? = nil, colorRange: String? = nil, colorSpace: String? = nil, colorTrc: String? = nil, `default`: Bool? = nil, displayTitle: String? = nil, embeddedInVideo: String? = nil, extendedDisplayTitle: String? = nil, frameRate: Double? = nil, hasScalingMatrix: Bool? = nil, hearingImpaired: Bool? = nil, height: Int? = nil, language: String? = nil, languageCode: String? = nil, languageTag: String? = nil, level: Int? = nil, profile: String? = nil, refFrames: Int? = nil, samplingRate: Int? = nil, scanType: String? = nil, selected: Bool? = nil, streamIdentifier: String? = nil, title: String? = nil, width: Int? = nil) {
|
||||
self.codec = codec
|
||||
self.id = id
|
||||
self.index = index
|
||||
self.streamType = streamType
|
||||
self.audioChannelLayout = audioChannelLayout
|
||||
self.bitDepth = bitDepth
|
||||
self.bitrate = bitrate
|
||||
self.canAutoSync = canAutoSync
|
||||
self.channels = channels
|
||||
self.chromaLocation = chromaLocation
|
||||
self.chromaSubsampling = chromaSubsampling
|
||||
self.closedCaptions = closedCaptions
|
||||
self.codedHeight = codedHeight
|
||||
self.codedWidth = codedWidth
|
||||
self.colorPrimaries = colorPrimaries
|
||||
self.colorRange = colorRange
|
||||
self.colorSpace = colorSpace
|
||||
self.colorTrc = colorTrc
|
||||
self.`default` = `default`
|
||||
self.displayTitle = displayTitle
|
||||
self.embeddedInVideo = embeddedInVideo
|
||||
self.extendedDisplayTitle = extendedDisplayTitle
|
||||
self._frameRate = DecimalSerialized<Double?>(wrappedValue: frameRate)
|
||||
self.hasScalingMatrix = hasScalingMatrix
|
||||
self.hearingImpaired = hearingImpaired
|
||||
self.height = height
|
||||
self.language = language
|
||||
self.languageCode = languageCode
|
||||
self.languageTag = languageTag
|
||||
self.level = level
|
||||
self.profile = profile
|
||||
self.refFrames = refFrames
|
||||
self.samplingRate = samplingRate
|
||||
self.scanType = scanType
|
||||
self.selected = selected
|
||||
self.streamIdentifier = streamIdentifier
|
||||
self.title = title
|
||||
self.width = width
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesStream: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case codec
|
||||
case id
|
||||
case index
|
||||
case streamType
|
||||
case audioChannelLayout
|
||||
case bitDepth
|
||||
case bitrate
|
||||
case canAutoSync
|
||||
case channels
|
||||
case chromaLocation
|
||||
case chromaSubsampling
|
||||
case closedCaptions
|
||||
case codedHeight
|
||||
case codedWidth
|
||||
case colorPrimaries
|
||||
case colorRange
|
||||
case colorSpace
|
||||
case colorTrc
|
||||
case `default` = "default"
|
||||
case displayTitle
|
||||
case embeddedInVideo
|
||||
case extendedDisplayTitle
|
||||
case frameRate
|
||||
case hasScalingMatrix
|
||||
case hearingImpaired
|
||||
case height
|
||||
case language
|
||||
case languageCode
|
||||
case languageTag
|
||||
case level
|
||||
case profile
|
||||
case refFrames
|
||||
case samplingRate
|
||||
case scanType
|
||||
case selected
|
||||
case streamIdentifier
|
||||
case title
|
||||
case width
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.codec = try container.decode(String.self, forKey: .codec)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.index = try container.decode(Int.self, forKey: .index)
|
||||
self.streamType = try container.decode(Int.self, forKey: .streamType)
|
||||
self.audioChannelLayout = try container.decodeIfPresent(String.self, forKey: .audioChannelLayout)
|
||||
self.bitDepth = try container.decodeIfPresent(Int.self, forKey: .bitDepth)
|
||||
self.bitrate = try container.decodeIfPresent(Int.self, forKey: .bitrate)
|
||||
self.canAutoSync = try container.decodeIfPresent(Bool.self, forKey: .canAutoSync)
|
||||
self.channels = try container.decodeIfPresent(Int.self, forKey: .channels)
|
||||
self.chromaLocation = try container.decodeIfPresent(String.self, forKey: .chromaLocation)
|
||||
self.chromaSubsampling = try container.decodeIfPresent(String.self, forKey: .chromaSubsampling)
|
||||
self.closedCaptions = try container.decodeIfPresent(Bool.self, forKey: .closedCaptions)
|
||||
self.codedHeight = try container.decodeIfPresent(Int.self, forKey: .codedHeight)
|
||||
self.codedWidth = try container.decodeIfPresent(Int.self, forKey: .codedWidth)
|
||||
self.colorPrimaries = try container.decodeIfPresent(String.self, forKey: .colorPrimaries)
|
||||
self.colorRange = try container.decodeIfPresent(String.self, forKey: .colorRange)
|
||||
self.colorSpace = try container.decodeIfPresent(String.self, forKey: .colorSpace)
|
||||
self.colorTrc = try container.decodeIfPresent(String.self, forKey: .colorTrc)
|
||||
self.`default` = try container.decodeIfPresent(Bool.self, forKey: .`default`)
|
||||
self.displayTitle = try container.decodeIfPresent(String.self, forKey: .displayTitle)
|
||||
self.embeddedInVideo = try container.decodeIfPresent(String.self, forKey: .embeddedInVideo)
|
||||
self.extendedDisplayTitle = try container.decodeIfPresent(String.self, forKey: .extendedDisplayTitle)
|
||||
self._frameRate = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .frameRate) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.hasScalingMatrix = try container.decodeIfPresent(Bool.self, forKey: .hasScalingMatrix)
|
||||
self.hearingImpaired = try container.decodeIfPresent(Bool.self, forKey: .hearingImpaired)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.language = try container.decodeIfPresent(String.self, forKey: .language)
|
||||
self.languageCode = try container.decodeIfPresent(String.self, forKey: .languageCode)
|
||||
self.languageTag = try container.decodeIfPresent(String.self, forKey: .languageTag)
|
||||
self.level = try container.decodeIfPresent(Int.self, forKey: .level)
|
||||
self.profile = try container.decodeIfPresent(String.self, forKey: .profile)
|
||||
self.refFrames = try container.decodeIfPresent(Int.self, forKey: .refFrames)
|
||||
self.samplingRate = try container.decodeIfPresent(Int.self, forKey: .samplingRate)
|
||||
self.scanType = try container.decodeIfPresent(String.self, forKey: .scanType)
|
||||
self.selected = try container.decodeIfPresent(Bool.self, forKey: .selected)
|
||||
self.streamIdentifier = try container.decodeIfPresent(String.self, forKey: .streamIdentifier)
|
||||
self.title = try container.decodeIfPresent(String.self, forKey: .title)
|
||||
self.width = try container.decodeIfPresent(Int.self, forKey: .width)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.codec, forKey: .codec)
|
||||
try container.encode(self.id, forKey: .id)
|
||||
try container.encode(self.index, forKey: .index)
|
||||
try container.encode(self.streamType, forKey: .streamType)
|
||||
try container.encodeIfPresent(self.audioChannelLayout, forKey: .audioChannelLayout)
|
||||
try container.encodeIfPresent(self.bitDepth, forKey: .bitDepth)
|
||||
try container.encodeIfPresent(self.bitrate, forKey: .bitrate)
|
||||
try container.encodeIfPresent(self.canAutoSync, forKey: .canAutoSync)
|
||||
try container.encodeIfPresent(self.channels, forKey: .channels)
|
||||
try container.encodeIfPresent(self.chromaLocation, forKey: .chromaLocation)
|
||||
try container.encodeIfPresent(self.chromaSubsampling, forKey: .chromaSubsampling)
|
||||
try container.encodeIfPresent(self.closedCaptions, forKey: .closedCaptions)
|
||||
try container.encodeIfPresent(self.codedHeight, forKey: .codedHeight)
|
||||
try container.encodeIfPresent(self.codedWidth, forKey: .codedWidth)
|
||||
try container.encodeIfPresent(self.colorPrimaries, forKey: .colorPrimaries)
|
||||
try container.encodeIfPresent(self.colorRange, forKey: .colorRange)
|
||||
try container.encodeIfPresent(self.colorSpace, forKey: .colorSpace)
|
||||
try container.encodeIfPresent(self.colorTrc, forKey: .colorTrc)
|
||||
try container.encodeIfPresent(self.`default`, forKey: .`default`)
|
||||
try container.encodeIfPresent(self.displayTitle, forKey: .displayTitle)
|
||||
try container.encodeIfPresent(self.embeddedInVideo, forKey: .embeddedInVideo)
|
||||
try container.encodeIfPresent(self.extendedDisplayTitle, forKey: .extendedDisplayTitle)
|
||||
if self.frameRate != nil {
|
||||
try container.encode(self._frameRate, forKey: .frameRate)
|
||||
}
|
||||
try container.encodeIfPresent(self.hasScalingMatrix, forKey: .hasScalingMatrix)
|
||||
try container.encodeIfPresent(self.hearingImpaired, forKey: .hearingImpaired)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.language, forKey: .language)
|
||||
try container.encodeIfPresent(self.languageCode, forKey: .languageCode)
|
||||
try container.encodeIfPresent(self.languageTag, forKey: .languageTag)
|
||||
try container.encodeIfPresent(self.level, forKey: .level)
|
||||
try container.encodeIfPresent(self.profile, forKey: .profile)
|
||||
try container.encodeIfPresent(self.refFrames, forKey: .refFrames)
|
||||
try container.encodeIfPresent(self.samplingRate, forKey: .samplingRate)
|
||||
try container.encodeIfPresent(self.scanType, forKey: .scanType)
|
||||
try container.encodeIfPresent(self.selected, forKey: .selected)
|
||||
try container.encodeIfPresent(self.streamIdentifier, forKey: .streamIdentifier)
|
||||
try container.encodeIfPresent(self.title, forKey: .title)
|
||||
try container.encodeIfPresent(self.width, forKey: .width)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesStream {
|
||||
var frameRateWrapper: DecimalSerialized<Double?> {
|
||||
return _frameRate
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// The type of media content
|
||||
///
|
||||
public enum GetSearchAllLibrariesType: String, Codable, APIValue {
|
||||
case movie = "movie"
|
||||
case tvShow = "show"
|
||||
case season = "season"
|
||||
case episode = "episode"
|
||||
}}
|
||||
@@ -0,0 +1,32 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesUltraBlurColors {
|
||||
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.GetSearchAllLibrariesUltraBlurColors: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case bottomLeft
|
||||
case bottomRight
|
||||
case topLeft
|
||||
case topRight
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
public struct GetSearchAllLibrariesUnauthorized {
|
||||
public let errors: [Operations.GetSearchAllLibrariesLibraryErrors]?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(errors: [Operations.GetSearchAllLibrariesLibraryErrors]? = nil) {
|
||||
self.errors = errors
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesUnauthorized: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case errors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetSearchAllLibrariesWriter {
|
||||
public let tag: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(tag: String? = nil) {
|
||||
self.tag = tag
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.GetSearchAllLibrariesWriter: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct GetServerResourcesRequest: APIValue {
|
||||
/// The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device)
|
||||
/// An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
public let clientID: String?
|
||||
/// Include Https entries in the results
|
||||
public let includeHttps: Operations.IncludeHttps?
|
||||
@@ -18,7 +18,7 @@ extension Operations {
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter clientID: The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device)
|
||||
/// - Parameter clientID: An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
/// - Parameter includeHttps: Include Https entries in the results
|
||||
/// - Parameter includeIPv6: Include IPv6 entries in the results
|
||||
/// - Parameter includeRelay: Include Relay addresses in the results
|
||||
|
||||
@@ -11,13 +11,13 @@ extension Operations {
|
||||
public let ratingKey: Int
|
||||
public let upscale: Int
|
||||
public let width: Int
|
||||
/// Plex Authentication Token
|
||||
/// An authentication token, obtained from plex.tv
|
||||
public let xPlexToken: String
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter ratingKey: the id of the library item to return the children of.
|
||||
/// - Parameter xPlexToken: Plex Authentication Token
|
||||
/// - Parameter xPlexToken: An authentication token, obtained from plex.tv
|
||||
///
|
||||
public init(height: Int, minSize: Int, ratingKey: Int, upscale: Int, width: Int, xPlexToken: String) {
|
||||
self.height = height
|
||||
|
||||
@@ -7,24 +7,32 @@ extension Operations {
|
||||
public struct GetTokenByPinIdRequest: APIValue {
|
||||
/// The PinID to retrieve an access token for
|
||||
public let pinID: Int
|
||||
/// The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device)
|
||||
/// An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
public let clientID: String?
|
||||
/// The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
public let clientName: String?
|
||||
public let clientPlatform: String?
|
||||
/// The version of the client application.
|
||||
public let clientVersion: String?
|
||||
public let deviceName: String?
|
||||
/// A relatively friendly name for the client device
|
||||
public let deviceNickname: String?
|
||||
/// The platform of the client application.
|
||||
public let platform: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter pinID: The PinID to retrieve an access token for
|
||||
/// - Parameter clientID: The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device)
|
||||
/// - Parameter clientID: An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
/// - Parameter clientName: The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
/// - Parameter clientVersion: The version of the client application.
|
||||
/// - Parameter deviceNickname: A relatively friendly name for the client device
|
||||
/// - Parameter platform: The platform of the client application.
|
||||
///
|
||||
public init(pinID: Int, clientID: String? = nil, clientName: String? = nil, clientPlatform: String? = nil, clientVersion: String? = nil, deviceName: String? = nil) {
|
||||
public init(pinID: Int, clientID: String? = nil, clientName: String? = nil, clientVersion: String? = nil, deviceNickname: String? = nil, platform: String? = nil) {
|
||||
self.pinID = pinID
|
||||
self.clientID = clientID
|
||||
self.clientName = clientName
|
||||
self.clientPlatform = clientPlatform
|
||||
self.clientVersion = clientVersion
|
||||
self.deviceName = deviceName
|
||||
self.deviceNickname = deviceNickname
|
||||
self.platform = platform
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum GetTokenDetailsFeatures: String, Codable, APIValue {
|
||||
case androidDolbyVision = "Android - Dolby Vision"
|
||||
case androidPiP = "Android - PiP"
|
||||
case cuSunset = "CU Sunset"
|
||||
case hrkEnableEur = "HRK_enable_EUR"
|
||||
case trebleShowFeatures = "TREBLE-show-features"
|
||||
case adCountdownTimer = "ad-countdown-timer"
|
||||
case adaptiveBitrate = "adaptive_bitrate"
|
||||
case albumTypes = "album-types"
|
||||
case allowDvr = "allow_dvr"
|
||||
case amazonLoopDebug = "amazon-loop-debug"
|
||||
case avodAdAnalysis = "avod-ad-analysis"
|
||||
case avodNewMedia = "avod-new-media"
|
||||
case blacklistGetSignin = "blacklist_get_signin"
|
||||
case boostVoices = "boost-voices"
|
||||
case cameraUpload = "camera_upload"
|
||||
case clientRadioStations = "client-radio-stations"
|
||||
case cloudflareTurnstileRequired = "cloudflare-turnstile-required"
|
||||
case cloudsync = "cloudsync"
|
||||
case collections = "collections"
|
||||
case commentsAndRepliesPushNotifications = "comments_and_replies_push_notifications"
|
||||
case communityAccessPlexTv = "community_access_plex_tv"
|
||||
case companionsSonos = "companions_sonos"
|
||||
case contentFilter = "content_filter"
|
||||
case customHomeRemoval = "custom-home-removal"
|
||||
case disableHomeUserFriendships = "disable_home_user_friendships"
|
||||
case disableSharingFriendships = "disable_sharing_friendships"
|
||||
case downloadsGating = "downloads-gating"
|
||||
case drmSupport = "drm_support"
|
||||
case dvr = "dvr"
|
||||
case dvrBlockUnsupportedCountries = "dvr-block-unsupported-countries"
|
||||
case epgRecentChannels = "epg-recent-channels"
|
||||
case excludeRestrictions = "exclude restrictions"
|
||||
case federatedAuth = "federated-auth"
|
||||
case friendRequestPushNotifications = "friend_request_push_notifications"
|
||||
case grandfatherSync = "grandfather-sync"
|
||||
case guidedUpgrade = "guided-upgrade"
|
||||
case hardwareTranscoding = "hardware_transcoding"
|
||||
case home = "home"
|
||||
case hwtranscode = "hwtranscode"
|
||||
case imaggaV2 = "imagga-v2"
|
||||
case increasePasswordComplexity = "increase-password-complexity"
|
||||
case ios14PrivacyBanner = "ios14-privacy-banner"
|
||||
case iterableNotificationTokens = "iterable-notification-tokens"
|
||||
case itemClusters = "item_clusters"
|
||||
case keepPaymentMethod = "keep-payment-method"
|
||||
case kevinBacon = "kevin-bacon"
|
||||
case koreaConsent = "korea-consent"
|
||||
case leIsrgRootX1 = "le_isrg_root_x1"
|
||||
case letsEncrypt = "lets_encrypt"
|
||||
case lightningDvrPivot = "lightning-dvr-pivot"
|
||||
case liveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments"
|
||||
case livetv = "livetv"
|
||||
case lyrics = "lyrics"
|
||||
case metadataSearch = "metadata_search"
|
||||
case musicAnalysis = "music-analysis"
|
||||
case musicVideos = "music_videos"
|
||||
case newPlexPassPrices = "new_plex_pass_prices"
|
||||
case newsProviderSunsetModal = "news-provider-sunset-modal"
|
||||
case nominatim = "nominatim"
|
||||
case pass = "pass"
|
||||
case photosFavorites = "photos-favorites"
|
||||
case photosMetadataEdition = "photos-metadata-edition"
|
||||
case photosV6Edit = "photosV6-edit"
|
||||
case photosV6TvAlbums = "photosV6-tv-albums"
|
||||
case pmsHealth = "pms_health"
|
||||
case premiumDashboard = "premium-dashboard"
|
||||
case premiumMusicMetadata = "premium_music_metadata"
|
||||
case radio = "radio"
|
||||
case rateLimitClientToken = "rate-limit-client-token"
|
||||
case scrobblingServicePlexTv = "scrobbling-service-plex-tv"
|
||||
case sessionBandwidthRestrictions = "session_bandwidth_restrictions"
|
||||
case sessionKick = "session_kick"
|
||||
case sharedServerNotification = "shared_server_notification"
|
||||
case sharedSourceNotification = "shared_source_notification"
|
||||
case signinNotification = "signin_notification"
|
||||
case signinWithApple = "signin_with_apple"
|
||||
case silenceRemoval = "silence-removal"
|
||||
case sleepTimer = "sleep-timer"
|
||||
case springServeAdProvider = "spring_serve_ad_provider"
|
||||
case sync = "sync"
|
||||
case sweetFades = "sweet-fades"
|
||||
case transcoderCache = "transcoder_cache"
|
||||
case trailers = "trailers"
|
||||
case tunerSharing = "tuner-sharing"
|
||||
case twoFactorAuthentication = "two-factor-authentication"
|
||||
case unsupportedtuners = "unsupportedtuners"
|
||||
case upgrade3Ds2 = "upgrade-3ds2"
|
||||
case visualizers = "visualizers"
|
||||
case vodSchema = "vod-schema"
|
||||
case vodCloudflare = "vod_cloudflare"
|
||||
case volumeLeveling = "volume-leveling"
|
||||
case watchTogetherInvite = "watch-together-invite"
|
||||
case watchlistRss = "watchlist-rss"
|
||||
case webServerDashboard = "web_server_dashboard"
|
||||
case webhooks = "webhooks"
|
||||
}}
|
||||
@@ -8,7 +8,7 @@ extension Operations {
|
||||
/// If the account's Plex Pass subscription is active
|
||||
public let active: Bool?
|
||||
/// List of features allowed on your Plex Pass subscription
|
||||
public let features: [Operations.GetTokenDetailsFeatures]?
|
||||
public let features: [String]?
|
||||
/// Payment service used for your Plex Pass subscription
|
||||
public let paymentService: String?
|
||||
/// Name of Plex Pass subscription plan
|
||||
@@ -27,7 +27,7 @@ extension Operations {
|
||||
/// - Parameter status: String representation of subscriptionActive
|
||||
/// - Parameter subscribedAt: Date the account subscribed to Plex Pass
|
||||
///
|
||||
public init(active: Bool? = nil, features: [Operations.GetTokenDetailsFeatures]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.GetTokenDetailsAuthenticationResponseStatus? = nil, subscribedAt: String? = nil) {
|
||||
public init(active: Bool? = nil, features: [String]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.GetTokenDetailsAuthenticationResponseStatus? = nil, subscribedAt: String? = nil) {
|
||||
self.active = active
|
||||
self.features = features
|
||||
self.paymentService = paymentService
|
||||
|
||||
@@ -7,7 +7,7 @@ extension Operations {
|
||||
public struct GetWatchListRequest: APIValue {
|
||||
/// Filter
|
||||
public let filter: Operations.Filter
|
||||
/// Plex Authentication Token
|
||||
/// An authentication token, obtained from plex.tv
|
||||
public let xPlexToken: String
|
||||
/// include collections in the results
|
||||
///
|
||||
@@ -41,7 +41,7 @@ extension Operations {
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter filter: Filter
|
||||
/// - Parameter xPlexToken: Plex Authentication Token
|
||||
/// - Parameter xPlexToken: An authentication token, obtained from plex.tv
|
||||
/// - Parameter includeCollections: include collections in the results
|
||||
///
|
||||
/// - Parameter includeExternalMedia: include external media in the results
|
||||
|
||||
@@ -5,21 +5,18 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Location {
|
||||
public let id: Int
|
||||
public let path: String
|
||||
public let path: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(id: Int, path: String) {
|
||||
self.id = id
|
||||
public init(path: String? = nil) {
|
||||
self.path = path
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.Location: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id
|
||||
case path
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,120 +5,122 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct Media {
|
||||
@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.Part]
|
||||
public let videoCodec: String
|
||||
public let videoFrameRate: String
|
||||
public let videoProfile: String
|
||||
public let videoResolution: String
|
||||
public let width: Int
|
||||
@DecimalSerialized
|
||||
public private(set) var aspectRatio: Double?
|
||||
public let audioChannels: Int?
|
||||
public let audioCodec: String?
|
||||
public let audioProfile: String?
|
||||
public let bitrate: Int?
|
||||
public let duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
public let hasVoiceActivity: Bool?
|
||||
public let height: Int?
|
||||
public let optimizedForStreaming: Operations.OptimizedForStreaming?
|
||||
public let videoCodec: String?
|
||||
public let videoFrameRate: String?
|
||||
public let videoProfile: String?
|
||||
public let videoResolution: String?
|
||||
public let width: Int?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(aspectRatio: Double, audioChannels: Int, audioCodec: String, bitrate: Int, container: String, duration: Int, height: Int, id: Int, part: [Operations.Part], videoCodec: String, videoFrameRate: String, videoProfile: String, videoResolution: String, width: Int, audioProfile: String? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, optimizedForStreaming: Operations.OptimizedForStreaming? = nil) {
|
||||
self._aspectRatio = DecimalSerialized<Double>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.bitrate = bitrate
|
||||
public init(container: String, id: Int, part: [Operations.Part], aspectRatio: Double? = nil, audioChannels: Int? = nil, audioCodec: String? = nil, audioProfile: String? = nil, bitrate: Int? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasVoiceActivity: Bool? = nil, height: Int? = nil, optimizedForStreaming: Operations.OptimizedForStreaming? = nil, videoCodec: String? = nil, videoFrameRate: String? = nil, videoProfile: String? = nil, videoResolution: String? = nil, width: Int? = nil) {
|
||||
self.container = container
|
||||
self.duration = duration
|
||||
self.height = height
|
||||
self.id = id
|
||||
self.part = part
|
||||
self._aspectRatio = DecimalSerialized<Double?>(wrappedValue: aspectRatio)
|
||||
self.audioChannels = audioChannels
|
||||
self.audioCodec = audioCodec
|
||||
self.audioProfile = audioProfile
|
||||
self.bitrate = bitrate
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.height = height
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.videoCodec = videoCodec
|
||||
self.videoFrameRate = videoFrameRate
|
||||
self.videoProfile = videoProfile
|
||||
self.videoResolution = videoResolution
|
||||
self.width = width
|
||||
self.audioProfile = audioProfile
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasVoiceActivity = hasVoiceActivity
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.Media: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case container
|
||||
case id
|
||||
case part = "Part"
|
||||
case aspectRatio
|
||||
case audioChannels
|
||||
case audioCodec
|
||||
case audioProfile
|
||||
case bitrate
|
||||
case container
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case height
|
||||
case id
|
||||
case part = "Part"
|
||||
case optimizedForStreaming
|
||||
case videoCodec
|
||||
case videoFrameRate
|
||||
case videoProfile
|
||||
case videoResolution
|
||||
case width
|
||||
case audioProfile
|
||||
case has64bitOffsets
|
||||
case hasVoiceActivity
|
||||
case optimizedForStreaming
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
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.Part].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._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.audioProfile = try container.decodeIfPresent(String.self, forKey: .audioProfile)
|
||||
self.bitrate = try container.decodeIfPresent(Int.self, forKey: .bitrate)
|
||||
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||
self.has64bitOffsets = try container.decodeIfPresent(Bool.self, forKey: .has64bitOffsets)
|
||||
self.hasVoiceActivity = try container.decodeIfPresent(Bool.self, forKey: .hasVoiceActivity)
|
||||
self.height = try container.decodeIfPresent(Int.self, forKey: .height)
|
||||
self.optimizedForStreaming = try container.decodeIfPresent(Operations.OptimizedForStreaming.self, forKey: .optimizedForStreaming)
|
||||
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)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
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)
|
||||
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.audioProfile, forKey: .audioProfile)
|
||||
try container.encodeIfPresent(self.bitrate, forKey: .bitrate)
|
||||
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||
try container.encodeIfPresent(self.has64bitOffsets, forKey: .has64bitOffsets)
|
||||
try container.encodeIfPresent(self.hasVoiceActivity, forKey: .hasVoiceActivity)
|
||||
try container.encodeIfPresent(self.height, forKey: .height)
|
||||
try container.encodeIfPresent(self.optimizedForStreaming, forKey: .optimizedForStreaming)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Media {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double> {
|
||||
var aspectRatioWrapper: DecimalSerialized<Double?> {
|
||||
return _aspectRatio
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,56 +8,56 @@ extension Operations {
|
||||
/// 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 duration: Int?
|
||||
public let has64bitOffsets: Bool?
|
||||
public let hasThumbnail: Operations.HasThumbnail?
|
||||
public let indexes: String?
|
||||
public let optimizedForStreaming: Bool?
|
||||
public let stream: [Operations.Stream]?
|
||||
public let videoProfile: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter container: The container format of the media file.
|
||||
///
|
||||
///
|
||||
public init(container: String, duration: Int, file: String, id: Int, key: String, size: Int, videoProfile: String, audioProfile: String? = nil, has64bitOffsets: Bool? = nil, hasThumbnail: Operations.HasThumbnail? = nil, indexes: String? = nil, optimizedForStreaming: Bool? = nil, stream: [Operations.Stream]? = nil) {
|
||||
public init(container: String, file: String, id: Int, key: String, size: Int, audioProfile: String? = nil, duration: Int? = nil, has64bitOffsets: Bool? = nil, hasThumbnail: Operations.HasThumbnail? = nil, indexes: String? = nil, optimizedForStreaming: Bool? = nil, stream: [Operations.Stream]? = nil, videoProfile: String? = nil) {
|
||||
self.container = container
|
||||
self.duration = duration
|
||||
self.file = file
|
||||
self.id = id
|
||||
self.key = key
|
||||
self.size = size
|
||||
self.videoProfile = videoProfile
|
||||
self.audioProfile = audioProfile
|
||||
self.duration = duration
|
||||
self.has64bitOffsets = has64bitOffsets
|
||||
self.hasThumbnail = hasThumbnail
|
||||
self.indexes = indexes
|
||||
self.optimizedForStreaming = optimizedForStreaming
|
||||
self.stream = stream
|
||||
self.videoProfile = videoProfile
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.Part: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case container
|
||||
case duration
|
||||
case file
|
||||
case id
|
||||
case key
|
||||
case size
|
||||
case videoProfile
|
||||
case audioProfile
|
||||
case duration
|
||||
case has64bitOffsets
|
||||
case hasThumbnail
|
||||
case indexes
|
||||
case optimizedForStreaming
|
||||
case stream = "Stream"
|
||||
case videoProfile
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum PostUsersSignInDataAuthenticationFeatures: String, Codable, APIValue {
|
||||
case androidDolbyVision = "Android - Dolby Vision"
|
||||
case androidPiP = "Android - PiP"
|
||||
case cuSunset = "CU Sunset"
|
||||
case hrkEnableEur = "HRK_enable_EUR"
|
||||
case trebleShowFeatures = "TREBLE-show-features"
|
||||
case adCountdownTimer = "ad-countdown-timer"
|
||||
case adaptiveBitrate = "adaptive_bitrate"
|
||||
case albumTypes = "album-types"
|
||||
case allowDvr = "allow_dvr"
|
||||
case amazonLoopDebug = "amazon-loop-debug"
|
||||
case avodAdAnalysis = "avod-ad-analysis"
|
||||
case avodNewMedia = "avod-new-media"
|
||||
case blacklistGetSignin = "blacklist_get_signin"
|
||||
case boostVoices = "boost-voices"
|
||||
case cameraUpload = "camera_upload"
|
||||
case clientRadioStations = "client-radio-stations"
|
||||
case cloudflareTurnstileRequired = "cloudflare-turnstile-required"
|
||||
case cloudsync = "cloudsync"
|
||||
case collections = "collections"
|
||||
case commentsAndRepliesPushNotifications = "comments_and_replies_push_notifications"
|
||||
case communityAccessPlexTv = "community_access_plex_tv"
|
||||
case companionsSonos = "companions_sonos"
|
||||
case contentFilter = "content_filter"
|
||||
case customHomeRemoval = "custom-home-removal"
|
||||
case disableHomeUserFriendships = "disable_home_user_friendships"
|
||||
case disableSharingFriendships = "disable_sharing_friendships"
|
||||
case downloadsGating = "downloads-gating"
|
||||
case drmSupport = "drm_support"
|
||||
case dvr = "dvr"
|
||||
case dvrBlockUnsupportedCountries = "dvr-block-unsupported-countries"
|
||||
case epgRecentChannels = "epg-recent-channels"
|
||||
case excludeRestrictions = "exclude restrictions"
|
||||
case federatedAuth = "federated-auth"
|
||||
case friendRequestPushNotifications = "friend_request_push_notifications"
|
||||
case grandfatherSync = "grandfather-sync"
|
||||
case guidedUpgrade = "guided-upgrade"
|
||||
case hardwareTranscoding = "hardware_transcoding"
|
||||
case home = "home"
|
||||
case hwtranscode = "hwtranscode"
|
||||
case imaggaV2 = "imagga-v2"
|
||||
case increasePasswordComplexity = "increase-password-complexity"
|
||||
case ios14PrivacyBanner = "ios14-privacy-banner"
|
||||
case iterableNotificationTokens = "iterable-notification-tokens"
|
||||
case itemClusters = "item_clusters"
|
||||
case keepPaymentMethod = "keep-payment-method"
|
||||
case kevinBacon = "kevin-bacon"
|
||||
case koreaConsent = "korea-consent"
|
||||
case leIsrgRootX1 = "le_isrg_root_x1"
|
||||
case letsEncrypt = "lets_encrypt"
|
||||
case lightningDvrPivot = "lightning-dvr-pivot"
|
||||
case liveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments"
|
||||
case livetv = "livetv"
|
||||
case lyrics = "lyrics"
|
||||
case metadataSearch = "metadata_search"
|
||||
case musicAnalysis = "music-analysis"
|
||||
case musicVideos = "music_videos"
|
||||
case newPlexPassPrices = "new_plex_pass_prices"
|
||||
case newsProviderSunsetModal = "news-provider-sunset-modal"
|
||||
case nominatim = "nominatim"
|
||||
case pass = "pass"
|
||||
case photosFavorites = "photos-favorites"
|
||||
case photosMetadataEdition = "photos-metadata-edition"
|
||||
case photosV6Edit = "photosV6-edit"
|
||||
case photosV6TvAlbums = "photosV6-tv-albums"
|
||||
case pmsHealth = "pms_health"
|
||||
case premiumDashboard = "premium-dashboard"
|
||||
case premiumMusicMetadata = "premium_music_metadata"
|
||||
case radio = "radio"
|
||||
case rateLimitClientToken = "rate-limit-client-token"
|
||||
case scrobblingServicePlexTv = "scrobbling-service-plex-tv"
|
||||
case sessionBandwidthRestrictions = "session_bandwidth_restrictions"
|
||||
case sessionKick = "session_kick"
|
||||
case sharedServerNotification = "shared_server_notification"
|
||||
case sharedSourceNotification = "shared_source_notification"
|
||||
case signinNotification = "signin_notification"
|
||||
case signinWithApple = "signin_with_apple"
|
||||
case silenceRemoval = "silence-removal"
|
||||
case sleepTimer = "sleep-timer"
|
||||
case springServeAdProvider = "spring_serve_ad_provider"
|
||||
case sync = "sync"
|
||||
case sweetFades = "sweet-fades"
|
||||
case transcoderCache = "transcoder_cache"
|
||||
case trailers = "trailers"
|
||||
case tunerSharing = "tuner-sharing"
|
||||
case twoFactorAuthentication = "two-factor-authentication"
|
||||
case unsupportedtuners = "unsupportedtuners"
|
||||
case upgrade3Ds2 = "upgrade-3ds2"
|
||||
case visualizers = "visualizers"
|
||||
case vodSchema = "vod-schema"
|
||||
case vodCloudflare = "vod_cloudflare"
|
||||
case volumeLeveling = "volume-leveling"
|
||||
case watchTogetherInvite = "watch-together-invite"
|
||||
case watchlistRss = "watchlist-rss"
|
||||
case webServerDashboard = "web_server_dashboard"
|
||||
case webhooks = "webhooks"
|
||||
}}
|
||||
@@ -8,7 +8,7 @@ extension Operations {
|
||||
/// If the account's Plex Pass subscription is active
|
||||
public let active: Bool?
|
||||
/// List of features allowed on your Plex Pass subscription
|
||||
public let features: [Operations.PostUsersSignInDataAuthenticationFeatures]?
|
||||
public let features: [String]?
|
||||
/// Payment service used for your Plex Pass subscription
|
||||
public let paymentService: String?
|
||||
/// Name of Plex Pass subscription plan
|
||||
@@ -27,7 +27,7 @@ extension Operations {
|
||||
/// - Parameter status: String representation of subscriptionActive
|
||||
/// - Parameter subscribedAt: Date the account subscribed to Plex Pass
|
||||
///
|
||||
public init(active: Bool? = nil, features: [Operations.PostUsersSignInDataAuthenticationFeatures]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.PostUsersSignInDataAuthenticationResponseStatus? = nil, subscribedAt: String? = nil) {
|
||||
public init(active: Bool? = nil, features: [String]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.PostUsersSignInDataAuthenticationResponseStatus? = nil, subscribedAt: String? = nil) {
|
||||
self.active = active
|
||||
self.features = features
|
||||
self.paymentService = paymentService
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum PostUsersSignInDataFeatures: String, Codable, APIValue {
|
||||
case androidDolbyVision = "Android - Dolby Vision"
|
||||
case androidPiP = "Android - PiP"
|
||||
case cuSunset = "CU Sunset"
|
||||
case hrkEnableEur = "HRK_enable_EUR"
|
||||
case trebleShowFeatures = "TREBLE-show-features"
|
||||
case adCountdownTimer = "ad-countdown-timer"
|
||||
case adaptiveBitrate = "adaptive_bitrate"
|
||||
case albumTypes = "album-types"
|
||||
case allowDvr = "allow_dvr"
|
||||
case amazonLoopDebug = "amazon-loop-debug"
|
||||
case avodAdAnalysis = "avod-ad-analysis"
|
||||
case avodNewMedia = "avod-new-media"
|
||||
case blacklistGetSignin = "blacklist_get_signin"
|
||||
case boostVoices = "boost-voices"
|
||||
case cameraUpload = "camera_upload"
|
||||
case clientRadioStations = "client-radio-stations"
|
||||
case cloudflareTurnstileRequired = "cloudflare-turnstile-required"
|
||||
case cloudsync = "cloudsync"
|
||||
case collections = "collections"
|
||||
case commentsAndRepliesPushNotifications = "comments_and_replies_push_notifications"
|
||||
case communityAccessPlexTv = "community_access_plex_tv"
|
||||
case companionsSonos = "companions_sonos"
|
||||
case contentFilter = "content_filter"
|
||||
case customHomeRemoval = "custom-home-removal"
|
||||
case disableHomeUserFriendships = "disable_home_user_friendships"
|
||||
case disableSharingFriendships = "disable_sharing_friendships"
|
||||
case downloadsGating = "downloads-gating"
|
||||
case drmSupport = "drm_support"
|
||||
case dvr = "dvr"
|
||||
case dvrBlockUnsupportedCountries = "dvr-block-unsupported-countries"
|
||||
case epgRecentChannels = "epg-recent-channels"
|
||||
case excludeRestrictions = "exclude restrictions"
|
||||
case federatedAuth = "federated-auth"
|
||||
case friendRequestPushNotifications = "friend_request_push_notifications"
|
||||
case grandfatherSync = "grandfather-sync"
|
||||
case guidedUpgrade = "guided-upgrade"
|
||||
case hardwareTranscoding = "hardware_transcoding"
|
||||
case home = "home"
|
||||
case hwtranscode = "hwtranscode"
|
||||
case imaggaV2 = "imagga-v2"
|
||||
case increasePasswordComplexity = "increase-password-complexity"
|
||||
case ios14PrivacyBanner = "ios14-privacy-banner"
|
||||
case iterableNotificationTokens = "iterable-notification-tokens"
|
||||
case itemClusters = "item_clusters"
|
||||
case keepPaymentMethod = "keep-payment-method"
|
||||
case kevinBacon = "kevin-bacon"
|
||||
case koreaConsent = "korea-consent"
|
||||
case leIsrgRootX1 = "le_isrg_root_x1"
|
||||
case letsEncrypt = "lets_encrypt"
|
||||
case lightningDvrPivot = "lightning-dvr-pivot"
|
||||
case liveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments"
|
||||
case livetv = "livetv"
|
||||
case lyrics = "lyrics"
|
||||
case metadataSearch = "metadata_search"
|
||||
case musicAnalysis = "music-analysis"
|
||||
case musicVideos = "music_videos"
|
||||
case newPlexPassPrices = "new_plex_pass_prices"
|
||||
case newsProviderSunsetModal = "news-provider-sunset-modal"
|
||||
case nominatim = "nominatim"
|
||||
case pass = "pass"
|
||||
case photosFavorites = "photos-favorites"
|
||||
case photosMetadataEdition = "photos-metadata-edition"
|
||||
case photosV6Edit = "photosV6-edit"
|
||||
case photosV6TvAlbums = "photosV6-tv-albums"
|
||||
case pmsHealth = "pms_health"
|
||||
case premiumDashboard = "premium-dashboard"
|
||||
case premiumMusicMetadata = "premium_music_metadata"
|
||||
case radio = "radio"
|
||||
case rateLimitClientToken = "rate-limit-client-token"
|
||||
case scrobblingServicePlexTv = "scrobbling-service-plex-tv"
|
||||
case sessionBandwidthRestrictions = "session_bandwidth_restrictions"
|
||||
case sessionKick = "session_kick"
|
||||
case sharedServerNotification = "shared_server_notification"
|
||||
case sharedSourceNotification = "shared_source_notification"
|
||||
case signinNotification = "signin_notification"
|
||||
case signinWithApple = "signin_with_apple"
|
||||
case silenceRemoval = "silence-removal"
|
||||
case sleepTimer = "sleep-timer"
|
||||
case springServeAdProvider = "spring_serve_ad_provider"
|
||||
case sync = "sync"
|
||||
case sweetFades = "sweet-fades"
|
||||
case transcoderCache = "transcoder_cache"
|
||||
case trailers = "trailers"
|
||||
case tunerSharing = "tuner-sharing"
|
||||
case twoFactorAuthentication = "two-factor-authentication"
|
||||
case unsupportedtuners = "unsupportedtuners"
|
||||
case upgrade3Ds2 = "upgrade-3ds2"
|
||||
case visualizers = "visualizers"
|
||||
case vodSchema = "vod-schema"
|
||||
case vodCloudflare = "vod_cloudflare"
|
||||
case volumeLeveling = "volume-leveling"
|
||||
case watchTogetherInvite = "watch-together-invite"
|
||||
case watchlistRss = "watchlist-rss"
|
||||
case webServerDashboard = "web_server_dashboard"
|
||||
case webhooks = "webhooks"
|
||||
}}
|
||||
@@ -5,26 +5,34 @@ import Foundation
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct PostUsersSignInDataRequest: APIValue {
|
||||
/// The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device)
|
||||
/// An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
public let clientID: String?
|
||||
/// The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
public let clientName: String?
|
||||
public let clientPlatform: String?
|
||||
/// The version of the client application.
|
||||
public let clientVersion: String?
|
||||
public let deviceName: String?
|
||||
/// A relatively friendly name for the client device
|
||||
public let deviceNickname: String?
|
||||
/// The platform of the client application.
|
||||
public let platform: String?
|
||||
/// Login credentials
|
||||
public let requestBody: Operations.PostUsersSignInDataRequestBody?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
/// - Parameter clientID: The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device)
|
||||
/// - Parameter clientID: An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
/// - Parameter clientName: The name of the client application. (Plex Web, Plex Media Server, etc.)
|
||||
/// - Parameter clientVersion: The version of the client application.
|
||||
/// - Parameter deviceNickname: A relatively friendly name for the client device
|
||||
/// - Parameter platform: The platform of the client application.
|
||||
/// - Parameter requestBody: Login credentials
|
||||
///
|
||||
public init(clientID: String? = nil, clientName: String? = nil, clientPlatform: String? = nil, clientVersion: String? = nil, deviceName: String? = nil, requestBody: Operations.PostUsersSignInDataRequestBody? = nil) {
|
||||
public init(clientID: String? = nil, clientName: String? = nil, clientVersion: String? = nil, deviceNickname: String? = nil, platform: String? = nil, requestBody: Operations.PostUsersSignInDataRequestBody? = nil) {
|
||||
self.clientID = clientID
|
||||
self.clientName = clientName
|
||||
self.clientPlatform = clientPlatform
|
||||
self.clientVersion = clientVersion
|
||||
self.deviceName = deviceName
|
||||
self.deviceNickname = deviceNickname
|
||||
self.platform = platform
|
||||
self.requestBody = requestBody
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -8,7 +8,7 @@ extension Operations {
|
||||
/// If the account's Plex Pass subscription is active
|
||||
public let active: Bool?
|
||||
/// List of features allowed on your Plex Pass subscription
|
||||
public let features: [Operations.PostUsersSignInDataFeatures]?
|
||||
public let features: [String]?
|
||||
/// Payment service used for your Plex Pass subscription
|
||||
public let paymentService: String?
|
||||
/// Name of Plex Pass subscription plan
|
||||
@@ -27,7 +27,7 @@ extension Operations {
|
||||
/// - Parameter status: String representation of subscriptionActive
|
||||
/// - Parameter subscribedAt: Date the account subscribed to Plex Pass
|
||||
///
|
||||
public init(active: Bool? = nil, features: [Operations.PostUsersSignInDataFeatures]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.PostUsersSignInDataAuthenticationStatus? = nil, subscribedAt: String? = nil) {
|
||||
public init(active: Bool? = nil, features: [String]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.PostUsersSignInDataAuthenticationStatus? = nil, subscribedAt: String? = nil) {
|
||||
self.active = active
|
||||
self.features = features
|
||||
self.paymentService = paymentService
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Whether to include collections in the search results.
|
||||
public enum QueryParamIncludeCollections: Int, Codable, APIValue {
|
||||
case disable = 0
|
||||
case enable = 1
|
||||
}}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// Whether to include external media in the search results.
|
||||
public enum QueryParamIncludeExternalMedia: Int, Codable, APIValue {
|
||||
case disable = 0
|
||||
case enable = 1
|
||||
}}
|
||||
44
Sources/Plexswift/models/operations/SearchResult.swift
Normal file
44
Sources/Plexswift/models/operations/SearchResult.swift
Normal file
@@ -0,0 +1,44 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
/// A model object
|
||||
public struct SearchResult {
|
||||
public let metadata: Operations.GetSearchAllLibrariesMetadata
|
||||
@DecimalSerialized
|
||||
public private(set) var score: Double
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(metadata: Operations.GetSearchAllLibrariesMetadata, score: Double) {
|
||||
self.metadata = metadata
|
||||
self._score = DecimalSerialized<Double>(wrappedValue: score)
|
||||
}
|
||||
}}
|
||||
|
||||
extension Operations.SearchResult: Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case metadata = "Metadata"
|
||||
case score
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.metadata = try container.decode(Operations.GetSearchAllLibrariesMetadata.self, forKey: .metadata)
|
||||
self._score = try container.decode(DecimalSerialized<Double>.self, forKey: .score)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(self.metadata, forKey: .metadata)
|
||||
try container.encode(self._score, forKey: .score)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.SearchResult {
|
||||
var scoreWrapper: DecimalSerialized<Double> {
|
||||
return _score
|
||||
}
|
||||
}
|
||||
12
Sources/Plexswift/models/operations/SearchTypes.swift
Normal file
12
Sources/Plexswift/models/operations/SearchTypes.swift
Normal file
@@ -0,0 +1,12 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations {
|
||||
public enum SearchTypes: String, Codable, APIValue {
|
||||
case movies = "movies"
|
||||
case music = "music"
|
||||
case otherVideos = "otherVideos"
|
||||
case people = "people"
|
||||
case tv = "tv"
|
||||
}}
|
||||
@@ -8,7 +8,7 @@ extension Operations {
|
||||
/// If the account's Plex Pass subscription is active
|
||||
public let active: Bool?
|
||||
/// List of features allowed on your Plex Pass subscription
|
||||
public let features: [Operations.Features]?
|
||||
public let features: [String]?
|
||||
/// Payment service used for your Plex Pass subscription
|
||||
public let paymentService: String?
|
||||
/// Name of Plex Pass subscription plan
|
||||
@@ -27,7 +27,7 @@ extension Operations {
|
||||
/// - Parameter status: String representation of subscriptionActive
|
||||
/// - Parameter subscribedAt: Date the account subscribed to Plex Pass
|
||||
///
|
||||
public init(active: Bool? = nil, features: [Operations.Features]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.GetTokenDetailsAuthenticationStatus? = nil, subscribedAt: String? = nil) {
|
||||
public init(active: Bool? = nil, features: [String]? = nil, paymentService: String? = nil, plan: String? = nil, status: Operations.GetTokenDetailsAuthenticationStatus? = nil, subscribedAt: String? = nil) {
|
||||
self.active = active
|
||||
self.features = features
|
||||
self.paymentService = paymentService
|
||||
|
||||
@@ -739,6 +739,7 @@ public protocol SearchAPI {
|
||||
/// - ``getLibraryItems(request:)``
|
||||
/// - ``getRefreshLibraryMetadata(request:)``
|
||||
/// - ``getSearchLibrary(request:)``
|
||||
/// - ``getSearchAllLibraries(request:)``
|
||||
/// - ``getMetaDataByRatingKey(request:)``
|
||||
/// - ``getMetadataChildren(request:)``
|
||||
/// - ``getTopWatchedContent(request:)``
|
||||
@@ -885,6 +886,14 @@ public protocol LibraryAPI {
|
||||
/// - Throws: An error of type ``PlexswiftError``
|
||||
func getSearchLibrary(request: Operations.GetSearchLibraryRequest) async throws -> Response<Operations.GetSearchLibraryResponse>
|
||||
|
||||
/// Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type.
|
||||
///
|
||||
///
|
||||
/// - Parameter request: A ``Operations/GetSearchAllLibrariesRequest`` object describing the input to the API operation
|
||||
/// - Returns: A ``Operations/GetSearchAllLibrariesResponse`` object describing the result of the API operation
|
||||
/// - Throws: An error of type ``PlexswiftError``
|
||||
func getSearchAllLibraries(request: Operations.GetSearchAllLibrariesRequest) async throws -> Response<Operations.GetSearchAllLibrariesResponse>
|
||||
|
||||
/// This endpoint will return the metadata of a library item specified with the ratingKey.
|
||||
///
|
||||
///
|
||||
|
||||
@@ -62,7 +62,7 @@ final class URLRequestBuilder: URLRequestConfiguration {
|
||||
urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type")
|
||||
}
|
||||
|
||||
urlRequest.setValue("speakeasy-sdk/swift 0.8.5 2.428.1 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
||||
urlRequest.setValue("speakeasy-sdk/swift 0.8.7 2.428.1 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
||||
|
||||
addSecurityParameters(to: &urlRequest)
|
||||
|
||||
|
||||
@@ -644,6 +644,12 @@ actions:
|
||||
- lang: swift
|
||||
label: library
|
||||
source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"<YOUR_API_KEY_HERE>\"))\n\nlet response = try await client.library.getRecentlyAddedLibrary(\n request: Operations.GetRecentlyAddedLibraryRequest(\n type: .tvShow, \n contentDirectoryID: 2, \n includeMeta: .enable, \n pinnedContentDirectoryID: [\n 3,\n 5,\n 7,\n 13,\n 12,\n 1,\n 6,\n 14,\n 2,\n 10,\n 16,\n 17,\n ], \n sectionID: 2, \n xPlexContainerSize: 50, \n xPlexContainerStart: 0\n )\n)\n\nswitch response.data {\ncase .object(let object):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}"
|
||||
- target: $["paths"]["/library/search"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: swift
|
||||
label: libraries
|
||||
source: "import Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"<YOUR_API_KEY_HERE>\"))\n\nlet response = try await client.library.getSearchAllLibraries(\n request: Operations.GetSearchAllLibrariesRequest(\n query: \"<value>\", \n includeCollections: .enable, \n includeExternalMedia: .enable, \n searchTypes: [\n .people,\n ]\n )\n)\n\nswitch response.data {\ncase .object(let object):\n // Handle response\n break\ncase .badRequest(let badRequest):\n // Handle response\n break\ncase .unauthorized(let unauthorized):\n // Handle response\n break\ncase .empty:\n // Handle empty response\n break\n}"
|
||||
- target: $["paths"]["/library/sections"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
|
||||
Reference in New Issue
Block a user