Files
plexpy/docs/sdks/statistics/README.md

52 lines
2.2 KiB
Markdown

# Statistics
(*statistics*)
## Overview
API Calls that perform operations with Plex Media Server Statistics
### Available Operations
* [get_statistics](#get_statistics) - Get Media Statistics
## get_statistics
This will return the media statistics for the server
### Example Usage
```python
import plex_api
s = plex_api.PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
x_plex_client_identifier='Postman',
)
res = s.statistics.get_statistics(timespan=411769)
if res.object is not None:
# handle response
pass
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `timespan` | *Optional[int]* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
### Response
**[operations.GetStatisticsResponse](../../models/operations/getstatisticsresponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| -------------------------------- | -------------------------------- | -------------------------------- |
| errors.GetStatisticsResponseBody | 401 | application/json |
| errors.SDKError | 4xx-5xx | */* |