otaku_info_bot.fetching package¶
Submodules¶
otaku_info_bot.fetching.anilist module¶
-
class
otaku_info_bot.fetching.anilist.
GraphQlClient
(api_url: str)¶ Bases:
object
A simple API wrapper for GraphQL APIs
-
__init__
(api_url: str)¶ Initializes the GraphQL API wrapper :param api_url: The API endpoint URL
-
query
(query_string: str, variables: Optional[Dict[str, Any]]) → Optional[Dict[str, Any]]¶ Executes a GraphQL query :param query_string: The query string to use :param variables: The variables to send :return: The response JSON, or None if an error occurred.
-
-
otaku_info_bot.fetching.anilist.
guess_latest_manga_chapter
(anilist_id: int) → Optional[int]¶ Guesses the latest chapter number based on anilist user activity :param anilist_id: The anilist ID to check :return: The latest chapter number
-
otaku_info_bot.fetching.anilist.
load_anilist
(username: str, media_type: str, list_name: Optional[str] = None) → List[Dict[str, Any]]¶ Loads the anilist for a user :param username: The username :param media_type: The media type, either MANGA or ANIME :param list_name: Optionalyy restrict to a specific list :return: The anilist
otaku_info_bot.fetching.anime module¶
-
otaku_info_bot.fetching.anime.
load_newest_episodes
() → Dict[int, int]¶ Loads the newest episode numbers on /r/anime’s /u/autolovepon’s page :return: The show’s anilist ID mapped to the latest episode number
otaku_info_bot.fetching.ln module¶
-
otaku_info_bot.fetching.ln.
load_ln_releases
(year: Optional[int] = None, month: Optional[str] = None) → Dict[int, Dict[str, List[Dict[str, str]]]]¶ Loads the currently available light novel releases from reddit’s /r/lightnovels subreddit. :param year: Limits releases to a specific year :param month: Limits releases to a specific month :return: The releases, categorized by year and month