mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 20:57:46 +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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user