# Statistics ## Overview API Calls that perform operations with Plex Media Server Statistics ### Available Operations * [get_statistics](#get_statistics) - Get Media Statistics * [get_resources_statistics](#get_resources_statistics) - Get Resources Statistics * [get_bandwidth_statistics](#get_bandwidth_statistics) - Get Bandwidth Statistics ## get_statistics This will return the media statistics for the server ### Example Usage ```ruby require 'plexruby' s = ::PlexRubySDK::PlexAPI.new( x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40", ) s.config_security( ::PlexRubySDK::Shared::Security.new( access_token: "", ) ) res = s.statistics.get_statistics(timespan=4) if ! res.object.nil? # handle response end ``` ### Parameters | Parameter | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | `timespan` | *::Integer* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | ### Response **[T.nilable(::PlexRubySDK::Operations::GetStatisticsResponse)](../../models/operations/getstatisticsresponse.md)** ## get_resources_statistics This will return the resources for the server ### Example Usage ```ruby require 'plexruby' s = ::PlexRubySDK::PlexAPI.new( x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40", ) s.config_security( ::PlexRubySDK::Shared::Security.new( access_token: "", ) ) res = s.statistics.get_resources_statistics(timespan=4) if ! res.object.nil? # handle response end ``` ### Parameters | Parameter | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | `timespan` | *::Integer* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | ### Response **[T.nilable(::PlexRubySDK::Operations::GetResourcesStatisticsResponse)](../../models/operations/getresourcesstatisticsresponse.md)** ## get_bandwidth_statistics This will return the bandwidth statistics for the server ### Example Usage ```ruby require 'plexruby' s = ::PlexRubySDK::PlexAPI.new( x_plex_client_identifier: "gcgzw5rz2xovp84b4vha3a40", ) s.config_security( ::PlexRubySDK::Shared::Security.new( access_token: "", ) ) res = s.statistics.get_bandwidth_statistics(timespan=4) if ! res.object.nil? # handle response end ``` ### Parameters | Parameter | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | `timespan` | *::Integer* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | ### Response **[T.nilable(::PlexRubySDK::Operations::GetBandwidthStatisticsResponse)](../../models/operations/getbandwidthstatisticsresponse.md)**