otaku_info.external.entities package¶
Submodules¶
otaku_info.external.entities.AnilistItem module¶
- class otaku_info.external.entities.AnilistItem.AnilistItem(_id: int, service: otaku_info.enums.ListService, extra_ids: Dict[otaku_info.enums.ListService, str], media_type: otaku_info.enums.MediaType, media_subtype: otaku_info.enums.MediaSubType, english_title: Optional[str], romaji_title: str, cover_url: str, chapters: Optional[int], volumes: Optional[int], episodes: Optional[int], next_episode: Optional[int], next_episode_airing_time: Optional[int], releasing_state: otaku_info.enums.ReleasingState, relations: Dict[Tuple[otaku_info.enums.MediaType, int], otaku_info.enums.MediaRelationType])¶
Bases:
otaku_info.external.entities.AnimeListItem.AnimeListItem
Class that models a general anilist list item Represents the information fetched using anilist’s API
- classmethod from_query(media_type: otaku_info.enums.MediaType, data: Dict[str, Any]) otaku_info.external.entities.AnilistItem.AnilistItem ¶
Generates an AnilistItem from a dictionary generated by an APi query :param media_type: The media type of the item :param data: The data to use :return: The generated AnilistItem
- property myanimelist_id: Optional[int]¶
- Returns
The myanimelist ID
otaku_info.external.entities.AnilistUserItem module¶
- class otaku_info.external.entities.AnilistUserItem.AnilistUserItem(_id: int, service: otaku_info.enums.ListService, extra_ids: Dict[otaku_info.enums.ListService, str], media_type: otaku_info.enums.MediaType, media_subtype: otaku_info.enums.MediaSubType, english_title: Optional[str], romaji_title: str, cover_url: str, chapters: Optional[int], volumes: Optional[int], episodes: Optional[int], next_episode: Optional[int], next_episode_airing_time: Optional[int], releasing_state: otaku_info.enums.ReleasingState, relations: Dict[Tuple[otaku_info.enums.MediaType, int], otaku_info.enums.MediaRelationType], score: Optional[int], progress: Optional[int], volume_progress: Optional[int], consuming_state: otaku_info.enums.ConsumingState, list_name: str)¶
Bases:
otaku_info.external.entities.AnilistItem.AnilistItem
Class that models an anilist list item for a user Represents the information fetched using anilist’s API
- __init__(_id: int, service: otaku_info.enums.ListService, extra_ids: Dict[otaku_info.enums.ListService, str], media_type: otaku_info.enums.MediaType, media_subtype: otaku_info.enums.MediaSubType, english_title: Optional[str], romaji_title: str, cover_url: str, chapters: Optional[int], volumes: Optional[int], episodes: Optional[int], next_episode: Optional[int], next_episode_airing_time: Optional[int], releasing_state: otaku_info.enums.ReleasingState, relations: Dict[Tuple[otaku_info.enums.MediaType, int], otaku_info.enums.MediaRelationType], score: Optional[int], progress: Optional[int], volume_progress: Optional[int], consuming_state: otaku_info.enums.ConsumingState, list_name: str)¶
Initializes the AnilistItem object :param _id: The anilist ID :param service: Anilist :param extra_ids: The myanimelist ID of the series :param media_type: The media type of the series :param media_subtype: The media subtype of the series :param english_title: The English title of the series :param romaji_title: The Japanes title of the series written in romaji :param cover_url: URL to a cover image for the series :param chapters: The total amount of known manga chapters :param volumes: The total amount of known manga/ln volumes :param episodes: The total amount of known anime episodes :param next_episode: The next airing episode, if available :param next_episode_airing_time: The airing time of the next episode :param releasing_state: The current releasing state of the series :param relations: Related media items identified by IDs :param score: The user’s score for the series :param progress: The user’s progress for the series :param volume_progress: The user’s volume progress :param consuming_state: The user’s consumption state for the series :param list_name: Which of the user’s lists this entry belongs to
- classmethod from_query(media_type: otaku_info.enums.MediaType, data: Dict[str, Any]) otaku_info.external.entities.AnilistUserItem.AnilistUserItem ¶
Generates an AnilistUserItem from a dictionary generated by an APi query :param media_type: The media type of the item :param data: The data to use :return: The generated AnilistItem
otaku_info.external.entities.AnimeListItem module¶
- class otaku_info.external.entities.AnimeListItem.AnimeListItem(_id: int, service: otaku_info.enums.ListService, extra_ids: Dict[otaku_info.enums.ListService, str], media_type: otaku_info.enums.MediaType, media_subtype: otaku_info.enums.MediaSubType, english_title: Optional[str], romaji_title: str, cover_url: str, chapters: Optional[int], volumes: Optional[int], episodes: Optional[int], next_episode: Optional[int], next_episode_airing_time: Optional[int], releasing_state: otaku_info.enums.ReleasingState, relations: Dict[Tuple[otaku_info.enums.MediaType, int], otaku_info.enums.MediaRelationType])¶
Bases:
object
Class that models a general anime list item
- __init__(_id: int, service: otaku_info.enums.ListService, extra_ids: Dict[otaku_info.enums.ListService, str], media_type: otaku_info.enums.MediaType, media_subtype: otaku_info.enums.MediaSubType, english_title: Optional[str], romaji_title: str, cover_url: str, chapters: Optional[int], volumes: Optional[int], episodes: Optional[int], next_episode: Optional[int], next_episode_airing_time: Optional[int], releasing_state: otaku_info.enums.ReleasingState, relations: Dict[Tuple[otaku_info.enums.MediaType, int], otaku_info.enums.MediaRelationType])¶
Initializes the AnimeListItem object :param _id: The anime list ID :param service: The anime list service :param extra_ids: Any extra IDs for other services :param media_type: The media type of the series :param media_subtype: The media subtype of the series :param english_title: The English title of the series :param romaji_title: The Japanes title of the series written in romaji :param cover_url: URL to a cover image for the series :param chapters: The total amount of known manga chapters :param volumes: The total amount of known manga/ln volumes :param episodes: The total amount of known anime episodes :param next_episode: The next airing episode, if available :param next_episode_airing_time: The airing time of the next episode :param releasing_state: The current releasing state of the series :param relations: Related media items identified by IDs
- classmethod from_query(media_type: otaku_info.enums.MediaType, data: Dict[str, Any]) otaku_info.external.entities.AnimeListItem.AnimeListItem ¶
Generates an AnimeListItem from a dictionary generated by an APi query :param media_type: The media type of the item :param data: The data to use :return: The generated AnimeListItem
- property latest_release: Optional[int]¶
- Returns
The latest release. Chapters for manga, episodes for anime
otaku_info.external.entities.MangadexItem module¶
- class otaku_info.external.entities.MangadexItem.MangadexItem(mangadex_id: str, external_ids: Dict[otaku_info.enums.ListService, str], english_title: str, romaji_title: str, cover_url: str, total_chapters: Optional[int], latest_chapter: Optional[int], releasing_state: otaku_info.enums.ReleasingState)¶
Bases:
object
Class that models a general anilist list item Represents the information fetched using anilist’s API
- __init__(mangadex_id: str, external_ids: Dict[otaku_info.enums.ListService, str], english_title: str, romaji_title: str, cover_url: str, total_chapters: Optional[int], latest_chapter: Optional[int], releasing_state: otaku_info.enums.ReleasingState)¶
Initializes the MangadexItem object :param mangadex_id: The mangadex ID of the series :param external_ids: IDs for other services :param english_title: The title of the series in English :param romaji_title: The title of the series in Japanese :param cover_url: URL to a cover image for this series :param total_chapters: The total amount of chapters :param latest_chapter: The latest chapter :param releasing_state: The releasing state
- classmethod from_json(data: Dict[str, Any]) otaku_info.external.entities.MangadexItem.MangadexItem ¶
Generates a MangadexItem from a dictionary generated by an API query :param data: The data to use :return: The generated MangadexItem
- static resolve_releasing_state(state: str) otaku_info.enums.ReleasingState ¶
Translates mangadex status tags to releasing states :param state: The status tag to translate :return: The releasing state
otaku_info.external.entities.MyanimelistItem module¶
- class otaku_info.external.entities.MyanimelistItem.MyanimelistItem(_id: int, service: otaku_info.enums.ListService, extra_ids: Dict[otaku_info.enums.ListService, str], media_type: otaku_info.enums.MediaType, media_subtype: otaku_info.enums.MediaSubType, english_title: Optional[str], romaji_title: str, cover_url: str, chapters: Optional[int], volumes: Optional[int], episodes: Optional[int], next_episode: Optional[int], next_episode_airing_time: Optional[int], releasing_state: otaku_info.enums.ReleasingState, relations: Dict[Tuple[otaku_info.enums.MediaType, int], otaku_info.enums.MediaRelationType])¶
Bases:
otaku_info.external.entities.AnimeListItem.AnimeListItem
Class that models a general myanimelist list item Represents the information fetched using myanimelist’s jikan API
- classmethod from_query(media_type: otaku_info.enums.MediaType, data: Dict[str, Any]) otaku_info.external.entities.MyanimelistItem.MyanimelistItem ¶
Generates an MyanimelistItem from a dictionary generated by an APi query :param media_type: The media type of the item :param data: The data to use :return: The generated MyanimelistItem
- static resolve_media_subtype(subtype_string: str) otaku_info.enums.MediaSubType ¶
Resolves myanimelist media subtype :param subtype_string: The string to resolve :return: The resolved MediaSubType
- static resolve_relation_type(relation_string: str) otaku_info.enums.MediaRelationType ¶
Resolves myanimelist relation types :param relation_string: The string to resolve :return: The resolved MediaRelationType
- static resolve_releasing_state(releasing_string: str) otaku_info.enums.ReleasingState ¶
Resolves myanimelist releasing state :param releasing_string: The string to resolve :return: The resolved ReleasingState
otaku_info.external.entities.RedditLnRelease module¶
- class otaku_info.external.entities.RedditLnRelease.RedditLnRelease(series_name: str, year: int, release_date_string: str, volume: str, publisher: Optional[str], purchase_link: Optional[str], info_link: Optional[str], digital: bool, physical: bool)¶
Bases:
object
Object that acts as a wrapper around a light novel release on reddit.com
- __init__(series_name: str, year: int, release_date_string: str, volume: str, publisher: Optional[str], purchase_link: Optional[str], info_link: Optional[str], digital: bool, physical: bool)¶
Initializes the object :param series_name: The name of the series :param year: The year of release :param release_date_string: The month and day of release :param volume: The volume number :param publisher: The publisher of the release :param purchase_link: A purchase link for the release :param info_link: Link to information for the release :param digital: Whether or not the release is digital :param physical: Whether or not the release is physical
- property anilist_id: Optional[int]¶
- Returns
The anilist ID, if available
- classmethod from_parts(year: int, parts: List[bs4.element.Tag]) otaku_info.external.entities.RedditLnRelease.RedditLnRelease ¶
Generates a reddit LN release from BeautifulSoup td tags :param year: The year of the release :param parts: The td tags :return: The reddit ln release
- property myanimelist_id: Optional[int]¶
- Returns
The myanimelist ID, if available
- property release_date: datetime.datetime¶
- Returns
The release date as a datetime object
- property release_date_string: str¶
- Returns
The release date as a string (ISO 8601)