mirror of
https://github.com/LukeHagar/plexruby.git
synced 2025-12-06 12:47:44 +00:00
Statistics
Overview
API Calls that perform operations with Plex Media Server Statistics
Available Operations
- get_statistics - Get Media Statistics
- get_resources_statistics - Get Resources Statistics
- get_bandwidth_statistics - Get Bandwidth Statistics
get_statistics
This will return the media statistics for the server
Example Usage
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.statistics.get_statistics(timespan=4)
if ! res.two_hundred_application_json_object.nil?
# handle response
end
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
timespan |
::Integer | ➖ | The timespan to retrieve statistics for the exact meaning of this parameter is not known |
4 |
Response
T.nilable(::OpenApiSDK::Operations::GetStatisticsResponse)
get_resources_statistics
This will return the resources for the server
Example Usage
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.statistics.get_resources_statistics(timespan=4)
if ! res.two_hundred_application_json_object.nil?
# handle response
end
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
timespan |
::Integer | ➖ | The timespan to retrieve statistics for the exact meaning of this parameter is not known |
4 |
Response
T.nilable(::OpenApiSDK::Operations::GetResourcesStatisticsResponse)
get_bandwidth_statistics
This will return the bandwidth statistics for the server
Example Usage
require 'plexruby'
s = ::OpenApiSDK::PlexAPI.new(
x_plex_client_identifier: "Postman",
)
s.config_security(
::OpenApiSDK::Shared::Security.new(
access_token: "<YOUR_API_KEY_HERE>",
)
)
res = s.statistics.get_bandwidth_statistics(timespan=4)
if ! res.two_hundred_application_json_object.nil?
# handle response
end
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
timespan |
::Integer | ➖ | The timespan to retrieve statistics for the exact meaning of this parameter is not known |
4 |
Response
T.nilable(::OpenApiSDK::Operations::GetBandwidthStatisticsResponse)