Client#
- class serializd.client.SerializdClient#
Serializd.com API client class
- property access_token: str | None#
Serializd user access token
- check_token(access_token: str) ValidateAuthTokenResponse #
Checks whether given access token is still valid
- Parameters:
access_token – User access token
- Returns:
Token validity status.
- Raises:
SerializdError – Serializd returned an error
- get_season(show_id: int, season_number: int) SeasonResponse #
Fetches and returns season information
- Parameters:
show_id – TMDB show ID
season_number – Season number
- Returns:
Season information as a dict.
- Raises:
SerializdError – Serializd returned an error
EmptySeasonError – Serializd returned empty season information
- get_show(show_id: int) ShowResponse #
Fetches and returns show information
- Parameters:
show_id – TMDB show ID
- Returns:
Show information as a dict.
- Raises:
SerializdError – Serializd returned an error
- load_token(access_token: str, check: bool = True)#
Loads saved Serializd user access token
- Parameters:
access_token – User access token
check – Enable checking token validity (default: true)
- Raises:
InvalidTokenError – If check is enabled and provided access token is invalid
- log_episodes(show_id: int, season_id: int, episode_numbers: list[int]) bool #
Adds given episodes (by numbers) to the user’s watched list
- Note: This does not mark the season as watched,
even if all episodes are provided
- Parameters:
show_id – TMDB show ID
season_id – TMDB season ID
episode_numbers – List of episodes numbers
- Returns:
Success status.
- Raises:
SerializdError – Serializd returned an error
- log_seasons(show_id: int, season_ids: list[int]) bool #
Adds given seasons (by ID) to the user’s watched list
- Parameters:
show_id – TMDB show ID
season_ids – List of TMDB season ID
- Returns:
Success status.
- Raises:
SerializdError – Serializd returned an error
- log_show(show_id: int) bool #
Adds a given show (all seasons) to the user’s watched list
- Parameters:
show_id – TMDB show ID
- Returns:
Success status.
- Raises:
SerializdError – Serializd returned an error
- login(email: str, password: str) LoginResponse #
Logs in into Serializd using provided credentials
- Parameters:
email – User account email
password – User account password
- Returns:
Access token.
- Raises:
LoginError – Failed to log in
- unlog_episodes(show_id: int, season_id: int, episode_numbers: list[int]) bool #
Removes given episodes (by numbers) from the user’s watched list
- Note: This does not unmark the season as watched,
even if all episodes are provided
- Parameters:
show_id – TMDB show ID
season_id – TMDB season ID
episode_numbers – List of episodes numbers
- Returns:
Success status.
- Raises:
SerializdError – Serializd returned an error
- unlog_seasons(show_id: int, season_ids: list[int]) bool #
Removes given seasons (by ID) from the user’s watched list
- Parameters:
show_id – TMDB show ID
season_ids – List of TMDB season ID
- Returns:
Success status.
- Raises:
SerializdError – Serializd returned an error
- unlog_show(show_id: int) bool #
Removes a given show (all seasons) from the user’s watched list
- Parameters:
show_id – TMDB show ID
- Returns:
Success status.
- Raises:
SerializdError – Serializd returned an error