How to use the jikanpy.utils.get_season_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_url():
    assert (
        utils.get_season_url(utils.BASE_URL, 2020, "Spring")
        == "https://api.jikan.moe/v3/season/2020/spring"
    )
github AWConant / jikanpy / jikanpy / aiojikan.py View on Github external
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)
github AWConant / jikanpy / jikanpy / jikan.py View on Github external
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)