mirror of
https://github.com/LukeHagar/plexruby.git
synced 2025-12-06 04:20:52 +00:00
Hubs
Overview
Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
Available Operations
- get_global_hubs - Get Global Hubs
- get_library_hubs - Get library specific hubs
get_global_hubs
Get Global Hubs filtered by the parameters provided.
Example Usage
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::PlexRubySDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.hubs.get_global_hubs(count=1262.49, only_transient=::PlexRubySDK::Operations::OnlyTransient::ONE)
if ! res.object.nil?
# handle response
end
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
count |
::Float | ➖ | The number of items to return with each hub. |
only_transient |
::PlexRubySDK::Operations::OnlyTransient | ➖ | 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(::PlexRubySDK::Operations::GetGlobalHubsResponse)
get_library_hubs
This endpoint will return a list of library specific hubs
Example Usage
require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new(
x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40",
)
s.config_security(
::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=::PlexRubySDK::Operations::QueryParamOnlyTransient::ZERO)
if ! res.object.nil?
# handle response
end
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
section_id |
::Float | ✔️ | the Id of the library to query |
count |
::Float | ➖ | The number of items to return with each hub. |
only_transient |
::PlexRubySDK::Operations::QueryParamOnlyTransient | ➖ | 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(::PlexRubySDK::Operations::GetLibraryHubsResponse)