How to use the jikanpy.utils.get_user_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_user_url_with_friends_and_page():
    assert (
        utils.get_user_url(
            utils.BASE_URL,
            "Xinil",
            request="friends",
            argument=None,
            page=2,
            parameters=None,
        )
        == "https://api.jikan.moe/v3/user/xinil/friends/2"
    )
github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_user_url_with_anime_history():
    assert (
        utils.get_user_url(
            utils.BASE_URL,
            "Xinil",
            request="history",
            argument="anime",
            page=None,
            parameters=None,
        )
        == "https://api.jikan.moe/v3/user/xinil/history/anime"
    )
github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_user_url():
    assert (
        utils.get_user_url(
            utils.BASE_URL,
            "Xinil",
            request=None,
            argument=None,
            page=None,
            parameters=None,
        )
        == "https://api.jikan.moe/v3/user/xinil"
    )
github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_user_url_with_animelist_and_page_parameter():
    assert (
        utils.get_user_url(
            utils.BASE_URL,
            "Xinil",
            request="animelist",
            argument="completed",
            page=None,
            parameters={"page": 2},
        )
        == "https://api.jikan.moe/v3/user/xinil/animelist/completed?page=2"
    )
github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_user_url_with_profile():
    assert (
        utils.get_user_url(
            utils.BASE_URL,
            "Xinil",
            request="profile",
            argument=None,
            page=None,
            parameters=None,
        )
        == "https://api.jikan.moe/v3/user/xinil/profile"
    )
github AWConant / jikanpy / jikanpy / aiojikan.py View on Github external
>>> await jikan.user(username='Xinil')
            >>> await jikan.user(username='Xinil', request='profile')
            >>> await jikan.user(username='Xinil', request='friends', page=2)
            >>> await jikan.user(username='Xinil', request='history')
            >>> await jikan.user(username='Xinil', request='animelist', argument='ptw')
            >>> await jikan.user(
                    username='Xinil', request='animelist', parameters={'page': 2}
                )
            >>> await jikan.user(
                    username='Xinil',
                    request='animelist',
                    argument='ptw',
                    parameters={'page': 2}
                )
        """
        url = utils.get_user_url(
            self.base, username, request, argument, page, parameters
        )
        return await self._request(url, username=username, request=request)
github AWConant / jikanpy / jikanpy / jikan.py View on Github external
>>> jikan.user(username='Xinil')
            >>> jikan.user(username='Xinil', request='profile')
            >>> jikan.user(username='Xinil', request='friends', page=2)
            >>> jikan.user(username='Xinil', request='history')
            >>> jikan.user(username='Xinil', request='animelist', argument='ptw')
            >>> jikan.user(
                    username='Xinil', request='animelist', parameters={'page': 2}
                )
            >>> jikan.user(
                    username='Xinil',
                    request='animelist',
                    argument='ptw',
                    parameters={'page': 2}
                )
        """
        url = utils.get_user_url(
            self.base, username, request, argument, page, parameters
        )
        return self._request(url, username=username, request=request)