regenerated with newest spec, reconfigured actions and adding publishing

This commit is contained in:
Luke Hagar
2024-09-16 15:42:38 +00:00
parent fa4cfa3643
commit b689f4fe66
1660 changed files with 29288 additions and 15630 deletions

View File

@@ -1,6 +1,5 @@
# Activities
## Overview
Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
@@ -27,11 +26,11 @@ Get Server Activities
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -39,16 +38,17 @@ s.config_security(
res = s.activities.get_server_activities()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetServerActivitiesResponse)](../../models/operations/getserveractivitiesresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetServerActivitiesResponse)](../../models/operations/getserveractivitiesresponse.md)**
## cancel_server_activities
@@ -61,11 +61,11 @@ Cancel Server Activities
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -85,8 +85,8 @@ end
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
| `activity_uuid` | *::String* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e |
### Response
**[T.nilable(::OpenApiSDK::Operations::CancelServerActivitiesResponse)](../../models/operations/cancelserveractivitiesresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::CancelServerActivitiesResponse)](../../models/operations/cancelserveractivitiesresponse.md)**

View File

@@ -1,6 +1,5 @@
# Authentication
## Overview
API Calls regarding authentication for Plex Media Server
@@ -8,8 +7,10 @@ API Calls regarding authentication for Plex Media Server
### Available Operations
* [get_transient_token](#get_transient_token) - Get a Transient Token.
* [get_transient_token](#get_transient_token) - Get a Transient Token
* [get_source_connection_information](#get_source_connection_information) - Get Source Connection Information
* [get_token_details](#get_token_details) - Get Token Details
* [post_users_sign_in_data](#post_users_sign_in_data) - Get User Sign In Data
## get_transient_token
@@ -22,17 +23,17 @@ This endpoint provides the caller with a temporary token with the same access le
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.authentication.get_transient_token(type=::OpenApiSDK::Operations::GetTransientTokenQueryParamType::DELEGATION, scope=::OpenApiSDK::Operations::Scope::ALL)
res = s.authentication.get_transient_token(type=::PlexRubySDK::Operations::GetTransientTokenQueryParamType::DELEGATION, scope=::PlexRubySDK::Operations::Scope::ALL)
if res.status_code == 200
# handle response
@@ -42,15 +43,16 @@ end
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `type` | [::OpenApiSDK::Operations::GetTransientTokenQueryParamType](../../models/operations/gettransienttokenqueryparamtype.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. |
| `scope` | [::OpenApiSDK::Operations::Scope](../../models/operations/scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. |
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `type` | [::PlexRubySDK::Operations::GetTransientTokenQueryParamType](../../models/operations/gettransienttokenqueryparamtype.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. |
| `scope` | [::PlexRubySDK::Operations::Scope](../../models/operations/scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetTransientTokenResponse)](../../models/operations/gettransienttokenresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetTransientTokenResponse)](../../models/operations/gettransienttokenresponse.md)**
## get_source_connection_information
@@ -65,11 +67,11 @@ Note: requires Plex Media Server >= 1.15.4.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -89,8 +91,91 @@ end
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| `source` | *::String* | :heavy_check_mark: | The source identifier with an included prefix. | server://client-identifier |
### Response
**[T.nilable(::PlexRubySDK::Operations::GetSourceConnectionInformationResponse)](../../models/operations/getsourceconnectioninformationresponse.md)**
## get_token_details
Get the User data from the provided X-Plex-Token
### Example Usage
```ruby
require 'plexruby'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.authentication.get_token_details()
if ! res.user_plex_account.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetSourceConnectionInformationResponse)](../../models/operations/getsourceconnectioninformationresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetTokenDetailsResponse)](../../models/operations/gettokendetailsresponse.md)**
## post_users_sign_in_data
Sign in user with username and password and return user data with Plex authentication token
### Example Usage
```ruby
require 'plexruby'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
res = s.authentication.post_users_sign_in_data(x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", request_body=::PlexRubySDK::Operations::PostUsersSignInDataRequestBody.new(
login: "username@email.com",
password: "password123",
verification_code: "123456",
))
if ! res.user_plex_account.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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/> | gcgzw5rz2xovp84b4vha3a40 |
| `request_body` | [::PlexRubySDK::Operations::PostUsersSignInDataRequestBody](../../models/operations/postuserssignindatarequestbody.md) | :heavy_minus_sign: | Login credentials | |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
**[T.nilable(::PlexRubySDK::Operations::PostUsersSignInDataResponse)](../../models/operations/postuserssignindataresponse.md)**

View File

@@ -1,6 +1,5 @@
# Butler
## Overview
Butler is the task manager of the Plex Media Server Ecosystem.
@@ -24,11 +23,11 @@ Returns a list of butler tasks
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -36,16 +35,17 @@ s.config_security(
res = s.butler.get_butler_tasks()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetButlerTasksResponse)](../../models/operations/getbutlertasksresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetButlerTasksResponse)](../../models/operations/getbutlertasksresponse.md)**
## start_all_tasks
@@ -63,11 +63,11 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -81,10 +81,11 @@ end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::StartAllTasksResponse)](../../models/operations/startalltasksresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::StartAllTasksResponse)](../../models/operations/startalltasksresponse.md)**
## stop_all_tasks
@@ -98,11 +99,11 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -116,10 +117,11 @@ end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::StopAllTasksResponse)](../../models/operations/stopalltasksresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::StopAllTasksResponse)](../../models/operations/stopalltasksresponse.md)**
## start_task
@@ -137,17 +139,17 @@ This endpoint will attempt to start a single Butler task that is enabled in the
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.butler.start_task(task_name=::OpenApiSDK::Operations::TaskName::CLEAN_OLD_BUNDLES)
res = s.butler.start_task(task_name=::PlexRubySDK::Operations::TaskName::CLEAN_OLD_BUNDLES)
if res.status_code == 200
# handle response
@@ -157,14 +159,15 @@ end
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `task_name` | [::OpenApiSDK::Operations::TaskName](../../models/operations/taskname.md) | :heavy_check_mark: | the name of the task to be started. |
| Parameter | Type | Required | Description |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `task_name` | [::PlexRubySDK::Operations::TaskName](../../models/operations/taskname.md) | :heavy_check_mark: | the name of the task to be started. |
### Response
**[T.nilable(::OpenApiSDK::Operations::StartTaskResponse)](../../models/operations/starttaskresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::StartTaskResponse)](../../models/operations/starttaskresponse.md)**
## stop_task
@@ -178,17 +181,17 @@ This endpoint will stop a currently running task by name, or remove it from the
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.butler.stop_task(task_name=::OpenApiSDK::Operations::PathParamTaskName::BACKUP_DATABASE)
res = s.butler.stop_task(task_name=::PlexRubySDK::Operations::PathParamTaskName::BACKUP_DATABASE)
if res.status_code == 200
# handle response
@@ -198,12 +201,12 @@ end
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `task_name` | [::OpenApiSDK::Operations::PathParamTaskName](../../models/operations/pathparamtaskname.md) | :heavy_check_mark: | The name of the task to be started. |
| Parameter | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `task_name` | [::PlexRubySDK::Operations::PathParamTaskName](../../models/operations/pathparamtaskname.md) | :heavy_check_mark: | The name of the task to be started. |
### Response
**[T.nilable(::OpenApiSDK::Operations::StopTaskResponse)](../../models/operations/stoptaskresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::StopTaskResponse)](../../models/operations/stoptaskresponse.md)**

View File

@@ -1,6 +1,5 @@
# Hubs
## Overview
Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
@@ -21,19 +20,19 @@ Get Global Hubs filtered by the parameters provided.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.hubs.get_global_hubs(count=1262.49, only_transient=::OpenApiSDK::Operations::OnlyTransient::ONE)
res = s.hubs.get_global_hubs(count=1262.49, only_transient=::PlexRubySDK::Operations::OnlyTransient::ONE)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -44,12 +43,13 @@ end
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `count` | *::Float* | :heavy_minus_sign: | The number of items to return with each hub. |
| `only_transient` | [::OpenApiSDK::Operations::OnlyTransient](../../models/operations/onlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). |
| `only_transient` | [::PlexRubySDK::Operations::OnlyTransient](../../models/operations/onlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetGlobalHubsResponse)](../../models/operations/getglobalhubsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetGlobalHubsResponse)](../../models/operations/getglobalhubsresponse.md)**
## get_library_hubs
@@ -63,19 +63,19 @@ This endpoint will return a list of library specific hubs
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.hubs.get_library_hubs(section_id=6728.76, count=9010.22, only_transient=::OpenApiSDK::Operations::QueryParamOnlyTransient::ZERO)
res = s.hubs.get_library_hubs(section_id=6728.76, count=9010.22, only_transient=::PlexRubySDK::Operations::QueryParamOnlyTransient::ZERO)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -87,10 +87,10 @@ end
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `section_id` | *::Float* | :heavy_check_mark: | the Id of the library to query |
| `count` | *::Float* | :heavy_minus_sign: | The number of items to return with each hub. |
| `only_transient` | [::OpenApiSDK::Operations::QueryParamOnlyTransient](../../models/operations/queryparamonlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). |
| `only_transient` | [::PlexRubySDK::Operations::QueryParamOnlyTransient](../../models/operations/queryparamonlytransient.md) | :heavy_minus_sign: | Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetLibraryHubsResponse)](../../models/operations/getlibraryhubsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetLibraryHubsResponse)](../../models/operations/getlibraryhubsresponse.md)**

View File

@@ -1,6 +1,5 @@
# Library
## Overview
API Calls interacting with Plex Media Server Libraries
@@ -10,13 +9,13 @@ API Calls interacting with Plex Media Server Libraries
* [get_file_hash](#get_file_hash) - Get Hash Value
* [get_recently_added](#get_recently_added) - Get Recently Added
* [get_libraries](#get_libraries) - Get All Libraries
* [get_library](#get_library) - Get Library Details
* [get_all_libraries](#get_all_libraries) - Get All Libraries
* [get_library_details](#get_library_details) - Get Library Details
* [delete_library](#delete_library) - Delete Library Section
* [get_library_items](#get_library_items) - Get Library Items
* [refresh_library](#refresh_library) - Refresh Library
* [search_library](#search_library) - Search Library
* [get_metadata](#get_metadata) - Get Items Metadata
* [get_refresh_library_metadata](#get_refresh_library_metadata) - Refresh Metadata Of The Library
* [get_search_library](#get_search_library) - Search Library
* [get_meta_data_by_rating_key](#get_meta_data_by_rating_key) - Get Metadata by RatingKey
* [get_metadata_children](#get_metadata_children) - Get Items Children
* [get_top_watched_content](#get_top_watched_content) - Get Top Watched Content
* [get_on_deck](#get_on_deck) - Get On Deck
@@ -31,11 +30,11 @@ This resource returns hash values for local files
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -56,10 +55,11 @@ end
| `url` | *::String* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 |
| `type` | *::Float* | :heavy_minus_sign: | Item type | |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetFileHashResponse)](../../models/operations/getfilehashresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetFileHashResponse)](../../models/operations/getfilehashresponse.md)**
## get_recently_added
@@ -73,31 +73,39 @@ This endpoint will return the recently added content.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.library.get_recently_added()
res = s.library.get_recently_added(x_plex_container_start=0, x_plex_container_size=50)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x_plex_container_start` | *::Integer* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.<br/>If the number of items exceeds the limit, the response will be paginated.<br/>By default this is 0<br/> | 0 |
| `x_plex_container_size` | *::Integer* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.<br/>If the number of items exceeds the limit, the response will be paginated.<br/>By default this is 50<br/> | 50 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetRecentlyAddedResponse)](../../models/operations/getrecentlyaddedresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetRecentlyAddedResponse)](../../models/operations/getrecentlyaddedresponse.md)**
## get_libraries
## get_all_libraries
A library section (commonly referred to as just a library) is a collection of media.
Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media.
@@ -113,31 +121,32 @@ This allows a client to provide a rich interface around the media (e.g. allow so
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.library.get_libraries()
res = s.library.get_all_libraries()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetLibrariesResponse)](../../models/operations/getlibrariesresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetAllLibrariesResponse)](../../models/operations/getalllibrariesresponse.md)**
## get_library
## get_library_details
## Library Details Endpoint
@@ -186,19 +195,19 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.library.get_library(section_id=1000.0, include_details=::OpenApiSDK::Operations::IncludeDetails::ZERO)
res = s.library.get_library_details(section_key=9518, include_details=::PlexRubySDK::Operations::IncludeDetails::ZERO)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -208,18 +217,19 @@ end
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `section_id` | *::Float* | :heavy_check_mark: | the Id of the library to query | 1000 |
| `include_details` | [::OpenApiSDK::Operations::IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
| `section_key` | *::Integer* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `include_details` | [::PlexRubySDK::Operations::IncludeDetails](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetLibraryResponse)](../../models/operations/getlibraryresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetLibraryDetailsResponse)](../../models/operations/getlibrarydetailsresponse.md)**
## delete_library
Delate a library using a specific section
Delete a library using a specific section id
### Example Usage
@@ -227,17 +237,17 @@ Delate a library using a specific section
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.library.delete_library(section_id=1000.0)
res = s.library.delete_library(section_key=9518)
if res.status_code == 200
# handle response
@@ -247,14 +257,15 @@ end
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `section_id` | *::Float* | :heavy_check_mark: | the Id of the library to query | 1000 |
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `section_key` | *::Integer* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
### Response
**[T.nilable(::OpenApiSDK::Operations::DeleteLibraryResponse)](../../models/operations/deletelibraryresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::DeleteLibraryResponse)](../../models/operations/deletelibraryresponse.md)**
## get_library_items
@@ -287,19 +298,29 @@ Fetches details from a specific section of the library identified by a section k
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.library.get_library_items(section_id="<value>", tag=::OpenApiSDK::Operations::Tag::GENRE, include_guids=1)
if ! res.two_hundred_application_json_object.nil?
req = ::PlexRubySDK::Operations::GetLibraryItemsRequest.new(
section_key: 9518,
tag: ::PlexRubySDK::Operations::Tag::EDITION,
include_guids: ::PlexRubySDK::Operations::IncludeGuids::ONE,
include_meta: ::PlexRubySDK::Operations::IncludeMeta::ONE,
type: ::PlexRubySDK::Operations::Type::TWO,
x_plex_container_start: 0,
x_plex_container_size: 50,
)
res = s.library.get_library_items(req)
if ! res.object.nil?
# handle response
end
@@ -307,21 +328,20 @@ end
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
| `section_id` | *::Object* | :heavy_check_mark: | the Id of the library to query | |
| `tag` | [::OpenApiSDK::Operations::Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | |
| `include_guids` | *::Integer* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `request` | [::PlexRubySDK::Operations::GetLibraryItemsRequest](../../models/operations/getlibraryitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetLibraryItemsResponse)](../../models/operations/getlibraryitemsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetLibraryItemsResponse)](../../models/operations/getlibraryitemsresponse.md)**
## refresh_library
This endpoint Refreshes the library.
## get_refresh_library_metadata
This endpoint Refreshes all the Metadata of the library.
### Example Usage
@@ -330,17 +350,17 @@ This endpoint Refreshes the library.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.library.refresh_library(section_id=934.16)
res = s.library.get_refresh_library_metadata(section_key=9518, force=::PlexRubySDK::Operations::Force::ONE)
if res.status_code == 200
# handle response
@@ -350,17 +370,19 @@ end
### Parameters
| Parameter | Type | Required | Description |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `section_id` | *::Float* | :heavy_check_mark: | the Id of the library to refresh |
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `section_key` | *::Integer* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `force` | [::PlexRubySDK::Operations::Force](../../models/operations/force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 |
### Response
**[T.nilable(::OpenApiSDK::Operations::RefreshLibraryResponse)](../../models/operations/refreshlibraryresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetRefreshLibraryMetadataResponse)](../../models/operations/getrefreshlibrarymetadataresponse.md)**
## search_library
## get_search_library
Search for content within a specific section of the library.
@@ -388,19 +410,19 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.library.search_library(section_id=933505, type=::OpenApiSDK::Operations::Type::FOUR)
res = s.library.get_search_library(section_key=9518, type=::PlexRubySDK::Operations::QueryParamType::TWO)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -408,18 +430,19 @@ end
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
| `section_id` | *::Integer* | :heavy_check_mark: | the Id of the library to query |
| `type` | [::OpenApiSDK::Operations::Type](../../models/operations/type.md) | :heavy_check_mark: | Plex content type to search for |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `section_key` | *::Integer* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `type` | [::PlexRubySDK::Operations::QueryParamType](../../models/operations/queryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.<br/>1 = movie<br/>2 = show<br/>3 = season<br/>4 = episode<br/>E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/> | 2 |
### Response
**[T.nilable(::OpenApiSDK::Operations::SearchLibraryResponse)](../../models/operations/searchlibraryresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetSearchLibraryResponse)](../../models/operations/getsearchlibraryresponse.md)**
## get_metadata
## get_meta_data_by_rating_key
This endpoint will return the metadata of a library item specified with the ratingKey.
@@ -430,19 +453,19 @@ This endpoint will return the metadata of a library item specified with the rati
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.library.get_metadata(rating_key=8382.31)
res = s.library.get_meta_data_by_rating_key(rating_key=9518)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -450,14 +473,15 @@ end
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `rating_key` | *::Float* | :heavy_check_mark: | the id of the library item to return the children of. |
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `rating_key` | *::Integer* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetMetadataResponse)](../../models/operations/getmetadataresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetMetaDataByRatingKeyResponse)](../../models/operations/getmetadatabyratingkeyresponse.md)**
## get_metadata_children
@@ -471,11 +495,11 @@ This endpoint will return the children of of a library item specified with the r
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -483,7 +507,7 @@ s.config_security(
res = s.library.get_metadata_children(rating_key=1539.14, include_elements="<value>")
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -496,10 +520,11 @@ end
| `rating_key` | *::Float* | :heavy_check_mark: | the id of the library item to return the children of. |
| `include_elements` | *::String* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)<br/> |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetMetadataChildrenResponse)](../../models/operations/getmetadatachildrenresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetMetadataChildrenResponse)](../../models/operations/getmetadatachildrenresponse.md)**
## get_top_watched_content
@@ -513,17 +538,17 @@ This endpoint will return the top watched content from libraries of a certain ty
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.library.get_top_watched_content(type=505531, include_guids=1)
res = s.library.get_top_watched_content(type=::PlexRubySDK::Operations::GetTopWatchedContentQueryParamType::TWO, include_guids=1)
if ! res.object.nil?
# handle response
@@ -533,15 +558,16 @@ end
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| `type` | *::Integer* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | |
| `include_guids` | *::Integer* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type` | [::PlexRubySDK::Operations::GetTopWatchedContentQueryParamType](../../models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.<br/>1 = movie<br/>2 = show<br/>3 = season<br/>4 = episode<br/>E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/> | 2 |
| `include_guids` | *::Integer* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetTopWatchedContentResponse)](../../models/operations/gettopwatchedcontentresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetTopWatchedContentResponse)](../../models/operations/gettopwatchedcontentresponse.md)**
## get_on_deck
@@ -555,11 +581,11 @@ This endpoint will return the on deck content.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -567,14 +593,14 @@ s.config_security(
res = s.library.get_on_deck()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetOnDeckResponse)](../../models/operations/getondeckresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetOnDeckResponse)](../../models/operations/getondeckresponse.md)**

View File

@@ -1,6 +1,5 @@
# Log
## Overview
Submit logs to the Log Handler for Plex Media Server
@@ -23,17 +22,17 @@ This endpoint will write a single-line log message, including a level and source
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.log.log_line(level=::OpenApiSDK::Operations::Level::THREE, message="Test log message", source="Postman")
res = s.log.log_line(level=::PlexRubySDK::Operations::Level::THREE, message="Test log message", source="Postman")
if res.status_code == 200
# handle response
@@ -45,14 +44,15 @@ end
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `level` | [::OpenApiSDK::Operations::Level](../../models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
| `level` | [::PlexRubySDK::Operations::Level](../../models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
| `message` | *::String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
| `source` | *::String* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
### Response
**[T.nilable(::OpenApiSDK::Operations::LogLineResponse)](../../models/operations/loglineresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::LogLineResponse)](../../models/operations/loglineresponse.md)**
## log_multi_line
@@ -86,11 +86,11 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -114,10 +114,11 @@ end
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
| `request` | [::String](../../models//.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[T.nilable(::OpenApiSDK::Operations::LogMultiLineResponse)](../../models/operations/logmultilineresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::LogMultiLineResponse)](../../models/operations/logmultilineresponse.md)**
## enable_paper_trail
@@ -131,11 +132,11 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -149,8 +150,8 @@ end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::EnablePaperTrailResponse)](../../models/operations/enablepapertrailresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::EnablePaperTrailResponse)](../../models/operations/enablepapertrailresponse.md)**

View File

@@ -1,6 +1,5 @@
# Media
## Overview
API Calls interacting with Plex Media Server Media
@@ -11,6 +10,8 @@ API Calls interacting with Plex Media Server Media
* [mark_played](#mark_played) - Mark Media Played
* [mark_unplayed](#mark_unplayed) - Mark Media Unplayed
* [update_play_progress](#update_play_progress) - Update Media Play Progress
* [get_banner_image](#get_banner_image) - Get Banner Image
* [get_thumb_image](#get_thumb_image) - Get Thumb Image
## mark_played
@@ -22,11 +23,11 @@ This will mark the provided media key as Played.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -46,10 +47,11 @@ end
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `key` | *::Float* | :heavy_check_mark: | The media key to mark as played | 59398 |
### Response
**[T.nilable(::OpenApiSDK::Operations::MarkPlayedResponse)](../../models/operations/markplayedresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::MarkPlayedResponse)](../../models/operations/markplayedresponse.md)**
## mark_unplayed
@@ -62,11 +64,11 @@ This will mark the provided media key as Unplayed.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -86,10 +88,11 @@ end
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `key` | *::Float* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 |
### Response
**[T.nilable(::OpenApiSDK::Operations::MarkUnplayedResponse)](../../models/operations/markunplayedresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::MarkUnplayedResponse)](../../models/operations/markunplayedresponse.md)**
## update_play_progress
@@ -103,17 +106,17 @@ This API command can be used to update the play progress of a media item.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.media.update_play_progress(key="<value>", time=90000.0, state="played")
res = s.media.update_play_progress(key="<key>", time=90000.0, state="played")
if res.status_code == 200
# handle response
@@ -129,8 +132,108 @@ end
| `time` | *::Float* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 |
| `state` | *::String* | :heavy_check_mark: | The playback state of the media item. | played |
### Response
**[T.nilable(::PlexRubySDK::Operations::UpdatePlayProgressResponse)](../../models/operations/updateplayprogressresponse.md)**
## get_banner_image
Gets the banner image of the media item
### Example Usage
```ruby
require 'plexruby'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
req = ::PlexRubySDK::Operations::GetBannerImageRequest.new(
rating_key: 9518,
width: 396,
height: 396,
min_size: 1,
upscale: 1,
x_plex_token: "CV5xoxjTpFKUzBTShsaf",
)
res = s.media.get_banner_image(req)
if ! res.bytes.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `request` | [::PlexRubySDK::Operations::GetBannerImageRequest](../../models/operations/getbannerimagerequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[T.nilable(::OpenApiSDK::Operations::UpdatePlayProgressResponse)](../../models/operations/updateplayprogressresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetBannerImageResponse)](../../models/operations/getbannerimageresponse.md)**
## get_thumb_image
Gets the thumbnail image of the media item
### Example Usage
```ruby
require 'plexruby'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
req = ::PlexRubySDK::Operations::GetThumbImageRequest.new(
rating_key: 9518,
width: 396,
height: 396,
min_size: 1,
upscale: 1,
x_plex_token: "CV5xoxjTpFKUzBTShsaf",
)
res = s.media.get_thumb_image(req)
if ! res.bytes.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `request` | [::PlexRubySDK::Operations::GetThumbImageRequest](../../models/operations/getthumbimagerequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[T.nilable(::PlexRubySDK::Operations::GetThumbImageResponse)](../../models/operations/getthumbimageresponse.md)**

View File

@@ -1,6 +1,5 @@
# Playlists
## Overview
Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
@@ -34,26 +33,26 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
req = ::OpenApiSDK::Operations::CreatePlaylistRequest.new(
req = ::PlexRubySDK::Operations::CreatePlaylistRequest.new(
title: "<value>",
type: ::OpenApiSDK::Operations::QueryParamType::PHOTO,
smart: ::OpenApiSDK::Operations::Smart::ONE,
type: ::PlexRubySDK::Operations::CreatePlaylistQueryParamType::PHOTO,
smart: ::PlexRubySDK::Operations::Smart::ONE,
uri: "https://inborn-brochure.biz",
)
res = s.playlists.create_playlist(req)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -61,14 +60,15 @@ end
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `request` | [::OpenApiSDK::Operations::CreatePlaylistRequest](../../models/operations/createplaylistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `request` | [::PlexRubySDK::Operations::CreatePlaylistRequest](../../models/operations/createplaylistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[T.nilable(::OpenApiSDK::Operations::CreatePlaylistResponse)](../../models/operations/createplaylistresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::CreatePlaylistResponse)](../../models/operations/createplaylistresponse.md)**
## get_playlists
@@ -81,19 +81,19 @@ Get All Playlists given the specified filters.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.playlists.get_playlists(playlist_type=::OpenApiSDK::Operations::PlaylistType::AUDIO, smart=::OpenApiSDK::Operations::QueryParamSmart::ZERO)
res = s.playlists.get_playlists(playlist_type=::PlexRubySDK::Operations::PlaylistType::AUDIO, smart=::PlexRubySDK::Operations::QueryParamSmart::ZERO)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -101,15 +101,16 @@ end
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `playlist_type` | [::OpenApiSDK::Operations::PlaylistType](../../models/operations/playlisttype.md) | :heavy_minus_sign: | limit to a type of playlist. |
| `smart` | [::OpenApiSDK::Operations::QueryParamSmart](../../models/operations/queryparamsmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). |
| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `playlist_type` | [::PlexRubySDK::Operations::PlaylistType](../../models/operations/playlisttype.md) | :heavy_minus_sign: | limit to a type of playlist. |
| `smart` | [::PlexRubySDK::Operations::QueryParamSmart](../../models/operations/queryparamsmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetPlaylistsResponse)](../../models/operations/getplaylistsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetPlaylistsResponse)](../../models/operations/getplaylistsresponse.md)**
## get_playlist
@@ -124,11 +125,11 @@ Smart playlist details contain the `content` attribute. This is the content URI
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -136,7 +137,7 @@ s.config_security(
res = s.playlists.get_playlist(playlist_id=4109.48)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -148,10 +149,11 @@ end
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
| `playlist_id` | *::Float* | :heavy_check_mark: | the ID of the playlist |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetPlaylistResponse)](../../models/operations/getplaylistresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetPlaylistResponse)](../../models/operations/getplaylistresponse.md)**
## delete_playlist
@@ -165,11 +167,11 @@ This endpoint will delete a playlist
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -189,10 +191,11 @@ end
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
| `playlist_id` | *::Float* | :heavy_check_mark: | the ID of the playlist |
### Response
**[T.nilable(::OpenApiSDK::Operations::DeletePlaylistResponse)](../../models/operations/deleteplaylistresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::DeletePlaylistResponse)](../../models/operations/deleteplaylistresponse.md)**
## update_playlist
@@ -206,11 +209,11 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -232,10 +235,11 @@ end
| `title` | *::String* | :heavy_minus_sign: | name of the playlist |
| `summary` | *::String* | :heavy_minus_sign: | summary description of the playlist |
### Response
**[T.nilable(::OpenApiSDK::Operations::UpdatePlaylistResponse)](../../models/operations/updateplaylistresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::UpdatePlaylistResponse)](../../models/operations/updateplaylistresponse.md)**
## get_playlist_contents
@@ -252,19 +256,19 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.playlists.get_playlist_contents(playlist_id=5004.46, type=9403.59)
res = s.playlists.get_playlist_contents(playlist_id=5004.46, type=::PlexRubySDK::Operations::GetPlaylistContentsQueryParamType::TWO)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -272,15 +276,16 @@ end
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- |
| `playlist_id` | *::Float* | :heavy_check_mark: | the ID of the playlist |
| `type` | *::Float* | :heavy_check_mark: | the metadata type of the item to return |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `playlist_id` | *::Float* | :heavy_check_mark: | the ID of the playlist | |
| `type` | [::PlexRubySDK::Operations::GetPlaylistContentsQueryParamType](../../models/operations/getplaylistcontentsqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.<br/>1 = movie<br/>2 = show<br/>3 = season<br/>4 = episode<br/>E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/> | 2 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetPlaylistContentsResponse)](../../models/operations/getplaylistcontentsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetPlaylistContentsResponse)](../../models/operations/getplaylistcontentsresponse.md)**
## clear_playlist_contents
@@ -294,11 +299,11 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -318,10 +323,11 @@ end
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
| `playlist_id` | *::Float* | :heavy_check_mark: | the ID of the playlist |
### Response
**[T.nilable(::OpenApiSDK::Operations::ClearPlaylistContentsResponse)](../../models/operations/clearplaylistcontentsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::ClearPlaylistContentsResponse)](../../models/operations/clearplaylistcontentsresponse.md)**
## add_playlist_contents
@@ -336,11 +342,11 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -348,7 +354,7 @@ s.config_security(
res = s.playlists.add_playlist_contents(playlist_id=8502.01, uri="server://12345/com.plexapp.plugins.library/library/metadata/1", play_queue_id=123.0)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -362,10 +368,11 @@ end
| `uri` | *::String* | :heavy_check_mark: | the content URI for the playlist | server://12345/com.plexapp.plugins.library/library/metadata/1 |
| `play_queue_id` | *::Float* | :heavy_minus_sign: | the play queue to add to a playlist | 123 |
### Response
**[T.nilable(::OpenApiSDK::Operations::AddPlaylistContentsResponse)](../../models/operations/addplaylistcontentsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::AddPlaylistContentsResponse)](../../models/operations/addplaylistcontentsresponse.md)**
## upload_playlist
@@ -379,17 +386,17 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.playlists.upload_playlist(path="/home/barkley/playlist.m3u", force=::OpenApiSDK::Operations::Force::ZERO)
res = s.playlists.upload_playlist(path="/home/barkley/playlist.m3u", force=::PlexRubySDK::Operations::QueryParamForce::ZERO)
if res.status_code == 200
# handle response
@@ -402,10 +409,10 @@ end
| Parameter | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path` | *::String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
| `force` | [::OpenApiSDK::Operations::Force](../../models/operations/force.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
| `force` | [::PlexRubySDK::Operations::QueryParamForce](../../models/operations/queryparamforce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
### Response
**[T.nilable(::OpenApiSDK::Operations::UploadPlaylistResponse)](../../models/operations/uploadplaylistresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::UploadPlaylistResponse)](../../models/operations/uploadplaylistresponse.md)**

View File

@@ -1,6 +1,5 @@
# Plex
## Overview
API Calls that perform operations directly against https://Plex.tv
@@ -8,9 +7,131 @@ API Calls that perform operations directly against https://Plex.tv
### Available Operations
* [get_companions_data](#get_companions_data) - Get Companions Data
* [get_user_friends](#get_user_friends) - Get list of friends of the user logged in
* [get_geo_data](#get_geo_data) - Get Geo Data
* [get_home_data](#get_home_data) - Get Plex Home Data
* [get_server_resources](#get_server_resources) - Get Server Resources
* [get_pin](#get_pin) - Get a Pin
* [get_token](#get_token) - Get Access Token
* [get_token_by_pin_id](#get_token_by_pin_id) - Get Access Token by PinId
## get_companions_data
Get Companions Data
### Example Usage
```ruby
require 'plexruby'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.plex.get_companions_data()
if ! res.response_bodies.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[T.nilable(::PlexRubySDK::Operations::GetCompanionsDataResponse)](../../models/operations/getcompanionsdataresponse.md)**
## get_user_friends
Get friends of provided auth token.
### Example Usage
```ruby
require 'plexruby'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.plex.get_user_friends()
if ! res.friends.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[T.nilable(::PlexRubySDK::Operations::GetUserFriendsResponse)](../../models/operations/getuserfriendsresponse.md)**
## get_geo_data
Returns the geolocation and locale data of the caller
### Example Usage
```ruby
require 'plexruby'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
res = s.plex.get_geo_data()
if ! res.geo_data.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[T.nilable(::PlexRubySDK::Operations::GetGeoDataResponse)](../../models/operations/getgeodataresponse.md)**
## get_home_data
@@ -22,11 +143,11 @@ Retrieves the home data for the authenticated user, including details like home
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -34,16 +155,62 @@ s.config_security(
res = s.plex.get_home_data()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::PlexRubySDK::Operations::GetHomeDataResponse)](../../models/operations/gethomedataresponse.md)**
## get_server_resources
Get Plex server access tokens and server connections
### Example Usage
```ruby
require 'plexruby'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.plex.get_server_resources(x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", include_https=::PlexRubySDK::Operations::IncludeHttps::ONE, include_relay=::PlexRubySDK::Operations::IncludeRelay::ONE, include_i_pv6=::PlexRubySDK::Operations::IncludeIPv6::ONE)
if ! res.plex_devices.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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/> | gcgzw5rz2xovp84b4vha3a40 |
| `include_https` | [::PlexRubySDK::Operations::IncludeHttps](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
| `include_relay` | [::PlexRubySDK::Operations::IncludeRelay](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
| `include_i_pv6` | [::PlexRubySDK::Operations::IncludeIPv6](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetHomeDataResponse)](../../models/operations/gethomedataresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetServerResourcesResponse)](../../models/operations/getserverresourcesresponse.md)**
## get_pin
@@ -56,14 +223,14 @@ Retrieve a Pin from Plex.tv for authentication flows
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
res = s.plex.get_pin(x_plex_product="Postman", strong=false, x_plex_client_identifier="Postman")
res = s.plex.get_pin(strong=false, x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40", x_plex_product="Plex Web")
if ! res.two_hundred_and_one_application_json_object.nil?
if ! res.auth_pin_container.nil?
# handle response
end
@@ -73,20 +240,21 @@ end
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x_plex_product` | *::String* | :heavy_check_mark: | Product name of the application shown in the list of devices<br/> | Postman |
| `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/> | Postman |
| `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/> | gcgzw5rz2xovp84b4vha3a40 |
| `x_plex_product` | *::String* | :heavy_minus_sign: | N/A | Plex Web |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetPinResponse)](../../models/operations/getpinresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetPinResponse)](../../models/operations/getpinresponse.md)**
## get_token
Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
## get_token_by_pin_id
Retrieve an Access Token from Plex.tv after the Pin has been authenticated
### Example Usage
@@ -94,14 +262,14 @@ Retrieve an Access Token from Plex.tv after the Pin has already been authenticat
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
res = s.plex.get_token(pin_id="<value>", x_plex_client_identifier="Postman")
res = s.plex.get_token_by_pin_id(pin_id=408895, x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40")
if ! res.two_hundred_application_json_object.nil?
if ! res.auth_pin_container.nil?
# handle response
end
@@ -111,12 +279,12 @@ end
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pin_id` | *::String* | :heavy_check_mark: | The PinID to retrieve an access token for | |
| `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/> | Postman |
| `pin_id` | *::Integer* | :heavy_check_mark: | The PinID to retrieve an access token for | |
| `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/> | gcgzw5rz2xovp84b4vha3a40 |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetTokenResponse)](../../models/operations/gettokenresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetTokenByPinIdResponse)](../../models/operations/gettokenbypinidresponse.md)**

View File

@@ -1,9 +1,5 @@
# PlexAPI SDK
## Overview
An Open API Spec for interacting with Plex.tv and Plex Servers
### Available Operations
Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server

View File

@@ -1,6 +1,5 @@
# Search
## Overview
API Calls that perform search operations with Plex Media Server
@@ -34,17 +33,17 @@ This request is intended to be very fast, and called as the user types.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.search.perform_search(query="dylan", section_id=1516.53, limit=5.0)
res = s.search.perform_search(query="arnold", section_id=9372.7, limit=5.0)
if res.status_code == 200
# handle response
@@ -60,10 +59,11 @@ end
| `section_id` | *::Float* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | |
| `limit` | *::Float* | :heavy_minus_sign: | The number of items to return per hub | 5 |
### Response
**[T.nilable(::OpenApiSDK::Operations::PerformSearchResponse)](../../models/operations/performsearchresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::PerformSearchResponse)](../../models/operations/performsearchresponse.md)**
## perform_voice_search
@@ -80,11 +80,11 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -106,10 +106,11 @@ end
| `section_id` | *::Float* | :heavy_minus_sign: | This gives context to the search, and can result in re-ordering of search result hubs | |
| `limit` | *::Float* | :heavy_minus_sign: | The number of items to return per hub | 5 |
### Response
**[T.nilable(::OpenApiSDK::Operations::PerformVoiceSearchResponse)](../../models/operations/performvoicesearchresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::PerformVoiceSearchResponse)](../../models/operations/performvoicesearchresponse.md)**
## get_search_results
@@ -122,11 +123,11 @@ This will search the database for the string provided.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -134,7 +135,7 @@ s.config_security(
res = s.search.get_search_results(query="110")
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -146,8 +147,8 @@ end
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| `query` | *::String* | :heavy_check_mark: | The search query string to use | 110 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetSearchResultsResponse)](../../models/operations/getsearchresultsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetSearchResultsResponse)](../../models/operations/getsearchresultsresponse.md)**

View File

@@ -1,6 +1,5 @@
# Server
## Overview
Operations against the Plex Media Server System.
@@ -15,6 +14,7 @@ Operations against the Plex Media Server System.
* [get_server_identity](#get_server_identity) - Get Server Identity
* [get_my_plex_account](#get_my_plex_account) - Get MyPlex Account
* [get_resized_photo](#get_resized_photo) - Get a Resized Photo
* [get_media_providers](#get_media_providers) - Get Media Providers
* [get_server_list](#get_server_list) - Get Server List
## get_server_capabilities
@@ -27,11 +27,11 @@ Get Server Capabilities
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -39,16 +39,17 @@ s.config_security(
res = s.server.get_server_capabilities()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetServerCapabilitiesResponse)](../../models/operations/getservercapabilitiesresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetServerCapabilitiesResponse)](../../models/operations/getservercapabilitiesresponse.md)**
## get_server_preferences
@@ -61,11 +62,11 @@ Get Server Preferences
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -73,16 +74,17 @@ s.config_security(
res = s.server.get_server_preferences()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetServerPreferencesResponse)](../../models/operations/getserverpreferencesresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetServerPreferencesResponse)](../../models/operations/getserverpreferencesresponse.md)**
## get_available_clients
@@ -95,11 +97,11 @@ Get Available Clients
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -107,16 +109,17 @@ s.config_security(
res = s.server.get_available_clients()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetAvailableClientsResponse)](../../models/operations/getavailableclientsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetAvailableClientsResponse)](../../models/operations/getavailableclientsresponse.md)**
## get_devices
@@ -129,11 +132,11 @@ Get Devices
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -141,21 +144,22 @@ s.config_security(
res = s.server.get_devices()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetDevicesResponse)](../../models/operations/getdevicesresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetDevicesResponse)](../../models/operations/getdevicesresponse.md)**
## get_server_identity
Get Server Identity
This request is useful to determine if the server is online or offline
### Example Usage
@@ -163,28 +167,24 @@ Get Server Identity
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.server.get_server_identity()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetServerIdentityResponse)](../../models/operations/getserveridentityresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetServerIdentityResponse)](../../models/operations/getserveridentityresponse.md)**
## get_my_plex_account
@@ -197,11 +197,11 @@ Returns MyPlex Account Information
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -209,16 +209,17 @@ s.config_security(
res = s.server.get_my_plex_account()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetMyPlexAccountResponse)](../../models/operations/getmyplexaccountresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetMyPlexAccountResponse)](../../models/operations/getmyplexaccountresponse.md)**
## get_resized_photo
@@ -232,23 +233,23 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
req = ::OpenApiSDK::Operations::GetResizedPhotoRequest.new(
req = ::PlexRubySDK::Operations::GetResizedPhotoRequest.new(
width: 110.0,
height: 165.0,
opacity: 643869,
blur: 4000.0,
min_size: ::OpenApiSDK::Operations::MinSize::ZERO,
upscale: ::OpenApiSDK::Operations::Upscale::ZERO,
blur: 0.0,
min_size: ::PlexRubySDK::Operations::MinSize::ZERO,
upscale: ::PlexRubySDK::Operations::Upscale::ONE,
url: "/library/metadata/49564/thumb/1654258204",
)
@@ -262,14 +263,56 @@ end
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `request` | [::OpenApiSDK::Operations::GetResizedPhotoRequest](../../models/operations/getresizedphotorequest.md) | :heavy_check_mark: | The request object to use for the request. |
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `request` | [::PlexRubySDK::Operations::GetResizedPhotoRequest](../../models/operations/getresizedphotorequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetResizedPhotoResponse)](../../models/operations/getresizedphotoresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetResizedPhotoResponse)](../../models/operations/getresizedphotoresponse.md)**
## get_media_providers
Retrieves media providers and their features from the Plex server.
### Example Usage
```ruby
require 'plexruby'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.server.get_media_providers(x_plex_token="CV5xoxjTpFKUzBTShsaf")
if ! res.object.nil?
# handle response
end
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `x_plex_token` | *::String* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf |
### Response
**[T.nilable(::PlexRubySDK::Operations::GetMediaProvidersResponse)](../../models/operations/getmediaprovidersresponse.md)**
## get_server_list
@@ -282,11 +325,11 @@ Get Server List
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -294,14 +337,14 @@ s.config_security(
res = s.server.get_server_list()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetServerListResponse)](../../models/operations/getserverlistresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetServerListResponse)](../../models/operations/getserverlistresponse.md)**

View File

@@ -1,6 +1,5 @@
# Sessions
## Overview
API Calls that perform search operations with Plex Media Server Sessions
@@ -23,11 +22,11 @@ This will retrieve the "Now Playing" Information of the PMS.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -35,16 +34,17 @@ s.config_security(
res = s.sessions.get_sessions()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetSessionsResponse)](../../models/operations/getsessionsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetSessionsResponse)](../../models/operations/getsessionsresponse.md)**
## get_session_history
@@ -57,19 +57,19 @@ This will Retrieve a listing of all history views.
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.sessions.get_session_history(sort="<value>", account_id=1, filter=::OpenApiSDK::Operations::Filter.new(), library_section_id=12)
res = s.sessions.get_session_history(sort="<value>", account_id=1, filter=::PlexRubySDK::Operations::QueryParamFilter.new(), library_section_id=12)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -81,13 +81,14 @@ end
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sort` | *::String* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
| `account_id` | *::Integer* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | 1 |
| `filter` | [::OpenApiSDK::Operations::Filter](../../models/operations/filter.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | {<br/>"viewed-at-greater-than": {<br/>"value": "viewedAt\u003e"<br/>},<br/>"viewed-at-greater-than-or-equal-to": {<br/>"value": "viewedAt\u003e=\u003e"<br/>},<br/>"viewed-at-less-than": {<br/>"value": "viewedAt\u003c"<br/>}<br/>} |
| `filter` | [::PlexRubySDK::Operations::QueryParamFilter](../../models/operations/queryparamfilter.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | {<br/>"viewed-at-greater-than": {<br/>"value": "viewedAt\u003e"<br/>},<br/>"viewed-at-greater-than-or-equal-to": {<br/>"value": "viewedAt\u003e=\u003e"<br/>},<br/>"viewed-at-less-than": {<br/>"value": "viewedAt\u003c"<br/>}<br/>} |
| `library_section_id` | *::Integer* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetSessionHistoryResponse)](../../models/operations/getsessionhistoryresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetSessionHistoryResponse)](../../models/operations/getsessionhistoryresponse.md)**
## get_transcode_sessions
@@ -100,11 +101,11 @@ Get Transcode Sessions
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -112,16 +113,17 @@ s.config_security(
res = s.sessions.get_transcode_sessions()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetTranscodeSessionsResponse)](../../models/operations/gettranscodesessionsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetTranscodeSessionsResponse)](../../models/operations/gettranscodesessionsresponse.md)**
## stop_transcode_session
@@ -134,11 +136,11 @@ Stop a Transcode Session
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -158,8 +160,8 @@ end
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| `session_key` | *::String* | :heavy_check_mark: | the Key of the transcode session to stop | zz7llzqlx8w9vnrsbnwhbmep |
### Response
**[T.nilable(::OpenApiSDK::Operations::StopTranscodeSessionResponse)](../../models/operations/stoptranscodesessionresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::StopTranscodeSessionResponse)](../../models/operations/stoptranscodesessionresponse.md)**

View File

@@ -1,6 +1,5 @@
# Statistics
## Overview
API Calls that perform operations with Plex Media Server Statistics
@@ -22,11 +21,11 @@ This will return the media statistics for the server
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -34,7 +33,7 @@ s.config_security(
res = s.statistics.get_statistics(timespan=4)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -46,10 +45,11 @@ end
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `timespan` | *::Integer* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetStatisticsResponse)](../../models/operations/getstatisticsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetStatisticsResponse)](../../models/operations/getstatisticsresponse.md)**
## get_resources_statistics
@@ -62,11 +62,11 @@ This will return the resources for the server
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -74,7 +74,7 @@ s.config_security(
res = s.statistics.get_resources_statistics(timespan=4)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -86,10 +86,11 @@ end
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `timespan` | *::Integer* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetResourcesStatisticsResponse)](../../models/operations/getresourcesstatisticsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetResourcesStatisticsResponse)](../../models/operations/getresourcesstatisticsresponse.md)**
## get_bandwidth_statistics
@@ -102,11 +103,11 @@ This will return the bandwidth statistics for the server
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -114,7 +115,7 @@ s.config_security(
res = s.statistics.get_bandwidth_statistics(timespan=4)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -126,8 +127,8 @@ end
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `timespan` | *::Integer* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetBandwidthStatisticsResponse)](../../models/operations/getbandwidthstatisticsresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetBandwidthStatisticsResponse)](../../models/operations/getbandwidthstatisticsresponse.md)**

View File

@@ -1,6 +1,5 @@
# Updater
## Overview
This describes the API for searching and applying updates to the Plex Media Server.
@@ -23,11 +22,11 @@ Querying status of updates
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
@@ -35,16 +34,17 @@ s.config_security(
res = s.updater.get_update_status()
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
```
### Response
**[T.nilable(::OpenApiSDK::Operations::GetUpdateStatusResponse)](../../models/operations/getupdatestatusresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetUpdateStatusResponse)](../../models/operations/getupdatestatusresponse.md)**
## check_for_updates
@@ -57,17 +57,17 @@ Checking for updates
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.updater.check_for_updates(download=::OpenApiSDK::Operations::Download::ONE)
res = s.updater.check_for_updates(download=::PlexRubySDK::Operations::Download::ONE)
if res.status_code == 200
# handle response
@@ -77,14 +77,15 @@ end
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `download` | [::OpenApiSDK::Operations::Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |
| Parameter | Type | Required | Description | Example |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `download` | [::PlexRubySDK::Operations::Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |
### Response
**[T.nilable(::OpenApiSDK::Operations::CheckForUpdatesResponse)](../../models/operations/checkforupdatesresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::CheckForUpdatesResponse)](../../models/operations/checkforupdatesresponse.md)**
## apply_updates
@@ -98,17 +99,17 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.updater.apply_updates(tonight=::OpenApiSDK::Operations::Tonight::ONE, skip=::OpenApiSDK::Operations::Skip::ZERO)
res = s.updater.apply_updates(tonight=::PlexRubySDK::Operations::Tonight::ONE, skip=::PlexRubySDK::Operations::Skip::ONE)
if res.status_code == 200
# handle response
@@ -120,11 +121,11 @@ end
| Parameter | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tonight` | [::OpenApiSDK::Operations::Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
| `skip` | [::OpenApiSDK::Operations::Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. | 1 |
| `tonight` | [::PlexRubySDK::Operations::Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
| `skip` | [::PlexRubySDK::Operations::Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. | 1 |
### Response
**[T.nilable(::OpenApiSDK::Operations::ApplyUpdatesResponse)](../../models/operations/applyupdatesresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::ApplyUpdatesResponse)](../../models/operations/applyupdatesresponse.md)**

View File

@@ -1,6 +1,5 @@
# Video
## Overview
API Calls that perform operations with Plex Media Server Videos
@@ -21,20 +20,20 @@ Get the timeline for a media item
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
req = ::OpenApiSDK::Operations::GetTimelineRequest.new(
req = ::PlexRubySDK::Operations::GetTimelineRequest.new(
rating_key: 23409.0,
key: "/library/metadata/23409",
state: ::OpenApiSDK::Operations::State::PLAYING,
state: ::PlexRubySDK::Operations::State::PLAYING,
has_mde: 1.0,
time: 2000.0,
duration: 10000.0,
@@ -54,14 +53,15 @@ end
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `request` | [::OpenApiSDK::Operations::GetTimelineRequest](../../models/operations/gettimelinerequest.md) | :heavy_check_mark: | The request object to use for the request. |
| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `request` | [::PlexRubySDK::Operations::GetTimelineRequest](../../models/operations/gettimelinerequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetTimelineResponse)](../../models/operations/gettimelineresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetTimelineResponse)](../../models/operations/gettimelineresponse.md)**
## start_universal_transcode
@@ -74,17 +74,17 @@ Begin a Universal Transcode Session
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
req = ::OpenApiSDK::Operations::StartUniversalTranscodeRequest.new(
req = ::PlexRubySDK::Operations::StartUniversalTranscodeRequest.new(
has_mde: 1.0,
path: "/library/metadata/23409",
media_index: 0.0,
@@ -113,12 +113,12 @@ end
### Parameters
| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `request` | [::OpenApiSDK::Operations::StartUniversalTranscodeRequest](../../models/operations/startuniversaltranscoderequest.md) | :heavy_check_mark: | The request object to use for the request. |
| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `request` | [::PlexRubySDK::Operations::StartUniversalTranscodeRequest](../../models/operations/startuniversaltranscoderequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[T.nilable(::OpenApiSDK::Operations::StartUniversalTranscodeResponse)](../../models/operations/startuniversaltranscoderesponse.md)**
**[T.nilable(::PlexRubySDK::Operations::StartUniversalTranscodeResponse)](../../models/operations/startuniversaltranscoderesponse.md)**

View File

@@ -1,6 +1,5 @@
# Watchlist
## Overview
API Calls that perform operations with Plex Media Server Watchlists
@@ -8,9 +7,9 @@ API Calls that perform operations with Plex Media Server Watchlists
### Available Operations
* [get_watchlist](#get_watchlist) - Get User Watchlist
* [get_watch_list](#get_watch_list) - Get User Watchlist
## get_watchlist
## get_watch_list
Get User Watchlist
@@ -20,24 +19,26 @@ Get User Watchlist
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
req = ::OpenApiSDK::Operations::GetWatchlistRequest.new(
filter: ::OpenApiSDK::Operations::PathParamFilter::RELEASED,
x_plex_token: "<value>",
req = ::PlexRubySDK::Operations::GetWatchListRequest.new(
filter: ::PlexRubySDK::Operations::Filter::AVAILABLE,
x_plex_container_start: 0,
x_plex_container_size: 50,
x_plex_token: "CV5xoxjTpFKUzBTShsaf",
)
res = s.watchlist.get_watchlist(req)
res = s.watchlist.get_watch_list(req)
if ! res.two_hundred_application_json_object.nil?
if ! res.object.nil?
# handle response
end
@@ -45,13 +46,13 @@ end
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `request` | [::OpenApiSDK::Operations::GetWatchlistRequest](../../models/operations/getwatchlistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. |
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `request` | [::PlexRubySDK::Operations::GetWatchListRequest](../../models/operations/getwatchlistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `server_url` | *String* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[T.nilable(::OpenApiSDK::Operations::GetWatchlistResponse)](../../models/operations/getwatchlistresponse.md)**
**[T.nilable(::PlexRubySDK::Operations::GetWatchListResponse)](../../models/operations/getwatchlistresponse.md)**