How to use the jikanpy.utils.get_meta_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_meta_url_with_weekly_anime_requests_and_offset():
    assert (
        utils.get_meta_url(
            utils.BASE_URL, "requests", type="anime", period="weekly", offset=2,
        )
        == "https://api.jikan.moe/v3/meta/requests/anime/weekly/2"
    )
github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_meta_url_with_type_and_no_period():
    assert (
        utils.get_meta_url(
            utils.BASE_URL, "requests", type="anime", period=None, offset=None,
        )
        == "https://api.jikan.moe/v3/meta/requests"
    )
github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_meta_url():
    assert (
        utils.get_meta_url(
            utils.BASE_URL, "status", type=None, period=None, offset=None
        )
        == "https://api.jikan.moe/v3/meta/status"
    )
github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_meta_url_with_no_type_and_period():
    assert (
        utils.get_meta_url(
            utils.BASE_URL, "requests", type=None, period="weekly", offset=None,
        )
        == "https://api.jikan.moe/v3/meta/requests"
    )
github AWConant / jikanpy / jikanpy / aiojikan.py View on Github external
Defaults to None.
            period (:obj:`str`, optional): Time period to get for requests.
                Possible values are today, weekly, and monthly. Defaults to
                None.
            offset (:obj:`int`, optional): 1,000 requests are shown per page.
                Offset is used to show more. Defaults to None.

        Returns:
            Dict: Dictionary containing meta information.

        Examples:
            >>> await jikan.meta('requests')
            >>> await jikan.meta('requests', type='anime', period='today')
            >>> await jikan.meta('status')
        """
        url = utils.get_meta_url(self.base, request, type, period, offset)
        return await self._request(url, request=request, type=type, period=period)
github AWConant / jikanpy / jikanpy / jikan.py View on Github external
Defaults to None.
            period (:obj:`str`, optional): Time period to get for requests.
                Possible values are today, weekly, and monthly. Defaults to
                None.
            offset (:obj:`int`, optional): 1,000 requests are shown per page.
                Offset is used to show more. Defaults to None.

        Returns:
            Dict: Dictionary containing meta information.

        Examples:
            >>> jikan.meta('requests')
            >>> jikan.meta('requests', type='anime', period='today')
            >>> jikan.meta('status')
        """
        url = utils.get_meta_url(self.base, request, type, period, offset)
        return self._request(url, request=request, type=type, period=period)