How to use the jikanpy.utils.get_season_archive_url function in jikanpy

To help you get started, we’ve selected a few jikanpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_season_archive_url():
    assert (
        utils.get_season_archive_url(utils.BASE_URL)
        == "https://api.jikan.moe/v3/season/archive"
    )
github AWConant / jikanpy / tests / test_jikan.py View on Github external
def test_season_urls(jikan):
    season_archive_url = utils.get_season_archive_url(jikan.base)
    season_later_url = utils.get_season_later_url(jikan.base)
    assert season_archive_url.endswith("season/archive")
    assert season_later_url.endswith("season/later")
    assert season_archive_url.startswith(jikan.base)
github AWConant / jikanpy / jikanpy / jikan.py View on Github external
def season_archive(self) -> Dict[str, Any]:
        """Gets all the years and their respective seasons from MyAnimeList.

        Returns:
            Dict: Dictionary containing all the years and seasons.

        Examples:
            >>> jikan.season_archive()
        """
        url = utils.get_season_archive_url(self.base)
        return self._request(url)
github AWConant / jikanpy / jikanpy / aiojikan.py View on Github external
async def season_archive(self) -> Dict[str, Any]:
        """Gets all the years and their respective seasons from MyAnimeList.

        Returns:
            Dict: Dictionary containing all the years and seasons.

        Examples:
            >>> await jikan.season_archive()
        """
        url = utils.get_season_archive_url(self.base)
        return await self._request(url)