mirror of
https://github.com/LukeHagar/plexruby.git
synced 2025-12-07 12:47:45 +00:00
Plex
Overview
API Calls that perform operations directly against https://Plex.tv
Available Operations
get_pin
Retrieve a Pin from Plex.tv for authentication flows
Example Usage
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
res = s.plex.get_pin(x_plex_client_identifier="<value>", strong=false)
if ! res.two_hundred_application_json_object.nil?
# handle response
end
Parameters
| Parameter | 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) |
strong |
T::Boolean | ➖ | 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 |
server_url |
String | ➖ | An optional server URL to use. |
Response
T.nilable(::OpenApiSDK::Operations::GetPinResponse)
get_token
Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
Example Usage
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new
res = s.plex.get_token(pin_id="<value>", x_plex_client_identifier="<value>")
if res.status_code == 200
# handle response
end
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pin_id |
::String | ✔️ | The PinID to retrieve an access token for |
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) |
server_url |
String | ➖ | An optional server URL to use. |