mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0
This commit is contained in:
64
README.md
64
README.md
@@ -261,69 +261,6 @@ var res = await sdk.Server.GetServerCapabilitiesAsync();
|
||||
```
|
||||
<!-- End Authentication [security] -->
|
||||
|
||||
<!-- Start Retries [retries] -->
|
||||
## Retries
|
||||
|
||||
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
|
||||
|
||||
To change the default retry strategy for a single API call, simply pass a `RetryConfig` to the call:
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
clientName: "Plex for Roku",
|
||||
clientVersion: "2.4.1",
|
||||
platform: "Roku",
|
||||
deviceNickname: "Roku 3"
|
||||
);
|
||||
|
||||
var res = await sdk.Server.GetServerCapabilitiesAsync(retryConfig: new RetryConfig(
|
||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
||||
backoff: new BackoffStrategy(
|
||||
initialIntervalMs: 1L,
|
||||
maxIntervalMs: 50L,
|
||||
maxElapsedTimeMs: 100L,
|
||||
exponent: 1.1
|
||||
),
|
||||
retryConnectionErrors: false
|
||||
));
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
If you'd like to override the default retry strategy for all operations that support retries, you can use the `RetryConfig` optional parameter when intitializing the SDK:
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
retryConfig: new RetryConfig(
|
||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
||||
backoff: new BackoffStrategy(
|
||||
initialIntervalMs: 1L,
|
||||
maxIntervalMs: 50L,
|
||||
maxElapsedTimeMs: 100L,
|
||||
exponent: 1.1
|
||||
),
|
||||
retryConnectionErrors: false
|
||||
),
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
clientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
clientName: "Plex for Roku",
|
||||
clientVersion: "2.4.1",
|
||||
platform: "Roku",
|
||||
deviceNickname: "Roku 3"
|
||||
);
|
||||
|
||||
var res = await sdk.Server.GetServerCapabilitiesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
<!-- End Retries [retries] -->
|
||||
|
||||
<!-- Start Error Handling [errors] -->
|
||||
## Error Handling
|
||||
|
||||
@@ -427,7 +364,6 @@ The following SDKs are generated from the OpenAPI Specification. They are automa
|
||||
* [SDK Installation](#sdk-installation)
|
||||
* [SDK Example Usage](#sdk-example-usage)
|
||||
* [Available Resources and Operations](#available-resources-and-operations)
|
||||
* [Retries](#retries)
|
||||
* [Error Handling](#error-handling)
|
||||
* [Server Selection](#server-selection)
|
||||
* [Authentication](#authentication)
|
||||
|
||||
Reference in New Issue
Block a user