Requestο
- class asyncpow.apis.request.Request(base_url: URL, api_key: str, session: ClientSession, raw_response: bool, tv_instance: Tv, movie_instance: Movie)[source]ο
Class to interact with request-related endpoints.
Initialize the Request object with the base URL, API key, and session.
- async async_get_requests(raw_response: bool | None = None, take: int = 20, skip: int = 0, filter: Literal['all', 'approved', 'available', 'pending', 'processing', 'unavailable', 'failed'] = 'all', sort: Literal['added', 'modified', 'mediaAdded'] = 'added', requested_by: int = 1) dict | RequestResultsResponseModel [source]ο
Get a list of requests
- Parameters:
raw_response (bool, optional) β Return JSON response. Defaults to None.
take (int, optional) β Number if pages. Defaults to 20.
skip (int, optional) β Pages to skip. Defaults to 0.
filter (RequestFilterOptions, optional) β Filter requests. Defaults to βallβ.
sort (SortOptions, optional) β Sort Requests. Defaults to βaddedβ.
requested_by (int, optional) β Only requests by user. Defaults to 1.
- Returns:
Returns a request record
- Return type:
dict | RequestResultsResponseModel
- async async_post_request(id: int, type: Literal['movie', 'tv'], series: Literal['all', 'latest', 'first'] = 'all', raw_response: bool | None = None) dict | MediaRequestModel [source]ο
Get a list of requests
- Parameters:
id (int) β Movie or TV ID.
type (str) β Type of request movie | tv.
series (str, optional) β What series to request - all | latest | first, only aplies to tv. Defautls to all
raw_response (bool, optional) β Return JSON response. Defaults to None.
- Returns:
Returns a request record
- Return type:
dict | MediaRequestModel