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_url():
assert (
utils.get_season_url(utils.BASE_URL, 2020, "Spring")
== "https://api.jikan.moe/v3/season/2020/spring"
)
async def season(self, year: int, season: str) -> Dict[str, Any]:
"""Gets information on anime of the specific season.
Args:
year (:obj:`int`): Year to get anime of.
season (:obj:`str`): Season to get anime of. Possible values are
winter, spring, summer, and fall.
Returns:
Dict: Dictionary containing information on anime of the season.
Examples:
>>> await jikan.season(year=2018, season='winter')
>>> await jikan.season(year=2016, season='spring')
"""
url = utils.get_season_url(self.base, year, season)
return await self._request(url, year=year, season=season)
def season(self, year: int, season: str) -> Dict[str, Any]:
"""Gets information on anime of the specific season.
Args:
year (:obj:`int`): Year to get anime of.
season (:obj:`str`): Season to get anime of. Possible values are
winter, spring, summer, and fall.
Returns:
Dict: Dictionary containing information on anime of the season.
Examples:
>>> jikan.season(year=2018, season='winter')
>>> jikan.season(year=2016, season='spring')
"""
url = utils.get_season_url(self.base, year, season)
return self._request(url, year=year, season=season)