ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.228.1

This commit is contained in:
speakeasybot
2024-03-29 16:37:24 +00:00
parent 8957a8d350
commit 5f55e68f22
43 changed files with 360 additions and 149 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: aa9449e7-c19d-411d-b8e2-f9c5fe982f6f
management:
docChecksum: e34dac84738ebf2d447ea2b9055a6eeb
docChecksum: a91eaf9ec1e6a3a6f4bf0571f5b18bae
docVersion: 0.0.3
speakeasyVersion: 1.227.0
generationVersion: 2.291.0
releaseVersion: 0.0.3
configChecksum: 76291a9089e3bdebd2b1c4ce0f83beee
speakeasyVersion: 1.228.1
generationVersion: 2.292.0
releaseVersion: 0.1.0
configChecksum: 5fbbc61076b94d002317a999a476fa6a
repoURL: https://github.com/LukeHagar/plexruby.git
repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexruby
@@ -16,6 +16,7 @@ features:
flattening: 2.81.1
globalSecurity: 2.81.6
globalServerURLs: 2.82.3
globals: 2.82.1
methodServerURLs: 2.82.1
nameOverrides: 2.81.1
generatedFiles:

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
ruby:
version: 0.0.3
version: 0.1.0
author: LukeHagar
description: Ruby Client SDK Generated by Speakeasy
imports:

View File

@@ -1,7 +1,7 @@
PATH
remote: .
specs:
plexruby (0.0.3)
plexruby (0.1.0)
faraday
faraday-multipart
rack

View File

@@ -25,7 +25,9 @@ gem specific_install https://github.com/LukeHagar/plexruby
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -185,10 +187,12 @@ The server URL can also be overridden on a per-operation basis, provided a serve
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
res = s.plex.get_pin(server_url: "https://plex.tv/api/v2", x_plex_client_identifier="<value>", strong=false)
res = s.plex.get_pin(server_url: "https://plex.tv/api/v2", strong=false, x_plex_client_identifier="<value>")
if ! res.two_hundred_application_json_object.nil?
# handle response
@@ -197,6 +201,46 @@ end
```
<!-- End Server Selection [server] -->
<!-- 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 `get_pin`. 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 |
| ---- | ---- |:--------:| ----------- |
| x_plex_client_identifier | ::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
```ruby
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
res = s.plex.get_pin(strong=false, x_plex_client_identifier="<value>")
if ! res.two_hundred_application_json_object.nil?
# handle response
end
```
<!-- End Global Parameters [global-parameters] -->
<!-- Placeholder for Future Speakeasy SDK Sections -->
# Development

View File

@@ -14,4 +14,12 @@ Based on:
- OpenAPI Doc
- Speakeasy CLI 1.227.0 (2.291.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [ruby v0.0.3] .
- [ruby v0.0.3] .
## 2024-03-29 16:36:43
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.228.1 (2.292.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [ruby v0.1.0] .

View File

@@ -3,7 +3,9 @@
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x_plex_client_identifier` | *::String* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
| `strong` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |
| `strong` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |
| `x_plex_client_identifier` | *T.nilable(::String)* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |

View File

@@ -6,4 +6,4 @@
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pin_id` | *::String* | :heavy_check_mark: | The PinID to retrieve an access token for |
| `x_plex_client_identifier` | *::String* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
| `x_plex_client_identifier` | *T.nilable(::String)* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |

View File

@@ -27,7 +27,9 @@ Get Server Activities
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -59,7 +61,9 @@ Cancel Server Activities
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -22,7 +22,9 @@ This endpoint provides the caller with a temporary token with the same access le
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -63,7 +65,9 @@ Note: requires Plex Media Server >= 1.15.4.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -24,7 +24,9 @@ Returns a list of butler tasks
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -61,7 +63,9 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -94,7 +98,9 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -131,7 +137,9 @@ This endpoint will attempt to start a single Butler task that is enabled in the
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -170,7 +178,9 @@ This endpoint will stop a currently running task by name, or remove it from the
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -21,7 +21,9 @@ Get Global Hubs filtered by the parameters provided.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -61,7 +63,9 @@ This endpoint will return a list of library specific hubs
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -30,7 +30,9 @@ This resource returns hash values for local files
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -70,7 +72,9 @@ This endpoint will return the recently added content.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -108,7 +112,9 @@ This allows a client to provide a rich interface around the media (e.g. allow so
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -179,7 +185,9 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -218,7 +226,9 @@ Delate a library using a specific section
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -276,7 +286,9 @@ Fetches details from a specific section of the library identified by a section k
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -316,7 +328,9 @@ This endpoint Refreshes the library.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -372,7 +386,9 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -412,7 +428,9 @@ This endpoint will return the metadata of a library item specified with the rati
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -451,7 +469,9 @@ This endpoint will return the children of of a library item specified with the r
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -490,7 +510,9 @@ This endpoint will return the on deck content.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -23,7 +23,9 @@ This endpoint will write a single-line log message, including a level and source
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -84,7 +86,9 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -127,7 +131,9 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -22,7 +22,9 @@ This will mark the provided media key as Played.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -60,7 +62,9 @@ This will mark the provided media key as Unplayed.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -99,7 +103,9 @@ This API command can be used to update the play progress of a media item.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -34,7 +34,9 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -79,7 +81,9 @@ Get All Playlists given the specified filters.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -120,7 +124,9 @@ Smart playlist details contain the `content` attribute. This is the content URI
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -159,7 +165,9 @@ This endpoint will delete a playlist
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -198,7 +206,9 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -242,7 +252,9 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -282,7 +294,9 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -322,7 +336,9 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -363,7 +379,9 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -21,10 +21,12 @@ Retrieve a Pin from Plex.tv for authentication flows
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
res = s.plex.get_pin(x_plex_client_identifier="<value>", strong=false)
res = s.plex.get_pin(strong=false, x_plex_client_identifier="<value>")
if ! res.two_hundred_application_json_object.nil?
# handle response
@@ -36,8 +38,8 @@ end
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x_plex_client_identifier` | *::String* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
| `strong` | *T::Boolean* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |
| `x_plex_client_identifier` | *::String* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. |
@@ -56,7 +58,9 @@ Retrieve an Access Token from Plex.tv after the Pin has already been authenticat
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
res = s.plex.get_token(pin_id="<value>", x_plex_client_identifier="<value>")
@@ -72,7 +76,7 @@ end
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pin_id` | *::String* | :heavy_check_mark: | The PinID to retrieve an access token for |
| `x_plex_client_identifier` | *::String* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
| `x_plex_client_identifier` | *::String* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. |

View File

@@ -34,7 +34,9 @@ This request is intended to be very fast, and called as the user types.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -78,7 +80,9 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -118,7 +122,9 @@ This will search the database for the string provided.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -27,7 +27,9 @@ Server Capabilities
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -59,7 +61,9 @@ Get Server Preferences
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -91,7 +95,9 @@ Get Available Clients
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -123,7 +129,9 @@ Get Devices
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -155,7 +163,9 @@ Get Server Identity
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -187,7 +197,9 @@ Returns MyPlex Account Information
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -220,7 +232,9 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -268,7 +282,9 @@ Get Server List
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -23,7 +23,9 @@ This will retrieve the "Now Playing" Information of the PMS.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -55,7 +57,9 @@ This will Retrieve a listing of all history views.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -87,7 +91,9 @@ Get Transcode Sessions
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -119,7 +125,9 @@ Stop a Transcode Session
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -20,7 +20,9 @@ This will return the media statistics for the server
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -23,7 +23,9 @@ Querying status of updates
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -55,7 +57,9 @@ Checking for updates
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -94,7 +98,9 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -21,7 +21,9 @@ Get the timeline for a media item
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
@@ -72,7 +74,9 @@ Begin a Universal Transcode Session
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "<value>",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",

View File

@@ -77,7 +77,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::CancelServerActivitiesRequest,
base_url,
'/activities/{activityUUID}',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'

View File

@@ -34,7 +34,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/security/token"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetTransientTokenRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetTransientTokenRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -74,7 +74,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/security/resources"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetSourceConnectionInformationRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetSourceConnectionInformationRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -146,7 +146,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::StartTaskRequest,
base_url,
'/butler/{taskName}',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'
@@ -188,7 +189,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::StopTaskRequest,
base_url,
'/butler/{taskName}',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'

View File

@@ -33,7 +33,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/hubs"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetGlobalHubsRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetGlobalHubsRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -81,10 +81,11 @@ module OpenApiSDK
::OpenApiSDK::Operations::GetLibraryHubsRequest,
base_url,
'/hubs/sections/{sectionId}',
request
request,
@sdk_configuration.globals
)
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetLibraryHubsRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetLibraryHubsRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -33,7 +33,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/library/hashes"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetFileHashRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetFileHashRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -194,10 +194,11 @@ module OpenApiSDK
::OpenApiSDK::Operations::GetLibraryRequest,
base_url,
'/library/sections/{sectionId}',
request
request,
@sdk_configuration.globals
)
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetLibraryRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetLibraryRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -242,7 +243,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::DeleteLibraryRequest,
base_url,
'/library/sections/{sectionId}',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'
@@ -304,7 +306,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::GetLibraryItemsRequest,
base_url,
'/library/sections/{sectionId}/{tag}',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'
@@ -345,7 +348,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::RefreshLibraryRequest,
base_url,
'/library/sections/{sectionId}/refresh',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'
@@ -405,10 +409,11 @@ module OpenApiSDK
::OpenApiSDK::Operations::SearchLibraryRequest,
base_url,
'/library/sections/{sectionId}/search',
request
request,
@sdk_configuration.globals
)
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::SearchLibraryRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::SearchLibraryRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -448,7 +453,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::GetMetadataRequest,
base_url,
'/library/metadata/{ratingKey}',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'
@@ -495,7 +501,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::GetMetadataChildrenRequest,
base_url,
'/library/metadata/{ratingKey}/children',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'

View File

@@ -35,7 +35,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/log"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::LogLineRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::LogLineRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -32,7 +32,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/:/scrobble"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::MarkPlayedRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::MarkPlayedRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -70,7 +70,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/:/unscrobble"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::MarkUnplayedRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::MarkUnplayedRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -111,7 +111,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/:/progress"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::UpdatePlayProgressRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::UpdatePlayProgressRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -14,22 +14,22 @@ module OpenApiSDK
class GetPinRequest < ::OpenApiSDK::Utils::FieldAugmented
extend T::Sig
# 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)
#
field :x_plex_client_identifier, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
# Determines the kind of code returned by the API call
# Strong codes are used for Pin authentication flows
# Non-Strong codes are used for `Plex.tv/link`
#
field :strong, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'strong', 'style': 'form', 'explode': true } }
# 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)
#
field :x_plex_client_identifier, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
sig { params(x_plex_client_identifier: ::String, strong: T.nilable(T::Boolean)).void }
def initialize(x_plex_client_identifier: nil, strong: nil)
@x_plex_client_identifier = x_plex_client_identifier
sig { params(strong: T.nilable(T::Boolean), x_plex_client_identifier: T.nilable(::String)).void }
def initialize(strong: nil, x_plex_client_identifier: nil)
@strong = strong
@x_plex_client_identifier = x_plex_client_identifier
end
end
end

View File

@@ -20,10 +20,10 @@ module OpenApiSDK
# This is used to track the client application and its usage
# (UUID, serial number, or other number unique per device)
#
field :x_plex_client_identifier, ::String, { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
field :x_plex_client_identifier, T.nilable(::String), { 'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': false } }
sig { params(pin_id: ::String, x_plex_client_identifier: ::String).void }
sig { params(pin_id: ::String, x_plex_client_identifier: T.nilable(::String)).void }
def initialize(pin_id: nil, x_plex_client_identifier: nil)
@pin_id = pin_id
@x_plex_client_identifier = x_plex_client_identifier

View File

@@ -34,7 +34,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/playlists"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::CreatePlaylistRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::CreatePlaylistRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -78,7 +78,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/playlists"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetPlaylistsRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetPlaylistsRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -125,7 +125,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::GetPlaylistRequest,
base_url,
'/playlists/{playlistID}',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'
@@ -172,7 +173,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::DeletePlaylistRequest,
base_url,
'/playlists/{playlistID}',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'
@@ -216,10 +218,11 @@ module OpenApiSDK
::OpenApiSDK::Operations::UpdatePlaylistRequest,
base_url,
'/playlists/{playlistID}',
request
request,
@sdk_configuration.globals
)
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::UpdatePlaylistRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::UpdatePlaylistRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -264,10 +267,11 @@ module OpenApiSDK
::OpenApiSDK::Operations::GetPlaylistContentsRequest,
base_url,
'/playlists/{playlistID}/items',
request
request,
@sdk_configuration.globals
)
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetPlaylistContentsRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetPlaylistContentsRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -313,7 +317,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::ClearPlaylistContentsRequest,
base_url,
'/playlists/{playlistID}/items',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'
@@ -358,10 +363,11 @@ module OpenApiSDK
::OpenApiSDK::Operations::AddPlaylistContentsRequest,
base_url,
'/playlists/{playlistID}/items',
request
request,
@sdk_configuration.globals
)
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::AddPlaylistContentsRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::AddPlaylistContentsRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -406,7 +412,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/playlists/upload"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::UploadPlaylistRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::UploadPlaylistRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -30,21 +30,21 @@ module OpenApiSDK
end
sig { params(x_plex_client_identifier: ::String, strong: T.nilable(T::Boolean), server_url: T.nilable(String)).returns(::OpenApiSDK::Operations::GetPinResponse) }
def get_pin(x_plex_client_identifier, strong = nil, server_url = nil)
sig { params(strong: T.nilable(T::Boolean), x_plex_client_identifier: T.nilable(::String), server_url: T.nilable(String)).returns(::OpenApiSDK::Operations::GetPinResponse) }
def get_pin(strong = nil, x_plex_client_identifier = nil, server_url = nil)
# get_pin - Get a Pin
# Retrieve a Pin from Plex.tv for authentication flows
request = ::OpenApiSDK::Operations::GetPinRequest.new(
x_plex_client_identifier: x_plex_client_identifier,
strong: strong
strong: strong,
x_plex_client_identifier: x_plex_client_identifier
)
base_url = Utils.template_url(GET_PIN_SERVERS[0], {
})
base_url = server_url if !server_url.nil?
url = "#{base_url}/pins"
headers = Utils.get_headers(request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetPinRequest, request)
headers = Utils.get_headers(request, @sdk_configuration.globals)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetPinRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -73,8 +73,8 @@ module OpenApiSDK
end
sig { params(pin_id: ::String, x_plex_client_identifier: ::String, server_url: T.nilable(String)).returns(::OpenApiSDK::Operations::GetTokenResponse) }
def get_token(pin_id, x_plex_client_identifier, server_url = nil)
sig { params(pin_id: ::String, x_plex_client_identifier: T.nilable(::String), server_url: T.nilable(String)).returns(::OpenApiSDK::Operations::GetTokenResponse) }
def get_token(pin_id, x_plex_client_identifier = nil, server_url = nil)
# get_token - Get Access Token
# Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
request = ::OpenApiSDK::Operations::GetTokenRequest.new(
@@ -89,9 +89,10 @@ module OpenApiSDK
::OpenApiSDK::Operations::GetTokenRequest,
base_url,
'/pins/{pinID}',
request
request,
@sdk_configuration.globals
)
headers = Utils.get_headers(request)
headers = Utils.get_headers(request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -18,6 +18,7 @@ module OpenApiSDK
sig do
params(client: Faraday::Request,
security: T.nilable(Shared::Security),
x_plex_client_identifier: ::String,
protocol: T.nilable(::OpenApiSDK::ServerVariables::ServerProtocol),
ip: T.nilable(::String),
port: T.nilable(::String),
@@ -27,6 +28,7 @@ module OpenApiSDK
end
def initialize(client: nil,
security: nil,
x_plex_client_identifier: nil,
protocol: nil,
ip: nil,
port: nil,
@@ -37,6 +39,7 @@ module OpenApiSDK
## Instantiates the SDK configuring it with the provided parameters.
# @param [Faraday::Request] client The faraday HTTP client to use for all operations
# @param [Shared::Security] security The security details required for authentication
# @param [::String] x_plex_client_identifier: Configures the x_plex_client_identifier parameter for all supported operations
# @param [T.nilable(::OpenApiSDK::ServerVariables::ServerProtocol)] protocol: Allows setting the protocol variable for url substitution
# @param [T.nilable(::String)] ip: Allows setting the ip variable for url substitution
# @param [T.nilable(::String)] port: Allows setting the port variable for url substitution
@@ -68,7 +71,19 @@ module OpenApiSDK
},
]
@sdk_configuration = SDKConfiguration.new(client, security, server_url, server_idx, server_params)
globals = {
'parameters': {
'queryParam': {
},
'pathParam': {
},
'header': {
'x_plex_client_identifier': x_plex_client_identifier
}
}
}
@sdk_configuration = SDKConfiguration.new(client, security, server_url, server_idx, server_params, globals)
init_sdks
end

View File

@@ -23,6 +23,7 @@ module OpenApiSDK
field :server_url, T.nilable(String)
field :server_idx, T.nilable(Integer)
field :server_params, Array[Hash[Symbol, String]], { 'default_factory': Array}
field :globals, Hash[Symbol, Hash[Symbol, Hash[Symbol, Object]]]
field :language, String
field :openapi_doc_version, String
field :sdk_version, String
@@ -30,19 +31,20 @@ module OpenApiSDK
field :user_agent, String
sig { params(client: Faraday::Connection, security: T.nilable(::OpenApiSDK::Shared::Security), server_url: T.nilable(String), server_idx: T.nilable(Integer), server_params: T::Array[String]).void }
def initialize(client, security, server_url, server_idx, server_params)
sig { params(client: Faraday::Connection, security: T.nilable(::OpenApiSDK::Shared::Security), server_url: T.nilable(String), server_idx: T.nilable(Integer), server_params: T::Array[String], globals: T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]]).void }
def initialize(client, security, server_url, server_idx, server_params, globals)
@client = client
@server_url = server_url
@server_idx = server_idx.nil? ? 0 : server_idx
raise StandardError, "Invalid server index #{server_idx}" if @server_idx.negative? || @server_idx >= SERVERS.length
@server_params = server_params
@security = security
@globals = globals.nil? ? {} : globals
@language = 'ruby'
@openapi_doc_version = '0.0.3'
@sdk_version = '0.0.3'
@gen_version = '2.291.0'
@user_agent = 'speakeasy-sdk/ruby 0.0.3 2.291.0 0.0.3 plexruby'
@sdk_version = '0.1.0'
@gen_version = '2.292.0'
@user_agent = 'speakeasy-sdk/ruby 0.1.0 2.292.0 0.0.3 plexruby'
end
sig { returns([String, T::Hash[Symbol, String]]) }

View File

@@ -46,7 +46,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/hubs/search"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::PerformSearchRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::PerformSearchRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -90,7 +90,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/hubs/search/voice"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::PerformVoiceSearchRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::PerformVoiceSearchRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -128,7 +128,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/search"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetSearchResultsRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetSearchResultsRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -251,7 +251,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/photo/:/transcode"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetResizedPhotoRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetResizedPhotoRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -145,7 +145,8 @@ module OpenApiSDK
::OpenApiSDK::Operations::StopTranscodeSessionRequest,
base_url,
'/transcode/sessions/{sessionKey}',
request
request,
@sdk_configuration.globals
)
headers = {}
headers['Accept'] = 'application/json'

View File

@@ -32,7 +32,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/statistics/media"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetStatisticsRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetStatisticsRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -70,7 +70,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/updater/check"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::CheckForUpdatesRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::CheckForUpdatesRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -110,7 +110,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/updater/apply"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::ApplyUpdatesRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::ApplyUpdatesRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -28,7 +28,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/:/timeline"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetTimelineRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetTimelineRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent
@@ -62,7 +62,7 @@ module OpenApiSDK
base_url = Utils.template_url(url, params)
url = "#{base_url}/video/:/transcode/universal/start.mpd"
headers = {}
query_params = Utils.get_query_params(::OpenApiSDK::Operations::StartUniversalTranscodeRequest, request)
query_params = Utils.get_query_params(::OpenApiSDK::Operations::StartUniversalTranscodeRequest, request, @sdk_configuration.globals)
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

View File

@@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__)
Gem::Specification.new do |s|
s.name = 'plexruby'
s.version = '0.0.3'
s.version = '0.1.0'
s.platform = Gem::Platform::RUBY
s.licenses = ['Apache-2.0']
s.summary = ''