mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-07 12:47:45 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0
This commit is contained in:
@@ -75,7 +75,7 @@ private func configureGetTokenDetailsRequest(with configuration: URLRequestConfi
|
||||
private func configurePostUsersSignInDataRequest(with configuration: URLRequestConfiguration, request: Operations.PostUsersSignInDataRequest) throws {
|
||||
configuration.path = "/users/signin"
|
||||
configuration.method = .post
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.contentType = "application/x-www-form-urlencoded"
|
||||
configuration.body = try serializeFormData(with: request.requestBody)
|
||||
configuration.telemetryHeader = .userAgent
|
||||
|
||||
@@ -82,6 +82,15 @@ class _LibraryAPI: LibraryAPI {
|
||||
)
|
||||
}
|
||||
|
||||
public func getSearchAllLibraries(request: Operations.GetSearchAllLibrariesRequest) async throws -> Response<Operations.GetSearchAllLibrariesResponse> {
|
||||
return try await client.makeRequest(
|
||||
configureRequest: { configuration in
|
||||
try configureGetSearchAllLibrariesRequest(with: configuration, request: request)
|
||||
},
|
||||
handleResponse: handleGetSearchAllLibrariesResponse
|
||||
)
|
||||
}
|
||||
|
||||
public func getMetaDataByRatingKey(request: Operations.GetMetaDataByRatingKeyRequest) async throws -> Response<Operations.GetMetaDataByRatingKeyResponse> {
|
||||
return try await client.makeRequest(
|
||||
configureRequest: { configuration in
|
||||
@@ -181,6 +190,14 @@ private func configureGetSearchLibraryRequest(with configuration: URLRequestConf
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
private func configureGetSearchAllLibrariesRequest(with configuration: URLRequestConfiguration, request: Operations.GetSearchAllLibrariesRequest) throws {
|
||||
configuration.path = "/library/search"
|
||||
configuration.method = .get
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
private func configureGetMetaDataByRatingKeyRequest(with configuration: URLRequestConfiguration, request: Operations.GetMetaDataByRatingKeyRequest) throws {
|
||||
configuration.path = "/library/metadata/{ratingKey}"
|
||||
configuration.method = .get
|
||||
@@ -449,6 +466,38 @@ private func handleGetSearchLibraryResponse(response: Client.APIResponse) throws
|
||||
return .empty
|
||||
}
|
||||
|
||||
private func handleGetSearchAllLibrariesResponse(response: Client.APIResponse) throws -> Operations.GetSearchAllLibrariesResponse {
|
||||
let httpResponse = response.httpResponse
|
||||
|
||||
if httpResponse.statusCode == 200 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .object(try JSONDecoder().decode(Operations.GetSearchAllLibrariesResponseBody.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
} else if httpResponse.statusCode == 400 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .badRequest(try JSONDecoder().decode(Operations.GetSearchAllLibrariesBadRequest.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
} else if httpResponse.statusCode == 401 {
|
||||
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
|
||||
do {
|
||||
return .unauthorized(try JSONDecoder().decode(Operations.GetSearchAllLibrariesUnauthorized.self, from: data))
|
||||
} catch {
|
||||
throw ResponseHandlerError.failedToDecodeJSON(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return .empty
|
||||
}
|
||||
|
||||
private func handleGetMetaDataByRatingKeyResponse(response: Client.APIResponse) throws -> Operations.GetMetaDataByRatingKeyResponse {
|
||||
let httpResponse = response.httpResponse
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ private func configureGetBannerImageRequest(with configuration: URLRequestConfig
|
||||
configuration.method = .get
|
||||
configuration.pathParameterSerializable = request
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
@@ -93,6 +94,7 @@ private func configureGetThumbImageRequest(with configuration: URLRequestConfigu
|
||||
configuration.method = .get
|
||||
configuration.pathParameterSerializable = request
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ private func configureGetServerResourcesRequest(with configuration: URLRequestCo
|
||||
configuration.path = "/resources"
|
||||
configuration.method = .get
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
@@ -118,6 +119,7 @@ private func configureGetPinRequest(with configuration: URLRequestConfiguration,
|
||||
configuration.path = "/pins"
|
||||
configuration.method = .post
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
@@ -125,7 +127,7 @@ private func configureGetTokenByPinIdRequest(with configuration: URLRequestConfi
|
||||
configuration.path = "/pins/{pinID}"
|
||||
configuration.method = .get
|
||||
configuration.pathParameterSerializable = request
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ private func configureGetResizedPhotoRequest(with configuration: URLRequestConfi
|
||||
private func configureGetMediaProvidersRequest(with configuration: URLRequestConfiguration, request: Operations.GetMediaProvidersRequest) throws {
|
||||
configuration.path = "/media/providers"
|
||||
configuration.method = .get
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ private func configureGetWatchListRequest(with configuration: URLRequestConfigur
|
||||
configuration.method = .get
|
||||
configuration.pathParameterSerializable = request
|
||||
configuration.queryParameterSerializable = request
|
||||
configuration.headerParameterSerializable = request
|
||||
configuration.telemetryHeader = .userAgent
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user