How to use the jikanpy.utils.get_creator_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_creator_url_with_page():
    assert (
        utils.get_creator_url(utils.BASE_URL, "producer", 2, page=2)
        == "https://api.jikan.moe/v3/producer/2/2"
    )
github AWConant / jikanpy / tests / test_utils.py View on Github external
def test_get_creator_url():
    assert (
        utils.get_creator_url(utils.BASE_URL, "producer", 2, page=None)
        == "https://api.jikan.moe/v3/producer/2"
    )
github AWConant / jikanpy / jikanpy / jikan.py View on Github external
def _get_creator(
        self, creator_type: str, creator_id: int, page: Optional[int] = None
    ) -> Dict[str, Any]:
        """Gets the response from Jikan API for producer and magazine"""
        url = utils.get_creator_url(self.base, creator_type, creator_id, page)
        return self._request(url, id=creator_id, endpoint=creator_type)
github AWConant / jikanpy / jikanpy / aiojikan.py View on Github external
async def _get_creator(
        self, creator_type: str, creator_id: int, page: Optional[int] = None
    ) -> Dict[str, Any]:
        """Gets the response from Jikan API for producer and magazine"""
        url = utils.get_creator_url(self.base, creator_type, creator_id, page)
        return await self._request(url, id=creator_id, endpoint=creator_type)