Media
- class asyncpow.apis.media.Media(base_url: URL, api_key: str, session: ClientSession, raw_response: bool)[source]
Class to interact with media-related endpoints.
Initialize the Media object with the base URL, API key, and session.
- async async_get_media(take: int = 20, skip: int = 0, filter: Literal['all', 'available', 'partial', 'allavailable', 'pending', 'processing'] | None = None, sort: Literal['added', 'modified', 'mediaAdded'] | None = None, raw_response: bool | None = None) dict | MediaModel [source]
Get media items based on specified parameters.
- Parameters:
take (int) – The number of items to retrieve (default is 20).
skip (int) – The number of items to skip (default is 0).
filter (MediaFilterOptions) – The filter option for media items (default is None).
sort (SortOptions) – The sorting option for media items (default is None).
raw_response (bool, optional) – return raw json. Defaults to None.
- Returns:
The media model object retrieved based on the parameters.
- Return type:
dict | MediaModel
- async async_post_media_status(mediaId: int, status: Literal['available', 'partial', 'pending', 'processing', 'unknown'], is4k: bool | None = None, raw_response: bool | None = None) dict | MediaModel2 [source]
Update the status of a media item with optional 4k flag.
- Parameters:
mediaId (int) – The ID of the media item.
status (MediaStatusOptions) – The status to set for the media item.
is4k (Optional[bool]) – Optional flag indicating 4k status.
raw_response (bool, optional) – return raw json. Defaults to None.
- Returns:
The model object representing the updated media item.
- Return type:
dict | MediaModel2