mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 12:47:44 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2
This commit is contained in:
@@ -1,22 +1,23 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: 5d77204e-e413-4fd0-a14a-bad3aee2247a
|
id: 5d77204e-e413-4fd0-a14a-bad3aee2247a
|
||||||
management:
|
management:
|
||||||
docChecksum: 37654ea0982ab5e87a9a9576014c9d19
|
docChecksum: e73920abd3a55e8d249592f2e3090574
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: 1.308.1
|
speakeasyVersion: 1.314.2
|
||||||
generationVersion: 2.342.6
|
generationVersion: 2.349.6
|
||||||
releaseVersion: 0.4.0
|
releaseVersion: 0.5.0
|
||||||
configChecksum: 13dc4c5ae6371accdb7e2797a7681034
|
configChecksum: 98f5e531db8f621f48c4c6e7ad476aa1
|
||||||
repoURL: https://github.com/LukeHagar/plexswift.git
|
repoURL: https://github.com/LukeHagar/plexswift.git
|
||||||
features:
|
features:
|
||||||
swift:
|
swift:
|
||||||
core: 3.2.4
|
core: 3.2.5
|
||||||
globalSecurity: 2.81.5
|
globalSecurity: 2.81.5
|
||||||
globalServerURLs: 2.82.1
|
globalServerURLs: 2.82.1
|
||||||
globals: 2.81.3
|
globals: 2.81.3
|
||||||
methodServerURLs: 3.0.1
|
methodServerURLs: 3.0.1
|
||||||
nameOverrides: 2.81.2
|
nameOverrides: 2.81.2
|
||||||
typeOverrides: 2.81.1
|
typeOverrides: 2.81.1
|
||||||
|
unions: 2.81.5
|
||||||
generatedFiles:
|
generatedFiles:
|
||||||
- Sources/Plexswift/internal/api/_ServerAPI.swift
|
- Sources/Plexswift/internal/api/_ServerAPI.swift
|
||||||
- Sources/Plexswift/internal/api/_MediaAPI.swift
|
- Sources/Plexswift/internal/api/_MediaAPI.swift
|
||||||
@@ -131,6 +132,15 @@ generatedFiles:
|
|||||||
- Sources/Plexswift/models/operations/GetAvailableClientsResponse.swift
|
- Sources/Plexswift/models/operations/GetAvailableClientsResponse.swift
|
||||||
- Sources/Plexswift/models/operations/GetAvailableClientsResponseBody.swift
|
- Sources/Plexswift/models/operations/GetAvailableClientsResponseBody.swift
|
||||||
- Sources/Plexswift/models/operations/GetAvailableClientsServerResponseBody.swift
|
- Sources/Plexswift/models/operations/GetAvailableClientsServerResponseBody.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetBandwidthStatisticsAccount.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetBandwidthStatisticsDevice.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetBandwidthStatisticsErrors.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetBandwidthStatisticsMediaContainer.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetBandwidthStatisticsRequest.swift
|
||||||
|
- Sources/Plexswift/internal/models/GetBandwidthStatisticsRequest+Serialization.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetBandwidthStatisticsResponse.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetBandwidthStatisticsResponseBody.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetBandwidthStatisticsStatisticsResponseBody.swift
|
||||||
- Sources/Plexswift/models/operations/GetButlerTasksButlerResponseBody.swift
|
- Sources/Plexswift/models/operations/GetButlerTasksButlerResponseBody.swift
|
||||||
- Sources/Plexswift/models/operations/GetButlerTasksErrors.swift
|
- Sources/Plexswift/models/operations/GetButlerTasksErrors.swift
|
||||||
- Sources/Plexswift/models/operations/GetButlerTasksResponse.swift
|
- Sources/Plexswift/models/operations/GetButlerTasksResponse.swift
|
||||||
@@ -291,6 +301,13 @@ generatedFiles:
|
|||||||
- Sources/Plexswift/internal/models/GetResizedPhotoRequest+Serialization.swift
|
- Sources/Plexswift/internal/models/GetResizedPhotoRequest+Serialization.swift
|
||||||
- Sources/Plexswift/models/operations/GetResizedPhotoResponse.swift
|
- Sources/Plexswift/models/operations/GetResizedPhotoResponse.swift
|
||||||
- Sources/Plexswift/models/operations/GetResizedPhotoResponseBody.swift
|
- Sources/Plexswift/models/operations/GetResizedPhotoResponseBody.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetResourcesStatisticsErrors.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetResourcesStatisticsMediaContainer.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetResourcesStatisticsRequest.swift
|
||||||
|
- Sources/Plexswift/internal/models/GetResourcesStatisticsRequest+Serialization.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetResourcesStatisticsResponse.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetResourcesStatisticsResponseBody.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetResourcesStatisticsStatisticsResponseBody.swift
|
||||||
- Sources/Plexswift/models/operations/GetSearchResultsCountry.swift
|
- Sources/Plexswift/models/operations/GetSearchResultsCountry.swift
|
||||||
- Sources/Plexswift/models/operations/GetSearchResultsDirector.swift
|
- Sources/Plexswift/models/operations/GetSearchResultsDirector.swift
|
||||||
- Sources/Plexswift/models/operations/GetSearchResultsErrors.swift
|
- Sources/Plexswift/models/operations/GetSearchResultsErrors.swift
|
||||||
@@ -333,6 +350,8 @@ generatedFiles:
|
|||||||
- Sources/Plexswift/models/operations/GetSessionHistoryErrors.swift
|
- Sources/Plexswift/models/operations/GetSessionHistoryErrors.swift
|
||||||
- Sources/Plexswift/models/operations/GetSessionHistoryMediaContainer.swift
|
- Sources/Plexswift/models/operations/GetSessionHistoryMediaContainer.swift
|
||||||
- Sources/Plexswift/models/operations/GetSessionHistoryMetadata.swift
|
- Sources/Plexswift/models/operations/GetSessionHistoryMetadata.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetSessionHistoryRequest.swift
|
||||||
|
- Sources/Plexswift/internal/models/GetSessionHistoryRequest+Serialization.swift
|
||||||
- Sources/Plexswift/models/operations/GetSessionHistoryResponse.swift
|
- Sources/Plexswift/models/operations/GetSessionHistoryResponse.swift
|
||||||
- Sources/Plexswift/models/operations/GetSessionHistoryResponseBody.swift
|
- Sources/Plexswift/models/operations/GetSessionHistoryResponseBody.swift
|
||||||
- Sources/Plexswift/models/operations/GetSessionHistorySessionsResponseBody.swift
|
- Sources/Plexswift/models/operations/GetSessionHistorySessionsResponseBody.swift
|
||||||
@@ -345,6 +364,7 @@ generatedFiles:
|
|||||||
- Sources/Plexswift/models/operations/GetSessionsResponseBody.swift
|
- Sources/Plexswift/models/operations/GetSessionsResponseBody.swift
|
||||||
- Sources/Plexswift/models/operations/GetSessionsSessionsResponseBody.swift
|
- Sources/Plexswift/models/operations/GetSessionsSessionsResponseBody.swift
|
||||||
- Sources/Plexswift/models/operations/GetSessionsStream.swift
|
- Sources/Plexswift/models/operations/GetSessionsStream.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetSessionsUser.swift
|
||||||
- Sources/Plexswift/models/operations/GetSourceConnectionInformationErrors.swift
|
- Sources/Plexswift/models/operations/GetSourceConnectionInformationErrors.swift
|
||||||
- Sources/Plexswift/models/operations/GetSourceConnectionInformationRequest.swift
|
- Sources/Plexswift/models/operations/GetSourceConnectionInformationRequest.swift
|
||||||
- Sources/Plexswift/internal/models/GetSourceConnectionInformationRequest+Serialization.swift
|
- Sources/Plexswift/internal/models/GetSourceConnectionInformationRequest+Serialization.swift
|
||||||
@@ -370,6 +390,16 @@ generatedFiles:
|
|||||||
- Sources/Plexswift/internal/models/GetTokenRequest+Serialization.swift
|
- Sources/Plexswift/internal/models/GetTokenRequest+Serialization.swift
|
||||||
- Sources/Plexswift/models/operations/GetTokenResponse.swift
|
- Sources/Plexswift/models/operations/GetTokenResponse.swift
|
||||||
- Sources/Plexswift/models/operations/GetTokenResponseBody.swift
|
- Sources/Plexswift/models/operations/GetTokenResponseBody.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetTopWatchedContentCountry.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetTopWatchedContentGenre.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetTopWatchedContentGuids.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetTopWatchedContentMediaContainer.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetTopWatchedContentMetadata.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetTopWatchedContentRequest.swift
|
||||||
|
- Sources/Plexswift/internal/models/GetTopWatchedContentRequest+Serialization.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetTopWatchedContentResponse.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetTopWatchedContentResponseBody.swift
|
||||||
|
- Sources/Plexswift/models/operations/GetTopWatchedContentRole.swift
|
||||||
- Sources/Plexswift/models/operations/GetTranscodeSessionsErrors.swift
|
- Sources/Plexswift/models/operations/GetTranscodeSessionsErrors.swift
|
||||||
- Sources/Plexswift/models/operations/GetTranscodeSessionsMediaContainer.swift
|
- Sources/Plexswift/models/operations/GetTranscodeSessionsMediaContainer.swift
|
||||||
- Sources/Plexswift/models/operations/GetTranscodeSessionsResponse.swift
|
- Sources/Plexswift/models/operations/GetTranscodeSessionsResponse.swift
|
||||||
@@ -404,6 +434,8 @@ generatedFiles:
|
|||||||
- Sources/Plexswift/internal/models/IncludeExternalMedia+Serialization.swift
|
- Sources/Plexswift/internal/models/IncludeExternalMedia+Serialization.swift
|
||||||
- Sources/Plexswift/models/operations/Level.swift
|
- Sources/Plexswift/models/operations/Level.swift
|
||||||
- Sources/Plexswift/internal/models/Level+Serialization.swift
|
- Sources/Plexswift/internal/models/Level+Serialization.swift
|
||||||
|
- Sources/Plexswift/models/operations/LibrarySectionID.swift
|
||||||
|
- Sources/Plexswift/internal/models/LibrarySectionID+Serialization.swift
|
||||||
- Sources/Plexswift/models/operations/Libtype.swift
|
- Sources/Plexswift/models/operations/Libtype.swift
|
||||||
- Sources/Plexswift/internal/models/Libtype+Serialization.swift
|
- Sources/Plexswift/internal/models/Libtype+Serialization.swift
|
||||||
- Sources/Plexswift/models/operations/Location.swift
|
- Sources/Plexswift/models/operations/Location.swift
|
||||||
@@ -435,6 +467,8 @@ generatedFiles:
|
|||||||
- Sources/Plexswift/internal/models/OnlyTransient+Serialization.swift
|
- Sources/Plexswift/internal/models/OnlyTransient+Serialization.swift
|
||||||
- Sources/Plexswift/models/operations/Operator.swift
|
- Sources/Plexswift/models/operations/Operator.swift
|
||||||
- Sources/Plexswift/models/operations/Part.swift
|
- Sources/Plexswift/models/operations/Part.swift
|
||||||
|
- Sources/Plexswift/models/operations/PathParamFilter.swift
|
||||||
|
- Sources/Plexswift/internal/models/PathParamFilter+Serialization.swift
|
||||||
- Sources/Plexswift/models/operations/PathParamTaskName.swift
|
- Sources/Plexswift/models/operations/PathParamTaskName.swift
|
||||||
- Sources/Plexswift/internal/models/PathParamTaskName+Serialization.swift
|
- Sources/Plexswift/internal/models/PathParamTaskName+Serialization.swift
|
||||||
- Sources/Plexswift/models/operations/PerformSearchErrors.swift
|
- Sources/Plexswift/models/operations/PerformSearchErrors.swift
|
||||||
@@ -499,7 +533,9 @@ generatedFiles:
|
|||||||
- Sources/Plexswift/models/operations/StartUniversalTranscodeResponseBody.swift
|
- Sources/Plexswift/models/operations/StartUniversalTranscodeResponseBody.swift
|
||||||
- Sources/Plexswift/models/operations/State.swift
|
- Sources/Plexswift/models/operations/State.swift
|
||||||
- Sources/Plexswift/internal/models/State+Serialization.swift
|
- Sources/Plexswift/internal/models/State+Serialization.swift
|
||||||
|
- Sources/Plexswift/models/operations/StatisticsBandwidth.swift
|
||||||
- Sources/Plexswift/models/operations/StatisticsMedia.swift
|
- Sources/Plexswift/models/operations/StatisticsMedia.swift
|
||||||
|
- Sources/Plexswift/models/operations/StatisticsResources.swift
|
||||||
- Sources/Plexswift/models/operations/StopAllTasksErrors.swift
|
- Sources/Plexswift/models/operations/StopAllTasksErrors.swift
|
||||||
- Sources/Plexswift/models/operations/StopAllTasksResponse.swift
|
- Sources/Plexswift/models/operations/StopAllTasksResponse.swift
|
||||||
- Sources/Plexswift/models/operations/StopAllTasksResponseBody.swift
|
- Sources/Plexswift/models/operations/StopAllTasksResponseBody.swift
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ generation:
|
|||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
swift:
|
swift:
|
||||||
version: 0.4.0
|
version: 0.5.0
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
description: Swift Client SDK Generated by Speakeasy
|
description: Swift Client SDK Generated by Speakeasy
|
||||||
imports:
|
imports:
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ speakeasyVersion: 1.308.0
|
|||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
sourceRevisionDigest: sha256:5624db047dbcbdea446c5bfd39647c4eeff845353f814d00a01f5591a4667a38
|
sourceRevisionDigest: sha256:8a15726911f1bd51a3bb7fa71c0b97ef1ab7713e46e7e4520f7a6d0b69f0359d
|
||||||
sourceBlobDigest: sha256:853e4c9838e000baff90393829ccf8e6bafd9a6e6017368e04fa33f174ba0904
|
sourceBlobDigest: sha256:5abcd27b0ae2eadfcc678713caeb400262c27eafaf78e30df9a05894214d8df9
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- main
|
- main
|
||||||
@@ -11,8 +11,8 @@ targets:
|
|||||||
plexswift:
|
plexswift:
|
||||||
source: my-source
|
source: my-source
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
sourceRevisionDigest: sha256:5624db047dbcbdea446c5bfd39647c4eeff845353f814d00a01f5591a4667a38
|
sourceRevisionDigest: sha256:8a15726911f1bd51a3bb7fa71c0b97ef1ab7713e46e7e4520f7a6d0b69f0359d
|
||||||
sourceBlobDigest: sha256:853e4c9838e000baff90393829ccf8e6bafd9a6e6017368e04fa33f174ba0904
|
sourceBlobDigest: sha256:5abcd27b0ae2eadfcc678713caeb400262c27eafaf78e30df9a05894214d8df9
|
||||||
outLocation: /github/workspace/repo
|
outLocation: /github/workspace/repo
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ You can add `plexswift` to your project directly in Xcode `(File > Add Packages.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.4.0"))
|
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.5.0"))
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
<!-- End SDK Installation [installation] -->
|
<!-- End SDK Installation [installation] -->
|
||||||
@@ -100,18 +100,18 @@ case .empty:
|
|||||||
<!-- Start Global Parameters [global-parameters] -->
|
<!-- Start Global Parameters [global-parameters] -->
|
||||||
## Global Parameters
|
## Global Parameters
|
||||||
|
|
||||||
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
||||||
|
|
||||||
For example, you can set `X-Plex-Client-Identifier` to `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
For example, you can set `X-Plex-Client-Identifier` to `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getPin`. 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
|
### Available Globals
|
||||||
|
|
||||||
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
|
The following global parameter is available.
|
||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
| ---- | ---- |:--------:| ----------- |
|
| ---- | ---- |:--------:| ----------- |
|
||||||
| xPlexClientIdentifier | String | ✔️ | The unique identifier for the client application
|
| xPlexClientIdentifier | String | | The unique identifier for the client application
|
||||||
This is used to track the client application and its usage
|
This is used to track the client application and its usage
|
||||||
(UUID, serial number, or other number unique per device)
|
(UUID, serial number, or other number unique per device)
|
||||||
|
|
|
|
||||||
|
|||||||
12
RELEASES.md
12
RELEASES.md
@@ -472,4 +472,14 @@ Based on:
|
|||||||
### Generated
|
### Generated
|
||||||
- [swift v0.4.0] .
|
- [swift v0.4.0] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Swift Package Manager v0.4.0] https://github.com/LukeHagar/plexswift/releases/tag/v0.4.0 - .
|
- [Swift Package Manager v0.4.0] https://github.com/LukeHagar/plexswift/releases/tag/v0.4.0 - .
|
||||||
|
|
||||||
|
## 2024-06-22 00:13:29
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [swift v0.5.0] .
|
||||||
|
### Releases
|
||||||
|
- [Swift Package Manager v0.5.0] https://github.com/LukeHagar/plexswift/releases/tag/v0.5.0 - .
|
||||||
@@ -88,6 +88,7 @@ case .empty:
|
|||||||
- ``Operations/DeletePlaylistResponse``
|
- ``Operations/DeletePlaylistResponse``
|
||||||
- ``Operations/EnablePaperTrailResponse``
|
- ``Operations/EnablePaperTrailResponse``
|
||||||
- ``Operations/GetAvailableClientsResponse``
|
- ``Operations/GetAvailableClientsResponse``
|
||||||
|
- ``Operations/GetBandwidthStatisticsResponse``
|
||||||
- ``Operations/GetButlerTasksResponse``
|
- ``Operations/GetButlerTasksResponse``
|
||||||
- ``Operations/GetDevicesResponse``
|
- ``Operations/GetDevicesResponse``
|
||||||
- ``Operations/GetFileHashResponse``
|
- ``Operations/GetFileHashResponse``
|
||||||
@@ -107,6 +108,7 @@ case .empty:
|
|||||||
- ``Operations/GetPlaylistsResponse``
|
- ``Operations/GetPlaylistsResponse``
|
||||||
- ``Operations/GetRecentlyAddedResponse``
|
- ``Operations/GetRecentlyAddedResponse``
|
||||||
- ``Operations/GetResizedPhotoResponse``
|
- ``Operations/GetResizedPhotoResponse``
|
||||||
|
- ``Operations/GetResourcesStatisticsResponse``
|
||||||
- ``Operations/GetSearchResultsResponse``
|
- ``Operations/GetSearchResultsResponse``
|
||||||
- ``Operations/GetServerActivitiesResponse``
|
- ``Operations/GetServerActivitiesResponse``
|
||||||
- ``Operations/GetServerCapabilitiesResponse``
|
- ``Operations/GetServerCapabilitiesResponse``
|
||||||
@@ -119,6 +121,7 @@ case .empty:
|
|||||||
- ``Operations/GetStatisticsResponse``
|
- ``Operations/GetStatisticsResponse``
|
||||||
- ``Operations/GetTimelineResponse``
|
- ``Operations/GetTimelineResponse``
|
||||||
- ``Operations/GetTokenResponse``
|
- ``Operations/GetTokenResponse``
|
||||||
|
- ``Operations/GetTopWatchedContentResponse``
|
||||||
- ``Operations/GetTranscodeSessionsResponse``
|
- ``Operations/GetTranscodeSessionsResponse``
|
||||||
- ``Operations/GetTransientTokenResponse``
|
- ``Operations/GetTransientTokenResponse``
|
||||||
- ``Operations/GetUpdateStatusResponse``
|
- ``Operations/GetUpdateStatusResponse``
|
||||||
@@ -194,6 +197,13 @@ case .empty:
|
|||||||
- ``Operations/GetAvailableClientsMediaContainer``
|
- ``Operations/GetAvailableClientsMediaContainer``
|
||||||
- ``Operations/GetAvailableClientsResponseBody``
|
- ``Operations/GetAvailableClientsResponseBody``
|
||||||
- ``Operations/GetAvailableClientsServerResponseBody``
|
- ``Operations/GetAvailableClientsServerResponseBody``
|
||||||
|
- ``Operations/GetBandwidthStatisticsAccount``
|
||||||
|
- ``Operations/GetBandwidthStatisticsDevice``
|
||||||
|
- ``Operations/GetBandwidthStatisticsErrors``
|
||||||
|
- ``Operations/GetBandwidthStatisticsMediaContainer``
|
||||||
|
- ``Operations/GetBandwidthStatisticsRequest``
|
||||||
|
- ``Operations/GetBandwidthStatisticsResponseBody``
|
||||||
|
- ``Operations/GetBandwidthStatisticsStatisticsResponseBody``
|
||||||
- ``Operations/GetButlerTasksButlerResponseBody``
|
- ``Operations/GetButlerTasksButlerResponseBody``
|
||||||
- ``Operations/GetButlerTasksErrors``
|
- ``Operations/GetButlerTasksErrors``
|
||||||
- ``Operations/GetButlerTasksResponseBody``
|
- ``Operations/GetButlerTasksResponseBody``
|
||||||
@@ -323,6 +333,11 @@ case .empty:
|
|||||||
- ``Operations/GetResizedPhotoErrors``
|
- ``Operations/GetResizedPhotoErrors``
|
||||||
- ``Operations/GetResizedPhotoRequest``
|
- ``Operations/GetResizedPhotoRequest``
|
||||||
- ``Operations/GetResizedPhotoResponseBody``
|
- ``Operations/GetResizedPhotoResponseBody``
|
||||||
|
- ``Operations/GetResourcesStatisticsErrors``
|
||||||
|
- ``Operations/GetResourcesStatisticsMediaContainer``
|
||||||
|
- ``Operations/GetResourcesStatisticsRequest``
|
||||||
|
- ``Operations/GetResourcesStatisticsResponseBody``
|
||||||
|
- ``Operations/GetResourcesStatisticsStatisticsResponseBody``
|
||||||
- ``Operations/GetSearchResultsCountry``
|
- ``Operations/GetSearchResultsCountry``
|
||||||
- ``Operations/GetSearchResultsDirector``
|
- ``Operations/GetSearchResultsDirector``
|
||||||
- ``Operations/GetSearchResultsErrors``
|
- ``Operations/GetSearchResultsErrors``
|
||||||
@@ -358,6 +373,7 @@ case .empty:
|
|||||||
- ``Operations/GetSessionHistoryErrors``
|
- ``Operations/GetSessionHistoryErrors``
|
||||||
- ``Operations/GetSessionHistoryMediaContainer``
|
- ``Operations/GetSessionHistoryMediaContainer``
|
||||||
- ``Operations/GetSessionHistoryMetadata``
|
- ``Operations/GetSessionHistoryMetadata``
|
||||||
|
- ``Operations/GetSessionHistoryRequest``
|
||||||
- ``Operations/GetSessionHistoryResponseBody``
|
- ``Operations/GetSessionHistoryResponseBody``
|
||||||
- ``Operations/GetSessionHistorySessionsResponseBody``
|
- ``Operations/GetSessionHistorySessionsResponseBody``
|
||||||
- ``Operations/GetSessionsErrors``
|
- ``Operations/GetSessionsErrors``
|
||||||
@@ -368,6 +384,7 @@ case .empty:
|
|||||||
- ``Operations/GetSessionsResponseBody``
|
- ``Operations/GetSessionsResponseBody``
|
||||||
- ``Operations/GetSessionsSessionsResponseBody``
|
- ``Operations/GetSessionsSessionsResponseBody``
|
||||||
- ``Operations/GetSessionsStream``
|
- ``Operations/GetSessionsStream``
|
||||||
|
- ``Operations/GetSessionsUser``
|
||||||
- ``Operations/GetSourceConnectionInformationErrors``
|
- ``Operations/GetSourceConnectionInformationErrors``
|
||||||
- ``Operations/GetSourceConnectionInformationRequest``
|
- ``Operations/GetSourceConnectionInformationRequest``
|
||||||
- ``Operations/GetSourceConnectionInformationResponseBody``
|
- ``Operations/GetSourceConnectionInformationResponseBody``
|
||||||
@@ -385,6 +402,14 @@ case .empty:
|
|||||||
- ``Operations/GetTokenPlexResponseBody``
|
- ``Operations/GetTokenPlexResponseBody``
|
||||||
- ``Operations/GetTokenRequest``
|
- ``Operations/GetTokenRequest``
|
||||||
- ``Operations/GetTokenResponseBody``
|
- ``Operations/GetTokenResponseBody``
|
||||||
|
- ``Operations/GetTopWatchedContentCountry``
|
||||||
|
- ``Operations/GetTopWatchedContentGenre``
|
||||||
|
- ``Operations/GetTopWatchedContentGuids``
|
||||||
|
- ``Operations/GetTopWatchedContentMediaContainer``
|
||||||
|
- ``Operations/GetTopWatchedContentMetadata``
|
||||||
|
- ``Operations/GetTopWatchedContentRequest``
|
||||||
|
- ``Operations/GetTopWatchedContentResponseBody``
|
||||||
|
- ``Operations/GetTopWatchedContentRole``
|
||||||
- ``Operations/GetTranscodeSessionsErrors``
|
- ``Operations/GetTranscodeSessionsErrors``
|
||||||
- ``Operations/GetTranscodeSessionsMediaContainer``
|
- ``Operations/GetTranscodeSessionsMediaContainer``
|
||||||
- ``Operations/GetTranscodeSessionsResponseBody``
|
- ``Operations/GetTranscodeSessionsResponseBody``
|
||||||
@@ -408,6 +433,7 @@ case .empty:
|
|||||||
- ``Operations/IncludeDetails``
|
- ``Operations/IncludeDetails``
|
||||||
- ``Operations/IncludeExternalMedia``
|
- ``Operations/IncludeExternalMedia``
|
||||||
- ``Operations/Level``
|
- ``Operations/Level``
|
||||||
|
- ``Operations/LibrarySectionID``
|
||||||
- ``Operations/Libtype``
|
- ``Operations/Libtype``
|
||||||
- ``Operations/Location``
|
- ``Operations/Location``
|
||||||
- ``Operations/LogLineErrors``
|
- ``Operations/LogLineErrors``
|
||||||
@@ -429,6 +455,7 @@ case .empty:
|
|||||||
- ``Operations/OnlyTransient``
|
- ``Operations/OnlyTransient``
|
||||||
- ``Operations/Operator``
|
- ``Operations/Operator``
|
||||||
- ``Operations/Part``
|
- ``Operations/Part``
|
||||||
|
- ``Operations/PathParamFilter``
|
||||||
- ``Operations/PathParamTaskName``
|
- ``Operations/PathParamTaskName``
|
||||||
- ``Operations/PerformSearchErrors``
|
- ``Operations/PerformSearchErrors``
|
||||||
- ``Operations/PerformSearchRequest``
|
- ``Operations/PerformSearchRequest``
|
||||||
@@ -471,7 +498,9 @@ case .empty:
|
|||||||
- ``Operations/StartUniversalTranscodeRequest``
|
- ``Operations/StartUniversalTranscodeRequest``
|
||||||
- ``Operations/StartUniversalTranscodeResponseBody``
|
- ``Operations/StartUniversalTranscodeResponseBody``
|
||||||
- ``Operations/State``
|
- ``Operations/State``
|
||||||
|
- ``Operations/StatisticsBandwidth``
|
||||||
- ``Operations/StatisticsMedia``
|
- ``Operations/StatisticsMedia``
|
||||||
|
- ``Operations/StatisticsResources``
|
||||||
- ``Operations/StopAllTasksErrors``
|
- ``Operations/StopAllTasksErrors``
|
||||||
- ``Operations/StopAllTasksResponseBody``
|
- ``Operations/StopAllTasksResponseBody``
|
||||||
- ``Operations/StopTaskErrors``
|
- ``Operations/StopTaskErrors``
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/// The protocol to use when connecting to your plex server.
|
|
||||||
public enum ServerProtocol: String, Codable, APIValue {
|
public enum ServerProtocol: String, Codable, APIValue {
|
||||||
case http = "http"
|
case http = "http"
|
||||||
case https = "https"
|
case https = "https"
|
||||||
|
|||||||
@@ -100,6 +100,15 @@ class _LibraryAPI: LibraryAPI {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func getTopWatchedContent(request: Operations.GetTopWatchedContentRequest) async throws -> Response<Operations.GetTopWatchedContentResponse> {
|
||||||
|
return try await client.makeRequest(
|
||||||
|
configureRequest: { configuration in
|
||||||
|
try configureGetTopWatchedContentRequest(with: configuration, request: request)
|
||||||
|
},
|
||||||
|
handleResponse: handleGetTopWatchedContentResponse
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
public func getOnDeck() async throws -> Response<Operations.GetOnDeckResponse> {
|
public func getOnDeck() async throws -> Response<Operations.GetOnDeckResponse> {
|
||||||
return try await client.makeRequest(
|
return try await client.makeRequest(
|
||||||
configureRequest: { configuration in
|
configureRequest: { configuration in
|
||||||
@@ -151,6 +160,7 @@ private func configureGetLibraryItemsRequest(with configuration: URLRequestConfi
|
|||||||
configuration.path = "/library/sections/{sectionId}/{tag}"
|
configuration.path = "/library/sections/{sectionId}/{tag}"
|
||||||
configuration.method = .get
|
configuration.method = .get
|
||||||
configuration.pathParameterSerializable = request
|
configuration.pathParameterSerializable = request
|
||||||
|
configuration.queryParameterSerializable = request
|
||||||
configuration.telemetryHeader = .userAgent
|
configuration.telemetryHeader = .userAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,6 +190,14 @@ private func configureGetMetadataChildrenRequest(with configuration: URLRequestC
|
|||||||
configuration.path = "/library/metadata/{ratingKey}/children"
|
configuration.path = "/library/metadata/{ratingKey}/children"
|
||||||
configuration.method = .get
|
configuration.method = .get
|
||||||
configuration.pathParameterSerializable = request
|
configuration.pathParameterSerializable = request
|
||||||
|
configuration.queryParameterSerializable = request
|
||||||
|
configuration.telemetryHeader = .userAgent
|
||||||
|
}
|
||||||
|
|
||||||
|
private func configureGetTopWatchedContentRequest(with configuration: URLRequestConfiguration, request: Operations.GetTopWatchedContentRequest) throws {
|
||||||
|
configuration.path = "/library/all/top"
|
||||||
|
configuration.method = .get
|
||||||
|
configuration.queryParameterSerializable = request
|
||||||
configuration.telemetryHeader = .userAgent
|
configuration.telemetryHeader = .userAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,6 +445,22 @@ private func handleGetMetadataChildrenResponse(response: Client.APIResponse) thr
|
|||||||
return .empty
|
return .empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func handleGetTopWatchedContentResponse(response: Client.APIResponse) throws -> Operations.GetTopWatchedContentResponse {
|
||||||
|
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.GetTopWatchedContentResponseBody.self, from: data))
|
||||||
|
} catch {
|
||||||
|
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return .empty
|
||||||
|
}
|
||||||
|
|
||||||
private func handleGetOnDeckResponse(response: Client.APIResponse) throws -> Operations.GetOnDeckResponse {
|
private func handleGetOnDeckResponse(response: Client.APIResponse) throws -> Operations.GetOnDeckResponse {
|
||||||
let httpResponse = response.httpResponse
|
let httpResponse = response.httpResponse
|
||||||
|
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ private func handleGetPlaylistResponse(response: Client.APIResponse) throws -> O
|
|||||||
private func handleDeletePlaylistResponse(response: Client.APIResponse) throws -> Operations.DeletePlaylistResponse {
|
private func handleDeletePlaylistResponse(response: Client.APIResponse) throws -> Operations.DeletePlaylistResponse {
|
||||||
let httpResponse = response.httpResponse
|
let httpResponse = response.httpResponse
|
||||||
|
|
||||||
if [200, 400].contains(httpResponse.statusCode) {
|
if [204, 400].contains(httpResponse.statusCode) {
|
||||||
return .empty
|
return .empty
|
||||||
} else if httpResponse.statusCode == 401 {
|
} else if httpResponse.statusCode == 401 {
|
||||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ class _SessionsAPI: SessionsAPI {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func getSessionHistory() async throws -> Response<Operations.GetSessionHistoryResponse> {
|
public func getSessionHistory(request: Operations.GetSessionHistoryRequest) async throws -> Response<Operations.GetSessionHistoryResponse> {
|
||||||
return try await client.makeRequest(
|
return try await client.makeRequest(
|
||||||
configureRequest: { configuration in
|
configureRequest: { configuration in
|
||||||
try configureGetSessionHistoryRequest(with: configuration)
|
try configureGetSessionHistoryRequest(with: configuration, request: request)
|
||||||
},
|
},
|
||||||
handleResponse: handleGetSessionHistoryResponse
|
handleResponse: handleGetSessionHistoryResponse
|
||||||
)
|
)
|
||||||
@@ -56,9 +56,10 @@ private func configureGetSessionsRequest(with configuration: URLRequestConfigura
|
|||||||
configuration.telemetryHeader = .userAgent
|
configuration.telemetryHeader = .userAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
private func configureGetSessionHistoryRequest(with configuration: URLRequestConfiguration) throws {
|
private func configureGetSessionHistoryRequest(with configuration: URLRequestConfiguration, request: Operations.GetSessionHistoryRequest) throws {
|
||||||
configuration.path = "/status/sessions/history/all"
|
configuration.path = "/status/sessions/history/all"
|
||||||
configuration.method = .get
|
configuration.method = .get
|
||||||
|
configuration.queryParameterSerializable = request
|
||||||
configuration.telemetryHeader = .userAgent
|
configuration.telemetryHeader = .userAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,24 @@ class _StatisticsAPI: StatisticsAPI {
|
|||||||
handleResponse: handleGetStatisticsResponse
|
handleResponse: handleGetStatisticsResponse
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func getResourcesStatistics(request: Operations.GetResourcesStatisticsRequest) async throws -> Response<Operations.GetResourcesStatisticsResponse> {
|
||||||
|
return try await client.makeRequest(
|
||||||
|
configureRequest: { configuration in
|
||||||
|
try configureGetResourcesStatisticsRequest(with: configuration, request: request)
|
||||||
|
},
|
||||||
|
handleResponse: handleGetResourcesStatisticsResponse
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func getBandwidthStatistics(request: Operations.GetBandwidthStatisticsRequest) async throws -> Response<Operations.GetBandwidthStatisticsResponse> {
|
||||||
|
return try await client.makeRequest(
|
||||||
|
configureRequest: { configuration in
|
||||||
|
try configureGetBandwidthStatisticsRequest(with: configuration, request: request)
|
||||||
|
},
|
||||||
|
handleResponse: handleGetBandwidthStatisticsResponse
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,6 +48,20 @@ private func configureGetStatisticsRequest(with configuration: URLRequestConfigu
|
|||||||
configuration.telemetryHeader = .userAgent
|
configuration.telemetryHeader = .userAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func configureGetResourcesStatisticsRequest(with configuration: URLRequestConfiguration, request: Operations.GetResourcesStatisticsRequest) throws {
|
||||||
|
configuration.path = "/statistics/resources"
|
||||||
|
configuration.method = .get
|
||||||
|
configuration.queryParameterSerializable = request
|
||||||
|
configuration.telemetryHeader = .userAgent
|
||||||
|
}
|
||||||
|
|
||||||
|
private func configureGetBandwidthStatisticsRequest(with configuration: URLRequestConfiguration, request: Operations.GetBandwidthStatisticsRequest) throws {
|
||||||
|
configuration.path = "/statistics/bandwidth"
|
||||||
|
configuration.method = .get
|
||||||
|
configuration.queryParameterSerializable = request
|
||||||
|
configuration.telemetryHeader = .userAgent
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - Response Handlers
|
// MARK: - Response Handlers
|
||||||
|
|
||||||
private func handleGetStatisticsResponse(response: Client.APIResponse) throws -> Operations.GetStatisticsResponse {
|
private func handleGetStatisticsResponse(response: Client.APIResponse) throws -> Operations.GetStatisticsResponse {
|
||||||
@@ -58,3 +90,55 @@ private func handleGetStatisticsResponse(response: Client.APIResponse) throws ->
|
|||||||
return .empty
|
return .empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func handleGetResourcesStatisticsResponse(response: Client.APIResponse) throws -> Operations.GetResourcesStatisticsResponse {
|
||||||
|
let httpResponse = response.httpResponse
|
||||||
|
|
||||||
|
if httpResponse.statusCode == 200 {
|
||||||
|
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||||
|
do {
|
||||||
|
return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetResourcesStatisticsResponseBody.self, from: data))
|
||||||
|
} catch {
|
||||||
|
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if httpResponse.statusCode == 400 {
|
||||||
|
return .empty
|
||||||
|
} else if httpResponse.statusCode == 401 {
|
||||||
|
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||||
|
do {
|
||||||
|
return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetResourcesStatisticsStatisticsResponseBody.self, from: data))
|
||||||
|
} catch {
|
||||||
|
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return .empty
|
||||||
|
}
|
||||||
|
|
||||||
|
private func handleGetBandwidthStatisticsResponse(response: Client.APIResponse) throws -> Operations.GetBandwidthStatisticsResponse {
|
||||||
|
let httpResponse = response.httpResponse
|
||||||
|
|
||||||
|
if httpResponse.statusCode == 200 {
|
||||||
|
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||||
|
do {
|
||||||
|
return .twoHundredApplicationJsonObject(try JSONDecoder().decode(Operations.GetBandwidthStatisticsResponseBody.self, from: data))
|
||||||
|
} catch {
|
||||||
|
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if httpResponse.statusCode == 400 {
|
||||||
|
return .empty
|
||||||
|
} else if httpResponse.statusCode == 401 {
|
||||||
|
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||||
|
do {
|
||||||
|
return .fourHundredAndOneApplicationJsonObject(try JSONDecoder().decode(Operations.GetBandwidthStatisticsStatisticsResponseBody.self, from: data))
|
||||||
|
} catch {
|
||||||
|
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return .empty
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import Foundation
|
|||||||
|
|
||||||
extension Operations.Filter: Serializable {
|
extension Operations.Filter: Serializable {
|
||||||
func serialize(with format: SerializableFormat) throws -> String {
|
func serialize(with format: SerializableFormat) throws -> String {
|
||||||
return try rawValue.serialize(with: format)
|
return ""
|
||||||
}
|
|
||||||
|
|
||||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
|
||||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations.GetBandwidthStatisticsRequest: Serializable {
|
||||||
|
func serialize(with format: SerializableFormat) throws -> String {
|
||||||
|
switch format {
|
||||||
|
case .query:
|
||||||
|
return try serializeQueryParameterSerializable(self, with: format)
|
||||||
|
case .path, .header, .multipart, .form:
|
||||||
|
throw SerializationError.invalidSerializationParameter(type: "Operations.GetBandwidthStatisticsRequest", format: format.formatDescription)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||||
|
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetBandwidthStatisticsRequest: QueryParameterSerializable {
|
||||||
|
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||||
|
let builder = QueryParameterBuilder()
|
||||||
|
try builder.addQueryParameters(from: timespan, named: "Timespan", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
return builder.build()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,10 +8,16 @@ extension Operations.GetLibraryItemsRequest: Serializable {
|
|||||||
switch format {
|
switch format {
|
||||||
case .path:
|
case .path:
|
||||||
return try serializePathParameterSerializable(self, with: format)
|
return try serializePathParameterSerializable(self, with: format)
|
||||||
case .query, .header, .multipart, .form:
|
case .query:
|
||||||
|
return try serializeQueryParameterSerializable(self, with: format)
|
||||||
|
case .header, .multipart, .form:
|
||||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetLibraryItemsRequest", format: format.formatDescription)
|
throw SerializationError.invalidSerializationParameter(type: "Operations.GetLibraryItemsRequest", format: format.formatDescription)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||||
|
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension Operations.GetLibraryItemsRequest: PathParameterSerializable {
|
extension Operations.GetLibraryItemsRequest: PathParameterSerializable {
|
||||||
@@ -22,3 +28,11 @@ extension Operations.GetLibraryItemsRequest: PathParameterSerializable {
|
|||||||
].compactMapValues { $0 }
|
].compactMapValues { $0 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Operations.GetLibraryItemsRequest: QueryParameterSerializable {
|
||||||
|
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||||
|
let builder = QueryParameterBuilder()
|
||||||
|
try builder.addQueryParameters(from: includeGuids, named: "includeGuids", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
return builder.build()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,10 +8,16 @@ extension Operations.GetMetadataChildrenRequest: Serializable {
|
|||||||
switch format {
|
switch format {
|
||||||
case .path:
|
case .path:
|
||||||
return try serializePathParameterSerializable(self, with: format)
|
return try serializePathParameterSerializable(self, with: format)
|
||||||
case .query, .header, .multipart, .form:
|
case .query:
|
||||||
|
return try serializeQueryParameterSerializable(self, with: format)
|
||||||
|
case .header, .multipart, .form:
|
||||||
throw SerializationError.invalidSerializationParameter(type: "Operations.GetMetadataChildrenRequest", format: format.formatDescription)
|
throw SerializationError.invalidSerializationParameter(type: "Operations.GetMetadataChildrenRequest", format: format.formatDescription)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||||
|
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension Operations.GetMetadataChildrenRequest: PathParameterSerializable {
|
extension Operations.GetMetadataChildrenRequest: PathParameterSerializable {
|
||||||
@@ -21,3 +27,11 @@ extension Operations.GetMetadataChildrenRequest: PathParameterSerializable {
|
|||||||
].compactMapValues { $0 }
|
].compactMapValues { $0 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Operations.GetMetadataChildrenRequest: QueryParameterSerializable {
|
||||||
|
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||||
|
let builder = QueryParameterBuilder()
|
||||||
|
try builder.addQueryParameters(from: includeElements, named: "includeElements", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
return builder.build()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations.GetResourcesStatisticsRequest: Serializable {
|
||||||
|
func serialize(with format: SerializableFormat) throws -> String {
|
||||||
|
switch format {
|
||||||
|
case .query:
|
||||||
|
return try serializeQueryParameterSerializable(self, with: format)
|
||||||
|
case .path, .header, .multipart, .form:
|
||||||
|
throw SerializationError.invalidSerializationParameter(type: "Operations.GetResourcesStatisticsRequest", format: format.formatDescription)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||||
|
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetResourcesStatisticsRequest: QueryParameterSerializable {
|
||||||
|
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||||
|
let builder = QueryParameterBuilder()
|
||||||
|
try builder.addQueryParameters(from: timespan, named: "Timespan", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
return builder.build()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations.GetSessionHistoryRequest: Serializable {
|
||||||
|
func serialize(with format: SerializableFormat) throws -> String {
|
||||||
|
switch format {
|
||||||
|
case .query:
|
||||||
|
return try serializeQueryParameterSerializable(self, with: format)
|
||||||
|
case .path, .header, .multipart, .form:
|
||||||
|
throw SerializationError.invalidSerializationParameter(type: "Operations.GetSessionHistoryRequest", format: format.formatDescription)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||||
|
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetSessionHistoryRequest: QueryParameterSerializable {
|
||||||
|
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||||
|
let builder = QueryParameterBuilder()
|
||||||
|
try builder.addQueryParameters(from: accountId, named: "accountId", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
try builder.addQueryParameters(from: filter, named: "filter", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
try builder.addQueryParameters(from: librarySectionID, named: "librarySectionID", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
try builder.addQueryParameters(from: sort, named: "sort", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
return builder.build()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations.GetTopWatchedContentRequest: Serializable {
|
||||||
|
func serialize(with format: SerializableFormat) throws -> String {
|
||||||
|
switch format {
|
||||||
|
case .query:
|
||||||
|
return try serializeQueryParameterSerializable(self, with: format)
|
||||||
|
case .path, .header, .multipart, .form:
|
||||||
|
throw SerializationError.invalidSerializationParameter(type: "Operations.GetTopWatchedContentRequest", format: format.formatDescription)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||||
|
return try serializedQueryParameters(with: nil, formatOverride: format)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetTopWatchedContentRequest: QueryParameterSerializable {
|
||||||
|
func serializedQueryParameters(with parameterDefaults: ParameterDefaults?, formatOverride: SerializableFormat?) throws -> [QueryParameter] {
|
||||||
|
let builder = QueryParameterBuilder()
|
||||||
|
try builder.addQueryParameters(from: type, named: "type", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
try builder.addQueryParameters(from: includeGuids, named: "includeGuids", format: formatOverride ?? .query(style: .form, explode: true), parameterDefaults: parameterDefaults)
|
||||||
|
return builder.build()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations.LibrarySectionID: Serializable {
|
||||||
|
func serialize(with format: SerializableFormat) throws -> String {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations.PathParamFilter: 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,10 +3,19 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
extension Operations {
|
extension Operations {
|
||||||
/// Filter
|
/// Filters content by field and direction/equality
|
||||||
public enum Filter: String, Codable, APIValue {
|
/// (Unknown if viewedAt is the only supported column)
|
||||||
case all = "all"
|
///
|
||||||
case available = "available"
|
public struct Filter {
|
||||||
case released = "released"
|
|
||||||
|
/// Creates an object
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Operations.Filter: Codable {
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetBandwidthStatisticsAccount {
|
||||||
|
public let autoSelectAudio: Bool?
|
||||||
|
public let defaultAudioLanguage: String?
|
||||||
|
public let defaultSubtitleLanguage: String?
|
||||||
|
public let id: Int?
|
||||||
|
public let key: String?
|
||||||
|
public let name: String?
|
||||||
|
public let subtitleMode: Int?
|
||||||
|
public let thumb: String?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(autoSelectAudio: Bool? = nil, defaultAudioLanguage: String? = nil, defaultSubtitleLanguage: String? = nil, id: Int? = nil, key: String? = nil, name: String? = nil, subtitleMode: Int? = nil, thumb: String? = nil) {
|
||||||
|
self.autoSelectAudio = autoSelectAudio
|
||||||
|
self.defaultAudioLanguage = defaultAudioLanguage
|
||||||
|
self.defaultSubtitleLanguage = defaultSubtitleLanguage
|
||||||
|
self.id = id
|
||||||
|
self.key = key
|
||||||
|
self.name = name
|
||||||
|
self.subtitleMode = subtitleMode
|
||||||
|
self.thumb = thumb
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetBandwidthStatisticsAccount: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case autoSelectAudio
|
||||||
|
case defaultAudioLanguage
|
||||||
|
case defaultSubtitleLanguage
|
||||||
|
case id
|
||||||
|
case key
|
||||||
|
case name
|
||||||
|
case subtitleMode
|
||||||
|
case thumb
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetBandwidthStatisticsDevice {
|
||||||
|
public let clientIdentifier: String?
|
||||||
|
public let createdAt: Int?
|
||||||
|
public let id: Int?
|
||||||
|
public let name: String?
|
||||||
|
public let platform: String?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(clientIdentifier: String? = nil, createdAt: Int? = nil, id: Int? = nil, name: String? = nil, platform: String? = nil) {
|
||||||
|
self.clientIdentifier = clientIdentifier
|
||||||
|
self.createdAt = createdAt
|
||||||
|
self.id = id
|
||||||
|
self.name = name
|
||||||
|
self.platform = platform
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetBandwidthStatisticsDevice: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case clientIdentifier
|
||||||
|
case createdAt
|
||||||
|
case id
|
||||||
|
case name
|
||||||
|
case platform
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetBandwidthStatisticsErrors {
|
||||||
|
@DecimalSerialized
|
||||||
|
public private(set) var code: Double?
|
||||||
|
public let message: String?
|
||||||
|
@DecimalSerialized
|
||||||
|
public private(set) var status: Double?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||||
|
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||||
|
self.message = message
|
||||||
|
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetBandwidthStatisticsErrors: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case code
|
||||||
|
case message
|
||||||
|
case status
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(from decoder: Decoder) throws {
|
||||||
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
|
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||||
|
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(to encoder: Encoder) throws {
|
||||||
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
|
if self.code != nil {
|
||||||
|
try container.encode(self._code, forKey: .code)
|
||||||
|
}
|
||||||
|
try container.encodeIfPresent(self.message, forKey: .message)
|
||||||
|
if self.status != nil {
|
||||||
|
try container.encode(self._status, forKey: .status)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetBandwidthStatisticsErrors {
|
||||||
|
var codeWrapper: DecimalSerialized<Double?> {
|
||||||
|
return _code
|
||||||
|
}
|
||||||
|
var statusWrapper: DecimalSerialized<Double?> {
|
||||||
|
return _status
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetBandwidthStatisticsMediaContainer {
|
||||||
|
public let account: [Operations.GetBandwidthStatisticsAccount]?
|
||||||
|
public let device: [Operations.GetBandwidthStatisticsDevice]?
|
||||||
|
public let size: Int?
|
||||||
|
public let statisticsBandwidth: [Operations.StatisticsBandwidth]?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(account: [Operations.GetBandwidthStatisticsAccount]? = nil, device: [Operations.GetBandwidthStatisticsDevice]? = nil, size: Int? = nil, statisticsBandwidth: [Operations.StatisticsBandwidth]? = nil) {
|
||||||
|
self.account = account
|
||||||
|
self.device = device
|
||||||
|
self.size = size
|
||||||
|
self.statisticsBandwidth = statisticsBandwidth
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetBandwidthStatisticsMediaContainer: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case account = "Account"
|
||||||
|
case device = "Device"
|
||||||
|
case size
|
||||||
|
case statisticsBandwidth = "StatisticsBandwidth"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetBandwidthStatisticsRequest: APIValue {
|
||||||
|
/// The timespan to retrieve statistics for
|
||||||
|
/// the exact meaning of this parameter is not known
|
||||||
|
///
|
||||||
|
public let timespan: Int?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
/// - Parameter timespan: The timespan to retrieve statistics for
|
||||||
|
/// the exact meaning of this parameter is not known
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(timespan: Int? = nil) {
|
||||||
|
self.timespan = timespan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A response model
|
||||||
|
public enum GetBandwidthStatisticsResponse {
|
||||||
|
case empty
|
||||||
|
case twoHundredApplicationJsonObject(Operations.GetBandwidthStatisticsResponseBody)
|
||||||
|
case fourHundredAndOneApplicationJsonObject(Operations.GetBandwidthStatisticsStatisticsResponseBody)
|
||||||
|
|
||||||
|
var isEmpty: Bool {
|
||||||
|
if case .empty = self {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func twoHundredApplicationJsonObject() throws -> Operations.GetBandwidthStatisticsResponseBody {
|
||||||
|
guard case .twoHundredApplicationJsonObject(let value) = self else {
|
||||||
|
throw PlexswiftError.missingResponseData
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
|
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetBandwidthStatisticsStatisticsResponseBody {
|
||||||
|
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
|
||||||
|
throw PlexswiftError.missingResponseData
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// Bandwidth Statistics
|
||||||
|
public struct GetBandwidthStatisticsResponseBody {
|
||||||
|
public let mediaContainer: Operations.GetBandwidthStatisticsMediaContainer?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(mediaContainer: Operations.GetBandwidthStatisticsMediaContainer? = nil) {
|
||||||
|
self.mediaContainer = mediaContainer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetBandwidthStatisticsResponseBody: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case mediaContainer = "MediaContainer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||||
|
public struct GetBandwidthStatisticsStatisticsResponseBody {
|
||||||
|
public let errors: [Operations.GetBandwidthStatisticsErrors]?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(errors: [Operations.GetBandwidthStatisticsErrors]? = nil) {
|
||||||
|
self.errors = errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetBandwidthStatisticsStatisticsResponseBody: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ extension Operations {
|
|||||||
public let allowSync: Bool?
|
public let allowSync: Bool?
|
||||||
public let art: String?
|
public let art: String?
|
||||||
public let identifier: String?
|
public let identifier: String?
|
||||||
public let librarySectionID: Int?
|
public let librarySectionID: Operations.LibrarySectionID?
|
||||||
public let librarySectionTitle: String?
|
public let librarySectionTitle: String?
|
||||||
public let librarySectionUUID: String?
|
public let librarySectionUUID: String?
|
||||||
public let mediaTagPrefix: String?
|
public let mediaTagPrefix: String?
|
||||||
@@ -25,7 +25,7 @@ extension Operations {
|
|||||||
/// Creates an object with the specified parameters
|
/// Creates an object with the specified parameters
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
public init(allowSync: Bool? = nil, art: String? = nil, identifier: String? = nil, librarySectionID: Int? = nil, librarySectionTitle: String? = nil, librarySectionUUID: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, metadata: [Operations.GetLibraryItemsMetadata]? = nil, mixedParents: Bool? = nil, size: Int? = nil, thumb: String? = nil, title1: String? = nil, title2: String? = nil, viewGroup: String? = nil, viewMode: Int? = nil) {
|
public init(allowSync: Bool? = nil, art: String? = nil, identifier: String? = nil, librarySectionID: Operations.LibrarySectionID? = nil, librarySectionTitle: String? = nil, librarySectionUUID: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, metadata: [Operations.GetLibraryItemsMetadata]? = nil, mixedParents: Bool? = nil, size: Int? = nil, thumb: String? = nil, title1: String? = nil, title2: String? = nil, viewGroup: String? = nil, viewMode: Int? = nil) {
|
||||||
self.allowSync = allowSync
|
self.allowSync = allowSync
|
||||||
self.art = art
|
self.art = art
|
||||||
self.identifier = identifier
|
self.identifier = identifier
|
||||||
|
|||||||
@@ -9,15 +9,21 @@ extension Operations {
|
|||||||
public let sectionId: AnyValue
|
public let sectionId: AnyValue
|
||||||
/// A key representing a specific tag within the section.
|
/// A key representing a specific tag within the section.
|
||||||
public let tag: Operations.Tag
|
public let tag: Operations.Tag
|
||||||
|
/// Adds the Guids object to the response
|
||||||
|
///
|
||||||
|
public let includeGuids: Int?
|
||||||
|
|
||||||
/// Creates an object with the specified parameters
|
/// Creates an object with the specified parameters
|
||||||
///
|
///
|
||||||
/// - Parameter sectionId: the Id of the library to query
|
/// - Parameter sectionId: the Id of the library to query
|
||||||
/// - Parameter tag: A key representing a specific tag within the section.
|
/// - Parameter tag: A key representing a specific tag within the section.
|
||||||
|
/// - Parameter includeGuids: Adds the Guids object to the response
|
||||||
|
///
|
||||||
///
|
///
|
||||||
public init(sectionId: AnyValue, tag: Operations.Tag) {
|
public init(sectionId: AnyValue, tag: Operations.Tag, includeGuids: Int? = nil) {
|
||||||
self.sectionId = sectionId
|
self.sectionId = sectionId
|
||||||
self.tag = tag
|
self.tag = tag
|
||||||
|
self.includeGuids = includeGuids
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,19 @@ extension Operations {
|
|||||||
/// the id of the library item to return the children of.
|
/// the id of the library item to return the children of.
|
||||||
@DecimalSerialized
|
@DecimalSerialized
|
||||||
public private(set) var ratingKey: Double
|
public private(set) var ratingKey: Double
|
||||||
|
/// Adds additional elements to the response. Supported types are (Stream)
|
||||||
|
///
|
||||||
|
public let includeElements: String?
|
||||||
|
|
||||||
/// Creates an object with the specified parameters
|
/// Creates an object with the specified parameters
|
||||||
///
|
///
|
||||||
/// - Parameter ratingKey: the id of the library item to return the children of.
|
/// - Parameter ratingKey: the id of the library item to return the children of.
|
||||||
|
/// - Parameter includeElements: Adds additional elements to the response. Supported types are (Stream)
|
||||||
|
///
|
||||||
///
|
///
|
||||||
public init(ratingKey: Double) {
|
public init(ratingKey: Double, includeElements: String? = nil) {
|
||||||
self._ratingKey = DecimalSerialized<Double>(wrappedValue: ratingKey)
|
self._ratingKey = DecimalSerialized<Double>(wrappedValue: ratingKey)
|
||||||
|
self.includeElements = includeElements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ extension Operations {
|
|||||||
@DecimalSerialized
|
@DecimalSerialized
|
||||||
public private(set) var id: Double?
|
public private(set) var id: Double?
|
||||||
public let location: Operations.Location?
|
public let location: Operations.Location?
|
||||||
public let newRegistration: String?
|
public let newRegistration: Bool?
|
||||||
public let product: String?
|
public let product: String?
|
||||||
/// a link to a QR code hosted on plex.tv
|
/// a link to a QR code hosted on plex.tv
|
||||||
/// The QR code redirects to the relevant `plex.tv/link` authentication page
|
/// The QR code redirects to the relevant `plex.tv/link` authentication page
|
||||||
@@ -35,7 +35,7 @@ extension Operations {
|
|||||||
/// Which then prompts the user for the 4 Digit Link Pin
|
/// Which then prompts the user for the 4 Digit Link Pin
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
public init(authToken: String? = nil, clientIdentifier: String? = nil, code: String? = nil, createdAt: Date? = nil, expiresAt: Date? = nil, expiresIn: Double? = nil, id: Double? = nil, location: Operations.Location? = nil, newRegistration: String? = nil, product: String? = nil, qr: String? = nil, trusted: Bool? = nil) {
|
public init(authToken: String? = nil, clientIdentifier: String? = nil, code: String? = nil, createdAt: Date? = nil, expiresAt: Date? = nil, expiresIn: Double? = nil, id: Double? = nil, location: Operations.Location? = nil, newRegistration: Bool? = nil, product: String? = nil, qr: String? = nil, trusted: Bool? = nil) {
|
||||||
self.authToken = authToken
|
self.authToken = authToken
|
||||||
self.clientIdentifier = clientIdentifier
|
self.clientIdentifier = clientIdentifier
|
||||||
self.code = code
|
self.code = code
|
||||||
@@ -78,7 +78,7 @@ extension Operations.GetPinResponseBody: Codable {
|
|||||||
self._expiresIn = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .expiresIn) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
self._expiresIn = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .expiresIn) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
self._id = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .id) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
self._id = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .id) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
self.location = try container.decodeIfPresent(Operations.Location.self, forKey: .location)
|
self.location = try container.decodeIfPresent(Operations.Location.self, forKey: .location)
|
||||||
self.newRegistration = try container.decodeIfPresent(String.self, forKey: .newRegistration)
|
self.newRegistration = try container.decodeIfPresent(Bool.self, forKey: .newRegistration)
|
||||||
self.product = try container.decodeIfPresent(String.self, forKey: .product)
|
self.product = try container.decodeIfPresent(String.self, forKey: .product)
|
||||||
self.qr = try container.decodeIfPresent(String.self, forKey: .qr)
|
self.qr = try container.decodeIfPresent(String.self, forKey: .qr)
|
||||||
self.trusted = try container.decodeIfPresent(Bool.self, forKey: .trusted)
|
self.trusted = try container.decodeIfPresent(Bool.self, forKey: .trusted)
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetResourcesStatisticsErrors {
|
||||||
|
@DecimalSerialized
|
||||||
|
public private(set) var code: Double?
|
||||||
|
public let message: String?
|
||||||
|
@DecimalSerialized
|
||||||
|
public private(set) var status: Double?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(code: Double? = nil, message: String? = nil, status: Double? = nil) {
|
||||||
|
self._code = DecimalSerialized<Double?>(wrappedValue: code)
|
||||||
|
self.message = message
|
||||||
|
self._status = DecimalSerialized<Double?>(wrappedValue: status)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetResourcesStatisticsErrors: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case code
|
||||||
|
case message
|
||||||
|
case status
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(from decoder: Decoder) throws {
|
||||||
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
self._code = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .code) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
|
self.message = try container.decodeIfPresent(String.self, forKey: .message)
|
||||||
|
self._status = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .status) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(to encoder: Encoder) throws {
|
||||||
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
|
if self.code != nil {
|
||||||
|
try container.encode(self._code, forKey: .code)
|
||||||
|
}
|
||||||
|
try container.encodeIfPresent(self.message, forKey: .message)
|
||||||
|
if self.status != nil {
|
||||||
|
try container.encode(self._status, forKey: .status)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetResourcesStatisticsErrors {
|
||||||
|
var codeWrapper: DecimalSerialized<Double?> {
|
||||||
|
return _code
|
||||||
|
}
|
||||||
|
var statusWrapper: DecimalSerialized<Double?> {
|
||||||
|
return _status
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetResourcesStatisticsMediaContainer {
|
||||||
|
public let size: Int?
|
||||||
|
public let statisticsResources: [Operations.StatisticsResources]?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(size: Int? = nil, statisticsResources: [Operations.StatisticsResources]? = nil) {
|
||||||
|
self.size = size
|
||||||
|
self.statisticsResources = statisticsResources
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetResourcesStatisticsMediaContainer: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case size
|
||||||
|
case statisticsResources = "StatisticsResources"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetResourcesStatisticsRequest: APIValue {
|
||||||
|
/// The timespan to retrieve statistics for
|
||||||
|
/// the exact meaning of this parameter is not known
|
||||||
|
///
|
||||||
|
public let timespan: Int?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
/// - Parameter timespan: The timespan to retrieve statistics for
|
||||||
|
/// the exact meaning of this parameter is not known
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(timespan: Int? = nil) {
|
||||||
|
self.timespan = timespan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A response model
|
||||||
|
public enum GetResourcesStatisticsResponse {
|
||||||
|
case empty
|
||||||
|
case twoHundredApplicationJsonObject(Operations.GetResourcesStatisticsResponseBody)
|
||||||
|
case fourHundredAndOneApplicationJsonObject(Operations.GetResourcesStatisticsStatisticsResponseBody)
|
||||||
|
|
||||||
|
var isEmpty: Bool {
|
||||||
|
if case .empty = self {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func twoHundredApplicationJsonObject() throws -> Operations.GetResourcesStatisticsResponseBody {
|
||||||
|
guard case .twoHundredApplicationJsonObject(let value) = self else {
|
||||||
|
throw PlexswiftError.missingResponseData
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
|
public func fourHundredAndOneApplicationJsonObject() throws -> Operations.GetResourcesStatisticsStatisticsResponseBody {
|
||||||
|
guard case .fourHundredAndOneApplicationJsonObject(let value) = self else {
|
||||||
|
throw PlexswiftError.missingResponseData
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// Resource Statistics
|
||||||
|
public struct GetResourcesStatisticsResponseBody {
|
||||||
|
public let mediaContainer: Operations.GetResourcesStatisticsMediaContainer?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(mediaContainer: Operations.GetResourcesStatisticsMediaContainer? = nil) {
|
||||||
|
self.mediaContainer = mediaContainer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetResourcesStatisticsResponseBody: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case mediaContainer = "MediaContainer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||||
|
public struct GetResourcesStatisticsStatisticsResponseBody {
|
||||||
|
public let errors: [Operations.GetResourcesStatisticsErrors]?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(errors: [Operations.GetResourcesStatisticsErrors]? = nil) {
|
||||||
|
self.errors = errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetResourcesStatisticsStatisticsResponseBody: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetSessionHistoryRequest: APIValue {
|
||||||
|
/// Filter results by those that are related to a specific users id
|
||||||
|
///
|
||||||
|
public let accountId: Int?
|
||||||
|
/// Filters content by field and direction/equality
|
||||||
|
/// (Unknown if viewedAt is the only supported column)
|
||||||
|
///
|
||||||
|
public let filter: Operations.Filter?
|
||||||
|
/// Filters the results based on the id of a valid library section
|
||||||
|
///
|
||||||
|
public let librarySectionID: Int?
|
||||||
|
/// Sorts the results by the specified field followed by the direction (asc, desc)
|
||||||
|
///
|
||||||
|
public let sort: String?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
/// - Parameter accountId: Filter results by those that are related to a specific users id
|
||||||
|
///
|
||||||
|
/// - Parameter filter: Filters content by field and direction/equality
|
||||||
|
/// (Unknown if viewedAt is the only supported column)
|
||||||
|
///
|
||||||
|
/// - Parameter librarySectionID: Filters the results based on the id of a valid library section
|
||||||
|
///
|
||||||
|
/// - Parameter sort: Sorts the results by the specified field followed by the direction (asc, desc)
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(accountId: Int? = nil, filter: Operations.Filter? = nil, librarySectionID: Int? = nil, sort: String? = nil) {
|
||||||
|
self.accountId = accountId
|
||||||
|
self.filter = filter
|
||||||
|
self.librarySectionID = librarySectionID
|
||||||
|
self.sort = sort
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,13 +40,13 @@ extension Operations {
|
|||||||
public let titleSort: String?
|
public let titleSort: String?
|
||||||
public let type: String?
|
public let type: String?
|
||||||
public let updatedAt: Int?
|
public let updatedAt: Int?
|
||||||
public let user: Operations.User?
|
public let user: Operations.GetSessionsUser?
|
||||||
public let viewOffset: Int?
|
public let viewOffset: Int?
|
||||||
|
|
||||||
/// Creates an object with the specified parameters
|
/// Creates an object with the specified parameters
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
public init(addedAt: Int? = nil, art: String? = nil, duration: Int? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guid: String? = nil, index: Int? = nil, key: String? = nil, librarySectionID: String? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, media: [Operations.GetSessionsMedia]? = nil, musicAnalysisVersion: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentStudio: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, parentYear: Int? = nil, player: Operations.Player? = nil, ratingCount: Int? = nil, ratingKey: String? = nil, session: Operations.Session? = nil, sessionKey: String? = nil, thumb: String? = nil, title: String? = nil, titleSort: String? = nil, type: String? = nil, updatedAt: Int? = nil, user: Operations.User? = nil, viewOffset: Int? = nil) {
|
public init(addedAt: Int? = nil, art: String? = nil, duration: Int? = nil, grandparentArt: String? = nil, grandparentGuid: String? = nil, grandparentKey: String? = nil, grandparentRatingKey: String? = nil, grandparentThumb: String? = nil, grandparentTitle: String? = nil, guid: String? = nil, index: Int? = nil, key: String? = nil, librarySectionID: String? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, media: [Operations.GetSessionsMedia]? = nil, musicAnalysisVersion: String? = nil, parentGuid: String? = nil, parentIndex: Int? = nil, parentKey: String? = nil, parentRatingKey: String? = nil, parentStudio: String? = nil, parentThumb: String? = nil, parentTitle: String? = nil, parentYear: Int? = nil, player: Operations.Player? = nil, ratingCount: Int? = nil, ratingKey: String? = nil, session: Operations.Session? = nil, sessionKey: String? = nil, thumb: String? = nil, title: String? = nil, titleSort: String? = nil, type: String? = nil, updatedAt: Int? = nil, user: Operations.GetSessionsUser? = nil, viewOffset: Int? = nil) {
|
||||||
self.addedAt = addedAt
|
self.addedAt = addedAt
|
||||||
self.art = art
|
self.art = art
|
||||||
self.duration = duration
|
self.duration = duration
|
||||||
|
|||||||
30
Sources/Plexswift/models/operations/GetSessionsUser.swift
Normal file
30
Sources/Plexswift/models/operations/GetSessionsUser.swift
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetSessionsUser {
|
||||||
|
public let id: String?
|
||||||
|
public let thumb: String?
|
||||||
|
public let title: String?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(id: String? = nil, thumb: String? = nil, title: String? = nil) {
|
||||||
|
self.id = id
|
||||||
|
self.thumb = thumb
|
||||||
|
self.title = title
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetSessionsUser: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case id
|
||||||
|
case thumb
|
||||||
|
case title
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetTopWatchedContentCountry {
|
||||||
|
public let filter: String?
|
||||||
|
public let id: Int?
|
||||||
|
public let tag: String?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(filter: String? = nil, id: Int? = nil, tag: String? = nil) {
|
||||||
|
self.filter = filter
|
||||||
|
self.id = id
|
||||||
|
self.tag = tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetTopWatchedContentCountry: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case filter
|
||||||
|
case id
|
||||||
|
case tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetTopWatchedContentGenre {
|
||||||
|
public let filter: String?
|
||||||
|
public let id: Int?
|
||||||
|
public let tag: String?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(filter: String? = nil, id: Int? = nil, tag: String? = nil) {
|
||||||
|
self.filter = filter
|
||||||
|
self.id = id
|
||||||
|
self.tag = tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetTopWatchedContentGenre: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case filter
|
||||||
|
case id
|
||||||
|
case tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetTopWatchedContentGuids {
|
||||||
|
public let id: String?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(id: String? = nil) {
|
||||||
|
self.id = id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetTopWatchedContentGuids: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetTopWatchedContentMediaContainer {
|
||||||
|
public let allowSync: Bool?
|
||||||
|
public let identifier: String?
|
||||||
|
public let mediaTagPrefix: String?
|
||||||
|
public let mediaTagVersion: Int?
|
||||||
|
public let metadata: [Operations.GetTopWatchedContentMetadata]?
|
||||||
|
public let size: Int?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(allowSync: Bool? = nil, identifier: String? = nil, mediaTagPrefix: String? = nil, mediaTagVersion: Int? = nil, metadata: [Operations.GetTopWatchedContentMetadata]? = nil, size: Int? = nil) {
|
||||||
|
self.allowSync = allowSync
|
||||||
|
self.identifier = identifier
|
||||||
|
self.mediaTagPrefix = mediaTagPrefix
|
||||||
|
self.mediaTagVersion = mediaTagVersion
|
||||||
|
self.metadata = metadata
|
||||||
|
self.size = size
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetTopWatchedContentMediaContainer: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case allowSync
|
||||||
|
case identifier
|
||||||
|
case mediaTagPrefix
|
||||||
|
case mediaTagVersion
|
||||||
|
case metadata = "Metadata"
|
||||||
|
case size
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetTopWatchedContentMetadata {
|
||||||
|
public let addedAt: Int?
|
||||||
|
public let art: String?
|
||||||
|
@DecimalSerialized
|
||||||
|
public private(set) var audienceRating: Double?
|
||||||
|
public let audienceRatingImage: String?
|
||||||
|
public let childCount: Int?
|
||||||
|
public let contentRating: String?
|
||||||
|
public let country: [Operations.GetTopWatchedContentCountry]?
|
||||||
|
public let duration: Int?
|
||||||
|
public let genre: [Operations.GetTopWatchedContentGenre]?
|
||||||
|
public let globalViewCount: Int?
|
||||||
|
public let guid: String?
|
||||||
|
public let guids: [Operations.GetTopWatchedContentGuids]?
|
||||||
|
public let index: Int?
|
||||||
|
public let key: String?
|
||||||
|
public let leafCount: Int?
|
||||||
|
public let librarySectionID: Int?
|
||||||
|
public let librarySectionKey: String?
|
||||||
|
public let librarySectionTitle: String?
|
||||||
|
@DateOnly
|
||||||
|
public private(set) var originallyAvailableAt: Date?
|
||||||
|
public let ratingKey: String?
|
||||||
|
public let role: [Operations.GetTopWatchedContentRole]?
|
||||||
|
public let slug: String?
|
||||||
|
public let studio: String?
|
||||||
|
public let summary: String?
|
||||||
|
public let tagline: String?
|
||||||
|
public let thumb: String?
|
||||||
|
public let title: String?
|
||||||
|
public let type: String?
|
||||||
|
public let updatedAt: Int?
|
||||||
|
public let user: [Operations.User]?
|
||||||
|
public let viewedLeafCount: Int?
|
||||||
|
public let year: Int?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(addedAt: Int? = nil, art: String? = nil, audienceRating: Double? = nil, audienceRatingImage: String? = nil, childCount: Int? = nil, contentRating: String? = nil, country: [Operations.GetTopWatchedContentCountry]? = nil, duration: Int? = nil, genre: [Operations.GetTopWatchedContentGenre]? = nil, globalViewCount: Int? = nil, guid: String? = nil, guids: [Operations.GetTopWatchedContentGuids]? = nil, index: Int? = nil, key: String? = nil, leafCount: Int? = nil, librarySectionID: Int? = nil, librarySectionKey: String? = nil, librarySectionTitle: String? = nil, originallyAvailableAt: Date? = nil, ratingKey: String? = nil, role: [Operations.GetTopWatchedContentRole]? = nil, slug: String? = nil, studio: String? = nil, summary: String? = nil, tagline: String? = nil, thumb: String? = nil, title: String? = nil, type: String? = nil, updatedAt: Int? = nil, user: [Operations.User]? = nil, viewedLeafCount: Int? = nil, year: Int? = nil) {
|
||||||
|
self.addedAt = addedAt
|
||||||
|
self.art = art
|
||||||
|
self._audienceRating = DecimalSerialized<Double?>(wrappedValue: audienceRating)
|
||||||
|
self.audienceRatingImage = audienceRatingImage
|
||||||
|
self.childCount = childCount
|
||||||
|
self.contentRating = contentRating
|
||||||
|
self.country = country
|
||||||
|
self.duration = duration
|
||||||
|
self.genre = genre
|
||||||
|
self.globalViewCount = globalViewCount
|
||||||
|
self.guid = guid
|
||||||
|
self.guids = guids
|
||||||
|
self.index = index
|
||||||
|
self.key = key
|
||||||
|
self.leafCount = leafCount
|
||||||
|
self.librarySectionID = librarySectionID
|
||||||
|
self.librarySectionKey = librarySectionKey
|
||||||
|
self.librarySectionTitle = librarySectionTitle
|
||||||
|
self._originallyAvailableAt = DateOnly<Date?>(wrappedValue: originallyAvailableAt)
|
||||||
|
self.ratingKey = ratingKey
|
||||||
|
self.role = role
|
||||||
|
self.slug = slug
|
||||||
|
self.studio = studio
|
||||||
|
self.summary = summary
|
||||||
|
self.tagline = tagline
|
||||||
|
self.thumb = thumb
|
||||||
|
self.title = title
|
||||||
|
self.type = type
|
||||||
|
self.updatedAt = updatedAt
|
||||||
|
self.user = user
|
||||||
|
self.viewedLeafCount = viewedLeafCount
|
||||||
|
self.year = year
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetTopWatchedContentMetadata: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case addedAt
|
||||||
|
case art
|
||||||
|
case audienceRating
|
||||||
|
case audienceRatingImage
|
||||||
|
case childCount
|
||||||
|
case contentRating
|
||||||
|
case country = "Country"
|
||||||
|
case duration
|
||||||
|
case genre = "Genre"
|
||||||
|
case globalViewCount
|
||||||
|
case guid
|
||||||
|
case guids = "Guid"
|
||||||
|
case index
|
||||||
|
case key
|
||||||
|
case leafCount
|
||||||
|
case librarySectionID
|
||||||
|
case librarySectionKey
|
||||||
|
case librarySectionTitle
|
||||||
|
case originallyAvailableAt
|
||||||
|
case ratingKey
|
||||||
|
case role = "Role"
|
||||||
|
case slug
|
||||||
|
case studio
|
||||||
|
case summary
|
||||||
|
case tagline
|
||||||
|
case thumb
|
||||||
|
case title
|
||||||
|
case type
|
||||||
|
case updatedAt
|
||||||
|
case user = "User"
|
||||||
|
case viewedLeafCount
|
||||||
|
case year
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(from decoder: Decoder) throws {
|
||||||
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
self.addedAt = try container.decodeIfPresent(Int.self, forKey: .addedAt)
|
||||||
|
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.childCount = try container.decodeIfPresent(Int.self, forKey: .childCount)
|
||||||
|
self.contentRating = try container.decodeIfPresent(String.self, forKey: .contentRating)
|
||||||
|
self.country = try container.decodeIfPresent([Operations.GetTopWatchedContentCountry].self, forKey: .country)
|
||||||
|
self.duration = try container.decodeIfPresent(Int.self, forKey: .duration)
|
||||||
|
self.genre = try container.decodeIfPresent([Operations.GetTopWatchedContentGenre].self, forKey: .genre)
|
||||||
|
self.globalViewCount = try container.decodeIfPresent(Int.self, forKey: .globalViewCount)
|
||||||
|
self.guid = try container.decodeIfPresent(String.self, forKey: .guid)
|
||||||
|
self.guids = try container.decodeIfPresent([Operations.GetTopWatchedContentGuids].self, forKey: .guids)
|
||||||
|
self.index = try container.decodeIfPresent(Int.self, forKey: .index)
|
||||||
|
self.key = try container.decodeIfPresent(String.self, forKey: .key)
|
||||||
|
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._originallyAvailableAt = try container.decodeIfPresent(DateOnly<Date?>.self, forKey: .originallyAvailableAt) ?? DateOnly<Date?>(wrappedValue: nil)
|
||||||
|
self.ratingKey = try container.decodeIfPresent(String.self, forKey: .ratingKey)
|
||||||
|
self.role = try container.decodeIfPresent([Operations.GetTopWatchedContentRole].self, forKey: .role)
|
||||||
|
self.slug = try container.decodeIfPresent(String.self, forKey: .slug)
|
||||||
|
self.studio = try container.decodeIfPresent(String.self, forKey: .studio)
|
||||||
|
self.summary = try container.decodeIfPresent(String.self, forKey: .summary)
|
||||||
|
self.tagline = try container.decodeIfPresent(String.self, forKey: .tagline)
|
||||||
|
self.thumb = try container.decodeIfPresent(String.self, forKey: .thumb)
|
||||||
|
self.title = try container.decodeIfPresent(String.self, forKey: .title)
|
||||||
|
self.type = try container.decodeIfPresent(String.self, forKey: .type)
|
||||||
|
self.updatedAt = try container.decodeIfPresent(Int.self, forKey: .updatedAt)
|
||||||
|
self.user = try container.decodeIfPresent([Operations.User].self, forKey: .user)
|
||||||
|
self.viewedLeafCount = try container.decodeIfPresent(Int.self, forKey: .viewedLeafCount)
|
||||||
|
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.encodeIfPresent(self.addedAt, forKey: .addedAt)
|
||||||
|
try container.encodeIfPresent(self.art, forKey: .art)
|
||||||
|
if self.audienceRating != nil {
|
||||||
|
try container.encode(self._audienceRating, forKey: .audienceRating)
|
||||||
|
}
|
||||||
|
try container.encodeIfPresent(self.audienceRatingImage, forKey: .audienceRatingImage)
|
||||||
|
try container.encodeIfPresent(self.childCount, forKey: .childCount)
|
||||||
|
try container.encodeIfPresent(self.contentRating, forKey: .contentRating)
|
||||||
|
try container.encodeIfPresent(self.country, forKey: .country)
|
||||||
|
try container.encodeIfPresent(self.duration, forKey: .duration)
|
||||||
|
try container.encodeIfPresent(self.genre, forKey: .genre)
|
||||||
|
try container.encodeIfPresent(self.globalViewCount, forKey: .globalViewCount)
|
||||||
|
try container.encodeIfPresent(self.guid, forKey: .guid)
|
||||||
|
try container.encodeIfPresent(self.guids, forKey: .guids)
|
||||||
|
try container.encodeIfPresent(self.index, forKey: .index)
|
||||||
|
try container.encodeIfPresent(self.key, forKey: .key)
|
||||||
|
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)
|
||||||
|
if self.originallyAvailableAt != nil {
|
||||||
|
try container.encode(self._originallyAvailableAt, forKey: .originallyAvailableAt)
|
||||||
|
}
|
||||||
|
try container.encodeIfPresent(self.ratingKey, forKey: .ratingKey)
|
||||||
|
try container.encodeIfPresent(self.role, forKey: .role)
|
||||||
|
try container.encodeIfPresent(self.slug, forKey: .slug)
|
||||||
|
try container.encodeIfPresent(self.studio, forKey: .studio)
|
||||||
|
try container.encodeIfPresent(self.summary, forKey: .summary)
|
||||||
|
try container.encodeIfPresent(self.tagline, forKey: .tagline)
|
||||||
|
try container.encodeIfPresent(self.thumb, forKey: .thumb)
|
||||||
|
try container.encodeIfPresent(self.title, forKey: .title)
|
||||||
|
try container.encodeIfPresent(self.type, forKey: .type)
|
||||||
|
try container.encodeIfPresent(self.updatedAt, forKey: .updatedAt)
|
||||||
|
try container.encodeIfPresent(self.user, forKey: .user)
|
||||||
|
try container.encodeIfPresent(self.viewedLeafCount, forKey: .viewedLeafCount)
|
||||||
|
try container.encodeIfPresent(self.year, forKey: .year)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetTopWatchedContentMetadata {
|
||||||
|
var audienceRatingWrapper: DecimalSerialized<Double?> {
|
||||||
|
return _audienceRating
|
||||||
|
}
|
||||||
|
var originallyAvailableAtWrapper: DateOnly<Date?> {
|
||||||
|
return _originallyAvailableAt
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetTopWatchedContentRequest: APIValue {
|
||||||
|
/// the library type (1 - movies, 2 - shows, 3 - music)
|
||||||
|
public let type: Int
|
||||||
|
/// Adds the Guids object to the response
|
||||||
|
///
|
||||||
|
public let includeGuids: Int?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
/// - Parameter type: the library type (1 - movies, 2 - shows, 3 - music)
|
||||||
|
/// - Parameter includeGuids: Adds the Guids object to the response
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(type: Int, includeGuids: Int? = nil) {
|
||||||
|
self.type = type
|
||||||
|
self.includeGuids = includeGuids
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A response model
|
||||||
|
public enum GetTopWatchedContentResponse {
|
||||||
|
case empty
|
||||||
|
case object(Operations.GetTopWatchedContentResponseBody)
|
||||||
|
|
||||||
|
var isEmpty: Bool {
|
||||||
|
if case .empty = self {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func object() throws -> Operations.GetTopWatchedContentResponseBody {
|
||||||
|
guard case .object(let value) = self else {
|
||||||
|
throw PlexswiftError.missingResponseData
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// The metadata of the library item.
|
||||||
|
public struct GetTopWatchedContentResponseBody {
|
||||||
|
public let mediaContainer: Operations.GetTopWatchedContentMediaContainer?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(mediaContainer: Operations.GetTopWatchedContentMediaContainer? = nil) {
|
||||||
|
self.mediaContainer = mediaContainer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.GetTopWatchedContentResponseBody: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case mediaContainer = "MediaContainer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct GetTopWatchedContentRole {
|
||||||
|
public let filter: String?
|
||||||
|
public let id: Int?
|
||||||
|
public let role: String?
|
||||||
|
public let tag: String?
|
||||||
|
public let tagKey: String?
|
||||||
|
public let thumb: String?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
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.GetTopWatchedContentRole: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case filter
|
||||||
|
case id
|
||||||
|
case role
|
||||||
|
case tag
|
||||||
|
case tagKey
|
||||||
|
case thumb
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ extension Operations {
|
|||||||
/// A model object
|
/// A model object
|
||||||
public struct GetWatchlistRequest: APIValue {
|
public struct GetWatchlistRequest: APIValue {
|
||||||
/// Filter
|
/// Filter
|
||||||
public let filter: Operations.Filter
|
public let filter: Operations.PathParamFilter
|
||||||
/// User Token
|
/// User Token
|
||||||
public let xPlexToken: String
|
public let xPlexToken: String
|
||||||
/// include collections in the results
|
/// include collections in the results
|
||||||
@@ -60,7 +60,7 @@ extension Operations {
|
|||||||
/// If the number of items exceeds the limit, the response will be paginated.
|
/// If the number of items exceeds the limit, the response will be paginated.
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
public init(filter: Operations.Filter, xPlexToken: String, includeCollections: Operations.IncludeCollections? = nil, includeExternalMedia: Operations.IncludeExternalMedia? = nil, libtype: Operations.Libtype? = nil, maxresults: Int? = nil, sort: String? = nil, xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) {
|
public init(filter: Operations.PathParamFilter, xPlexToken: String, includeCollections: Operations.IncludeCollections? = nil, includeExternalMedia: Operations.IncludeExternalMedia? = nil, libtype: Operations.Libtype? = nil, maxresults: Int? = nil, sort: String? = nil, xPlexContainerSize: Int? = nil, xPlexContainerStart: Int? = nil) {
|
||||||
self.filter = filter
|
self.filter = filter
|
||||||
self.xPlexToken = xPlexToken
|
self.xPlexToken = xPlexToken
|
||||||
self.includeCollections = includeCollections
|
self.includeCollections = includeCollections
|
||||||
|
|||||||
33
Sources/Plexswift/models/operations/LibrarySectionID.swift
Normal file
33
Sources/Plexswift/models/operations/LibrarySectionID.swift
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public enum LibrarySectionID {
|
||||||
|
case integer(Int)
|
||||||
|
case string(String)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.LibrarySectionID: Codable {
|
||||||
|
public init(from decoder: Decoder) throws {
|
||||||
|
if let value = try? Int(from: decoder) {
|
||||||
|
self = .integer(value)
|
||||||
|
} else if let value = try? String(from: decoder) {
|
||||||
|
self = .string(value)
|
||||||
|
} else {
|
||||||
|
throw PlexswiftError.failedToHandleResponse(.failedToDecodeResponse)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(to encoder: Encoder) throws {
|
||||||
|
switch self {
|
||||||
|
case .integer(let value):
|
||||||
|
try value.encode(to: encoder)
|
||||||
|
case .string(let value):
|
||||||
|
try value.encode(to: encoder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
12
Sources/Plexswift/models/operations/PathParamFilter.swift
Normal file
12
Sources/Plexswift/models/operations/PathParamFilter.swift
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// Filter
|
||||||
|
public enum PathParamFilter: String, Codable, APIValue {
|
||||||
|
case all = "all"
|
||||||
|
case available = "available"
|
||||||
|
case released = "released"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct StatisticsBandwidth {
|
||||||
|
public let accountID: Int?
|
||||||
|
public let at: Int?
|
||||||
|
public let bytes: Int?
|
||||||
|
public let deviceID: Int?
|
||||||
|
public let lan: Bool?
|
||||||
|
public let timespan: Int?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(accountID: Int? = nil, at: Int? = nil, bytes: Int? = nil, deviceID: Int? = nil, lan: Bool? = nil, timespan: Int? = nil) {
|
||||||
|
self.accountID = accountID
|
||||||
|
self.at = at
|
||||||
|
self.bytes = bytes
|
||||||
|
self.deviceID = deviceID
|
||||||
|
self.lan = lan
|
||||||
|
self.timespan = timespan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.StatisticsBandwidth: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case accountID
|
||||||
|
case at
|
||||||
|
case bytes
|
||||||
|
case deviceID
|
||||||
|
case lan
|
||||||
|
case timespan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Operations {
|
||||||
|
/// A model object
|
||||||
|
public struct StatisticsResources {
|
||||||
|
public let at: Int?
|
||||||
|
@DecimalSerialized
|
||||||
|
public private(set) var hostCpuUtilization: Double?
|
||||||
|
@DecimalSerialized
|
||||||
|
public private(set) var hostMemoryUtilization: Double?
|
||||||
|
@DecimalSerialized
|
||||||
|
public private(set) var processCpuUtilization: Double?
|
||||||
|
@DecimalSerialized
|
||||||
|
public private(set) var processMemoryUtilization: Double?
|
||||||
|
public let timespan: Int?
|
||||||
|
|
||||||
|
/// Creates an object with the specified parameters
|
||||||
|
///
|
||||||
|
///
|
||||||
|
public init(at: Int? = nil, hostCpuUtilization: Double? = nil, hostMemoryUtilization: Double? = nil, processCpuUtilization: Double? = nil, processMemoryUtilization: Double? = nil, timespan: Int? = nil) {
|
||||||
|
self.at = at
|
||||||
|
self._hostCpuUtilization = DecimalSerialized<Double?>(wrappedValue: hostCpuUtilization)
|
||||||
|
self._hostMemoryUtilization = DecimalSerialized<Double?>(wrappedValue: hostMemoryUtilization)
|
||||||
|
self._processCpuUtilization = DecimalSerialized<Double?>(wrappedValue: processCpuUtilization)
|
||||||
|
self._processMemoryUtilization = DecimalSerialized<Double?>(wrappedValue: processMemoryUtilization)
|
||||||
|
self.timespan = timespan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.StatisticsResources: Codable {
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case at
|
||||||
|
case hostCpuUtilization
|
||||||
|
case hostMemoryUtilization
|
||||||
|
case processCpuUtilization
|
||||||
|
case processMemoryUtilization
|
||||||
|
case timespan
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(from decoder: Decoder) throws {
|
||||||
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
self.at = try container.decodeIfPresent(Int.self, forKey: .at)
|
||||||
|
self._hostCpuUtilization = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .hostCpuUtilization) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
|
self._hostMemoryUtilization = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .hostMemoryUtilization) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
|
self._processCpuUtilization = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .processCpuUtilization) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
|
self._processMemoryUtilization = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .processMemoryUtilization) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||||
|
self.timespan = try container.decodeIfPresent(Int.self, forKey: .timespan)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(to encoder: Encoder) throws {
|
||||||
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
|
try container.encodeIfPresent(self.at, forKey: .at)
|
||||||
|
if self.hostCpuUtilization != nil {
|
||||||
|
try container.encode(self._hostCpuUtilization, forKey: .hostCpuUtilization)
|
||||||
|
}
|
||||||
|
if self.hostMemoryUtilization != nil {
|
||||||
|
try container.encode(self._hostMemoryUtilization, forKey: .hostMemoryUtilization)
|
||||||
|
}
|
||||||
|
if self.processCpuUtilization != nil {
|
||||||
|
try container.encode(self._processCpuUtilization, forKey: .processCpuUtilization)
|
||||||
|
}
|
||||||
|
if self.processMemoryUtilization != nil {
|
||||||
|
try container.encode(self._processMemoryUtilization, forKey: .processMemoryUtilization)
|
||||||
|
}
|
||||||
|
try container.encodeIfPresent(self.timespan, forKey: .timespan)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Operations.StatisticsResources {
|
||||||
|
var hostCpuUtilizationWrapper: DecimalSerialized<Double?> {
|
||||||
|
return _hostCpuUtilization
|
||||||
|
}
|
||||||
|
var processCpuUtilizationWrapper: DecimalSerialized<Double?> {
|
||||||
|
return _processCpuUtilization
|
||||||
|
}
|
||||||
|
var hostMemoryUtilizationWrapper: DecimalSerialized<Double?> {
|
||||||
|
return _hostMemoryUtilization
|
||||||
|
}
|
||||||
|
var processMemoryUtilizationWrapper: DecimalSerialized<Double?> {
|
||||||
|
return _processMemoryUtilization
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,17 +5,13 @@ import Foundation
|
|||||||
extension Operations {
|
extension Operations {
|
||||||
/// A model object
|
/// A model object
|
||||||
public struct User {
|
public struct User {
|
||||||
public let id: String?
|
public let id: Int?
|
||||||
public let thumb: String?
|
|
||||||
public let title: String?
|
|
||||||
|
|
||||||
/// Creates an object with the specified parameters
|
/// Creates an object with the specified parameters
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
public init(id: String? = nil, thumb: String? = nil, title: String? = nil) {
|
public init(id: Int? = nil) {
|
||||||
self.id = id
|
self.id = id
|
||||||
self.thumb = thumb
|
|
||||||
self.title = title
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,8 +19,6 @@ extension Operations {
|
|||||||
extension Operations.User: Codable {
|
extension Operations.User: Codable {
|
||||||
enum CodingKeys: String, CodingKey {
|
enum CodingKeys: String, CodingKey {
|
||||||
case id
|
case id
|
||||||
case thumb
|
|
||||||
case title
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public protocol PlexswiftAPI {
|
|||||||
/// - ``getServerList()``
|
/// - ``getServerList()``
|
||||||
///
|
///
|
||||||
public protocol ServerAPI {
|
public protocol ServerAPI {
|
||||||
/// Server Capabilities
|
/// Get Server Capabilities
|
||||||
///
|
///
|
||||||
/// - Returns: A ``Operations/GetServerCapabilitiesResponse`` object describing the result of the API operation
|
/// - Returns: A ``Operations/GetServerCapabilitiesResponse`` object describing the result of the API operation
|
||||||
/// - Throws: An error of type ``PlexswiftError``
|
/// - Throws: An error of type ``PlexswiftError``
|
||||||
@@ -535,6 +535,7 @@ public protocol SearchAPI {
|
|||||||
/// - ``searchLibrary(request:)``
|
/// - ``searchLibrary(request:)``
|
||||||
/// - ``getMetadata(request:)``
|
/// - ``getMetadata(request:)``
|
||||||
/// - ``getMetadataChildren(request:)``
|
/// - ``getMetadataChildren(request:)``
|
||||||
|
/// - ``getTopWatchedContent(request:)``
|
||||||
/// - ``getOnDeck()``
|
/// - ``getOnDeck()``
|
||||||
///
|
///
|
||||||
public protocol LibraryAPI {
|
public protocol LibraryAPI {
|
||||||
@@ -693,6 +694,14 @@ public protocol LibraryAPI {
|
|||||||
/// - Throws: An error of type ``PlexswiftError``
|
/// - Throws: An error of type ``PlexswiftError``
|
||||||
func getMetadataChildren(request: Operations.GetMetadataChildrenRequest) async throws -> Response<Operations.GetMetadataChildrenResponse>
|
func getMetadataChildren(request: Operations.GetMetadataChildrenRequest) async throws -> Response<Operations.GetMetadataChildrenResponse>
|
||||||
|
|
||||||
|
/// This endpoint will return the top watched content from libraries of a certain type
|
||||||
|
///
|
||||||
|
///
|
||||||
|
/// - Parameter request: A ``Operations/GetTopWatchedContentRequest`` object describing the input to the API operation
|
||||||
|
/// - Returns: A ``Operations/GetTopWatchedContentResponse`` object describing the result of the API operation
|
||||||
|
/// - Throws: An error of type ``PlexswiftError``
|
||||||
|
func getTopWatchedContent(request: Operations.GetTopWatchedContentRequest) async throws -> Response<Operations.GetTopWatchedContentResponse>
|
||||||
|
|
||||||
/// This endpoint will return the on deck content.
|
/// This endpoint will return the on deck content.
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
@@ -902,6 +911,8 @@ public protocol AuthenticationAPI {
|
|||||||
/// ### API calls
|
/// ### API calls
|
||||||
///
|
///
|
||||||
/// - ``getStatistics(request:)``
|
/// - ``getStatistics(request:)``
|
||||||
|
/// - ``getResourcesStatistics(request:)``
|
||||||
|
/// - ``getBandwidthStatistics(request:)``
|
||||||
///
|
///
|
||||||
public protocol StatisticsAPI {
|
public protocol StatisticsAPI {
|
||||||
/// This will return the media statistics for the server
|
/// This will return the media statistics for the server
|
||||||
@@ -910,6 +921,20 @@ public protocol StatisticsAPI {
|
|||||||
/// - Returns: A ``Operations/GetStatisticsResponse`` object describing the result of the API operation
|
/// - Returns: A ``Operations/GetStatisticsResponse`` object describing the result of the API operation
|
||||||
/// - Throws: An error of type ``PlexswiftError``
|
/// - Throws: An error of type ``PlexswiftError``
|
||||||
func getStatistics(request: Operations.GetStatisticsRequest) async throws -> Response<Operations.GetStatisticsResponse>
|
func getStatistics(request: Operations.GetStatisticsRequest) async throws -> Response<Operations.GetStatisticsResponse>
|
||||||
|
|
||||||
|
/// This will return the resources for the server
|
||||||
|
///
|
||||||
|
/// - Parameter request: A ``Operations/GetResourcesStatisticsRequest`` object describing the input to the API operation
|
||||||
|
/// - Returns: A ``Operations/GetResourcesStatisticsResponse`` object describing the result of the API operation
|
||||||
|
/// - Throws: An error of type ``PlexswiftError``
|
||||||
|
func getResourcesStatistics(request: Operations.GetResourcesStatisticsRequest) async throws -> Response<Operations.GetResourcesStatisticsResponse>
|
||||||
|
|
||||||
|
/// This will return the bandwidth statistics for the server
|
||||||
|
///
|
||||||
|
/// - Parameter request: A ``Operations/GetBandwidthStatisticsRequest`` object describing the input to the API operation
|
||||||
|
/// - Returns: A ``Operations/GetBandwidthStatisticsResponse`` object describing the result of the API operation
|
||||||
|
/// - Throws: An error of type ``PlexswiftError``
|
||||||
|
func getBandwidthStatistics(request: Operations.GetBandwidthStatisticsRequest) async throws -> Response<Operations.GetBandwidthStatisticsResponse>
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - SessionsAPI
|
// MARK: - SessionsAPI
|
||||||
@@ -922,7 +947,7 @@ public protocol StatisticsAPI {
|
|||||||
/// ### API calls
|
/// ### API calls
|
||||||
///
|
///
|
||||||
/// - ``getSessions()``
|
/// - ``getSessions()``
|
||||||
/// - ``getSessionHistory()``
|
/// - ``getSessionHistory(request:)``
|
||||||
/// - ``getTranscodeSessions()``
|
/// - ``getTranscodeSessions()``
|
||||||
/// - ``stopTranscodeSession(request:)``
|
/// - ``stopTranscodeSession(request:)``
|
||||||
///
|
///
|
||||||
@@ -935,9 +960,10 @@ public protocol SessionsAPI {
|
|||||||
|
|
||||||
/// This will Retrieve a listing of all history views.
|
/// This will Retrieve a listing of all history views.
|
||||||
///
|
///
|
||||||
|
/// - Parameter request: A ``Operations/GetSessionHistoryRequest`` object describing the input to the API operation
|
||||||
/// - Returns: A ``Operations/GetSessionHistoryResponse`` object describing the result of the API operation
|
/// - Returns: A ``Operations/GetSessionHistoryResponse`` object describing the result of the API operation
|
||||||
/// - Throws: An error of type ``PlexswiftError``
|
/// - Throws: An error of type ``PlexswiftError``
|
||||||
func getSessionHistory() async throws -> Response<Operations.GetSessionHistoryResponse>
|
func getSessionHistory(request: Operations.GetSessionHistoryRequest) async throws -> Response<Operations.GetSessionHistoryResponse>
|
||||||
|
|
||||||
/// Get Transcode Sessions
|
/// Get Transcode Sessions
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ final class URLRequestBuilder: URLRequestConfiguration {
|
|||||||
urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type")
|
urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type")
|
||||||
}
|
}
|
||||||
|
|
||||||
urlRequest.setValue("speakeasy-sdk/swift 0.4.0 2.342.6 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
urlRequest.setValue("speakeasy-sdk/swift 0.5.0 2.349.6 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
||||||
|
|
||||||
addSecurityParameters(to: &urlRequest)
|
addSecurityParameters(to: &urlRequest)
|
||||||
|
|
||||||
|
|||||||
1462
codeSamples.yaml
1462
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user