mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 12:47:44 +00:00
Regeneration
This commit is contained in:
@@ -3,10 +3,10 @@ id: 5d77204e-e413-4fd0-a14a-bad3aee2247a
|
|||||||
management:
|
management:
|
||||||
docChecksum: a91eaf9ec1e6a3a6f4bf0571f5b18bae
|
docChecksum: a91eaf9ec1e6a3a6f4bf0571f5b18bae
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: 1.228.1
|
speakeasyVersion: 1.246.1
|
||||||
generationVersion: 2.292.0
|
generationVersion: 2.302.1
|
||||||
releaseVersion: 0.1.0
|
releaseVersion: 0.1.1
|
||||||
configChecksum: b2cfa34ed4663bdec9d08c57f8e59960
|
configChecksum: 37c5f191d3f2f642a81bb7a339bc3034
|
||||||
repoURL: https://github.com/LukeHagar/plexswift.git
|
repoURL: https://github.com/LukeHagar/plexswift.git
|
||||||
features:
|
features:
|
||||||
swift:
|
swift:
|
||||||
@@ -15,7 +15,7 @@ features:
|
|||||||
globalServerURLs: 2.82.1
|
globalServerURLs: 2.82.1
|
||||||
globals: 2.81.3
|
globals: 2.81.3
|
||||||
methodServerURLs: 3.0.1
|
methodServerURLs: 3.0.1
|
||||||
nameOverrides: 2.81.1
|
nameOverrides: 2.81.2
|
||||||
generatedFiles:
|
generatedFiles:
|
||||||
- Sources/Plexswift/internal/api/_ServerAPI.swift
|
- Sources/Plexswift/internal/api/_ServerAPI.swift
|
||||||
- Sources/Plexswift/internal/api/_MediaAPI.swift
|
- Sources/Plexswift/internal/api/_MediaAPI.swift
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ generation:
|
|||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
swift:
|
swift:
|
||||||
version: 0.1.0
|
version: 0.1.1
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
description: Swift Client SDK Generated by Speakeasy
|
description: Swift Client SDK Generated by Speakeasy
|
||||||
imports:
|
imports:
|
||||||
|
|||||||
26
Makefile
26
Makefile
@@ -1,26 +0,0 @@
|
|||||||
.PHONY: *
|
|
||||||
|
|
||||||
all: speakeasy
|
|
||||||
|
|
||||||
|
|
||||||
speakeasy: check-speakeasy
|
|
||||||
speakeasy generate sdk --lang swift -o . -s ./openapi.yaml
|
|
||||||
|
|
||||||
speakeasy-validate: check-speakeasy
|
|
||||||
speakeasy validate openapi -s ./openapi.yaml
|
|
||||||
|
|
||||||
openapi:
|
|
||||||
curl https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml > ./openapi.yaml
|
|
||||||
|
|
||||||
# This will replace the generation source in your workflow file with your local schema path
|
|
||||||
generate-from-local:
|
|
||||||
@if ! which sed >/dev/null; then \
|
|
||||||
echo "sed is not installed. Please install it using the following command:"; \
|
|
||||||
echo "For Ubuntu/Debian: apt-get install sed"; \
|
|
||||||
echo "For macOS: sed is pre-installed"; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
@sed -i '' '/openapi_docs: |/{n;s|-.*|- ./openapi.yaml|;}' ./.github/workflows/speakeasy_sdk_generation.yml
|
|
||||||
|
|
||||||
check-speakeasy:
|
|
||||||
@command -v speakeasy >/dev/null 2>&1 || { echo >&2 "speakeasy CLI is not installed. Please install before continuing."; exit 1; }
|
|
||||||
42
README.md
42
README.md
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
||||||
<a href="https://opensource.org/licenses/MIT">
|
<a href="https://opensource.org/licenses/MIT">
|
||||||
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
|
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
|
||||||
</a>
|
</a>
|
||||||

|

|
||||||

|

|
||||||
@@ -13,16 +13,8 @@ An Open API Spec for interacting with Plex.tv and Plex Servers
|
|||||||
|
|
||||||
The SDK supports iOS 13 and later.
|
The SDK supports iOS 13 and later.
|
||||||
|
|
||||||
|
|
||||||
## 🏗 **Welcome to your new SDK!** 🏗
|
|
||||||
|
|
||||||
It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
|
|
||||||
- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasyapi.dev/docs/customize-sdks)
|
|
||||||
- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
|
|
||||||
- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/productionize-sdks/publish-sdks)
|
|
||||||
- [ ] ✨ When ready to productionize, delete this section from the README
|
|
||||||
|
|
||||||
<!-- Start SDK Installation [installation] -->
|
<!-- Start SDK Installation [installation] -->
|
||||||
|
|
||||||
## SDK Installation
|
## SDK Installation
|
||||||
|
|
||||||
### Swift Package Manager
|
### Swift Package Manager
|
||||||
@@ -31,12 +23,14 @@ You can add `plexswift` to your project directly in Xcode `(File > Add Packages.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.1.0"))
|
.package(url: "https://github.com/LukeHagar/plexswift.git", .upToNextMajor(from: "0.1.1"))
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- End SDK Installation [installation] -->
|
<!-- End SDK Installation [installation] -->
|
||||||
|
|
||||||
<!-- Start SDK Example Usage [usage] -->
|
<!-- Start SDK Example Usage [usage] -->
|
||||||
|
|
||||||
## SDK Example Usage
|
## SDK Example Usage
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
@@ -62,24 +56,26 @@ case .empty:
|
|||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- End SDK Example Usage [usage] -->
|
<!-- End SDK Example Usage [usage] -->
|
||||||
|
|
||||||
<!-- Start Available Resources and Operations [operations] -->
|
<!-- Start Available Resources and Operations [operations] -->
|
||||||
## Available Resources and Operations
|
|
||||||
|
|
||||||
|
## Available Resources and Operations
|
||||||
|
|
||||||
<!-- End Available Resources and Operations [operations] -->
|
<!-- End Available Resources and Operations [operations] -->
|
||||||
|
|
||||||
<!-- Start Authentication [security] -->
|
<!-- Start Authentication [security] -->
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
### Global Security Schemes
|
### Global Security Schemes
|
||||||
|
|
||||||
The SDK supports the following security scheme globally through the `Shared.Security` type:
|
The SDK supports the following security scheme globally through the `Shared.Security` type:
|
||||||
|
|
||||||
| Name | Type | Scheme |
|
| Name | Type | Scheme |
|
||||||
| -------------- | -------------- | -------------- |
|
| -------------- | ------ | ------- |
|
||||||
| `.accessToken` | apiKey | API key |
|
| `.accessToken` | apiKey | API key |
|
||||||
|
|
||||||
You can set the appropriate security parameters by passing a `Shared.Security` value for the `security` parameter when initializing the `Client` instance. For example:
|
You can set the appropriate security parameters by passing a `Shared.Security` value for the `security` parameter when initializing the `Client` instance. For example:
|
||||||
|
|
||||||
@@ -104,27 +100,28 @@ case .empty:
|
|||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- End Authentication [security] -->
|
<!-- End Authentication [security] -->
|
||||||
|
|
||||||
<!-- Start Global Parameters [global-parameters] -->
|
<!-- Start Global Parameters [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.
|
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.
|
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
|
### Available Globals
|
||||||
|
|
||||||
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
|
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
|
||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
| ---- | ---- |:--------:| ----------- |
|
| --------------------- | ------ | :------: | ------------------------------------------------ |
|
||||||
| xPlexClientIdentifier | String | ✔️ | The unique identifier for the client application
|
| xPlexClientIdentifier | String | ✔️ | The unique identifier for the client application |
|
||||||
|
|
||||||
This is used to track the client application and its usage
|
This is used to track the client application and its usage
|
||||||
(UUID, serial number, or other number unique per device)
|
(UUID, serial number, or other number unique per device)
|
||||||
|
|
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@@ -136,7 +133,7 @@ let client = Client()
|
|||||||
|
|
||||||
let response = try await client.plex.getPin(
|
let response = try await client.plex.getPin(
|
||||||
request: Operations.GetPinRequest(
|
request: Operations.GetPinRequest(
|
||||||
strong: false,
|
strong: false,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -153,6 +150,7 @@ case .empty:
|
|||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- End Global Parameters [global-parameters] -->
|
<!-- End Global Parameters [global-parameters] -->
|
||||||
|
|
||||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ final class URLRequestBuilder: URLRequestConfiguration {
|
|||||||
urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type")
|
urlRequest.setValue(contentType, forHTTPHeaderField: "Content-Type")
|
||||||
}
|
}
|
||||||
|
|
||||||
urlRequest.setValue("speakeasy-sdk/swift 0.0.1 2.281.2 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
urlRequest.setValue("speakeasy-sdk/swift 0.1.0 2.292.0 0.0.3 plexswift", forHTTPHeaderField: telemetryHeader.headerName)
|
||||||
|
|
||||||
addSecurityParameters(to: &urlRequest)
|
addSecurityParameters(to: &urlRequest)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user