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.513.2
This commit is contained in:
29
README.md
29
README.md
@@ -190,13 +190,34 @@ var res = await sdk.Server.GetServerCapabilitiesAsync();
|
||||
### Server Variables
|
||||
|
||||
The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following parameters are available when initializing the SDK client instance:
|
||||
* `protocol: ServerProtocol`
|
||||
* `ip: string`
|
||||
* `port: string`
|
||||
|
||||
| Variable | Parameter | Supported Values | Default | Description |
|
||||
| ---------- | ------------------------------------------------------- | -------------------------- | --------------- | ---------------------------------------------- |
|
||||
| `protocol` | `protocol: LukeHagar.PlexAPI.SDK.Models.ServerProtocol` | - `"http"`<br/>- `"https"` | `"https"` | The protocol to use for the server connection |
|
||||
| `ip` | `ip: string` | string | `"10.10.10.47"` | The IP address or hostname of your Plex Server |
|
||||
| `port` | `port: string` | string | `"32400"` | The port of your Plex Server |
|
||||
|
||||
#### Example
|
||||
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
var sdk = new PlexAPI(
|
||||
protocol: "https",
|
||||
ip: "e0c3:bcc0:6bac:dccc:c4ec:34b1:ca98:4cb9",
|
||||
port: "40311",
|
||||
accessToken: "<YOUR_API_KEY_HERE>"
|
||||
);
|
||||
|
||||
var res = await sdk.Server.GetServerCapabilitiesAsync();
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
### Override Server URL Per-Client
|
||||
|
||||
The default server can also be overridden globally by passing a URL to the `serverUrl: string` optional parameter when initializing the SDK client instance. For example:
|
||||
The default server can be overridden globally by passing a URL to the `serverUrl: string` optional parameter when initializing the SDK client instance. For example:
|
||||
```csharp
|
||||
using LukeHagar.PlexAPI.SDK;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
|
||||
Reference in New Issue
Block a user