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.228.1
This commit is contained in:
51
README.md
51
README.md
@@ -31,7 +31,7 @@ You can add `plexswift` to your project directly in Xcode `(File > Add Packages.
|
||||
|
||||
```bash
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.0.2"))
|
||||
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.1.0"))
|
||||
]
|
||||
```
|
||||
<!-- End SDK Installation [installation] -->
|
||||
@@ -106,6 +106,55 @@ case .empty:
|
||||
```
|
||||
<!-- End Authentication [security] -->
|
||||
|
||||
<!-- Start 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.
|
||||
|
||||
For example, you can set `X-Plex-Client-Identifier` to `"<value>"` 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
|
||||
|
||||
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
|
||||
|
||||
| Name | Type | Required | Description |
|
||||
| ---- | ---- |:--------:| ----------- |
|
||||
| xPlexClientIdentifier | String | ✔️ | The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
(UUID, serial number, or other number unique per device)
|
||||
|
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```swift
|
||||
import Foundation
|
||||
import Plexswift
|
||||
|
||||
let client = Client()
|
||||
|
||||
let response = try await client.plex.getPin(
|
||||
request: Operations.GetPinRequest(
|
||||
strong: false,
|
||||
)
|
||||
)
|
||||
|
||||
switch response.data {
|
||||
case .twoHundredApplicationJsonObject(let twoHundredApplicationJsonObject):
|
||||
// Handle response
|
||||
break
|
||||
case .fourHundredApplicationJsonObject(let fourHundredApplicationJsonObject):
|
||||
// Handle response
|
||||
break
|
||||
case .empty:
|
||||
// Handle empty response
|
||||
break
|
||||
}
|
||||
|
||||
```
|
||||
<!-- End Global Parameters [global-parameters] -->
|
||||
|
||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||
|
||||
# Development
|
||||
|
||||
Reference in New Issue
Block a user