Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_get_season_archive_url():
assert (
utils.get_season_archive_url(utils.BASE_URL)
== "https://api.jikan.moe/v3/season/archive"
)
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)
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)
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)