Files
plexruby/docs/sdks/plextv/README.md

5.0 KiB
Raw Permalink Blame History

PlexTv

Available Operations

get_pin

Retrieve a Pin from Plex.tv for authentication flows

Example Usage

require_relative plexruby


s = ::OpenApiSDK::PlexAPI.new
s.config_security(
  security=Shared::Security.new(
    access_token="<YOUR_API_KEY_HERE>",
  )
)

    
res = s.plex_tv.get_pin(x_plex_client_identifier="string", strong=false)

if ! res.two_hundred_application_json_object.nil?
  # handle response
end

Parameters

Parameter Type Required Description
x_plex_client_identifier String ✔️ Plex Authentication Token
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(Operations::GetPinResponse)

get_token

Retrieve an Access Token from Plex.tv after the Pin has already been authenticated

Example Usage

require_relative plexruby


s = ::OpenApiSDK::PlexAPI.new
s.config_security(
  security=Shared::Security.new(
    access_token="<YOUR_API_KEY_HERE>",
  )
)

    
res = s.plex_tv.get_token(pin_id="string", x_plex_client_identifier="string")

if res.status == 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 ✔️ Plex Authentication Token
server_url String An optional server URL to use.

Response

T.nilable(Operations::GetTokenResponse)