How to use the jikanpy.utils.get_schedule_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_schedule_url_with_day():
    assert (
        utils.get_schedule_url(utils.BASE_URL, "Tuesday")
        == "https://api.jikan.moe/v3/schedule/tuesday"
    )
github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_schedule_url():
    assert (
        utils.get_schedule_url(utils.BASE_URL, day=None)
        == "https://api.jikan.moe/v3/schedule"
    )
github AWConant / jikanpy / jikanpy / jikan.py View on Github external
def schedule(self, day: Optional[str] = None) -> Dict[str, Any]:
        """Gets anime scheduled.

        Args:
            day (:obj:`str`, optional): Day of the week to get the scheduled
                anime. Defaults to None.

        Returns:
            Dict: Dictionary containing anime scheduled.

        Examples:
            >>> jikan.schedule()
            >>> jikan.schedule(day='monday')
        """
        url = utils.get_schedule_url(self.base, day)
        return self._request(url, day=day)
github AWConant / jikanpy / jikanpy / aiojikan.py View on Github external
async def schedule(self, day: Optional[str] = None) -> Dict[str, Any]:
        """Gets anime scheduled.

        Args:
            day (:obj:`str`, optional): Day of the week to get the scheduled
                anime. Defaults to None.

        Returns:
            Dict: Dictionary containing anime scheduled.

        Examples:
            >>> await jikan.schedule()
            >>> await jikan.schedule(day='monday')
        """
        url = utils.get_schedule_url(self.base, day)
        return await self._request(url, day=day)