mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-09 20:57:45 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6
This commit is contained in:
@@ -153,15 +153,6 @@ class _LibraryAPI: LibraryAPI {
|
||||
handleResponse: handleGetTopWatchedContentResponse
|
||||
)
|
||||
}
|
||||
|
||||
public func getOnDeck() async throws -> Response<Operations.GetOnDeckResponse> {
|
||||
return try await client.makeRequest(
|
||||
configureRequest: { configuration in
|
||||
try configureGetOnDeckRequest(with: configuration)
|
||||
},
|
||||
handleResponse: handleGetOnDeckResponse
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -289,12 +280,6 @@ private func configureGetTopWatchedContentRequest(with configuration: URLRequest
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
private func configureGetOnDeckRequest(with configuration: URLRequestConfiguration) throws {
|
||||
configuration.path = "/library/onDeck"
|
||||
configuration.method = .get
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
// MARK: - Response Handlers
|
||||
|
||||
private func handleGetFileHashResponse(response: Client.APIResponse) throws -> Operations.GetFileHashResponse {
|
||||
@@ -801,35 +786,3 @@ private func handleGetTopWatchedContentResponse(response: Client.APIResponse) th
|
||||
return .empty
|
||||
}
|
||||
|
||||
private func handleGetOnDeckResponse(response: Client.APIResponse) throws -> Operations.GetOnDeckResponse {
|
||||
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.GetOnDeckResponseBody.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
} else if httpResponse.statusCode == 400 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .badRequest(try JSONDecoder().decode(Operations.GetOnDeckBadRequest.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
} else if httpResponse.statusCode == 401 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .unauthorized(try JSONDecoder().decode(Operations.GetOnDeckUnauthorized.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return .empty
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsEpisodeSort: Serializable {
|
||||
extension Operations.GetAllMediaLibraryLibrary1: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsEnableCreditsMarkerGeneration: 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))]
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsFlattenSeasons: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
|
||||
func serializeQueryParameters(with format: SerializableFormat) throws -> [QueryParameter] {
|
||||
return [QueryParameter(key: [], serialized: try serialize(with: format))]
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetLibraryItemsShowOrdering: Serializable {
|
||||
extension Operations.GetRecentlyAdded1: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return try rawValue.serialize(with: format)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Operations.GetRecentlyAddedOptimizedForStreaming: Serializable {
|
||||
func serialize(with format: SerializableFormat) throws -> String {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,6 @@ import Foundation
|
||||
|
||||
extension Operations.OptimizedForStreaming: 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))]
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user