Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 535 Bytes

USAGE.md

File metadata and controls

26 lines (22 loc) · 535 Bytes
import Foundation
import Plexswift

let client = Client(security: .accessToken("<YOUR_API_KEY_HERE>"))

let response = try await client.server.getServerCapabilities()

switch response.data {
case .object(let object):
    // Handle response
    break
case .badRequest(let badRequest):
    // Handle response
    break
case .unauthorized(let unauthorized):
    // Handle response
    break
case .empty:
    // Handle empty response
    break
}