How to use the jikanpy.AioJikan 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_aiojikan.py View on Github external
async def test_construct_using_async_with():
    async with AioJikan() as temp_aio_jikan:
        assert isinstance(temp_aio_jikan, AioJikan)
github AWConant / jikanpy / tests / test_aiojikan.py View on Github external
async def test_strip_base_url():
    async with AioJikan("http://localhost:8000/v3/") as temp_aio_jikan:
        assert temp_aio_jikan.base == "http://localhost:8000/v3"

    async with AioJikan("http://localhost:8000/v3/ ") as temp_aio_jikan_2:
        assert temp_aio_jikan_2.base == "http://localhost:8000/v3"
github AWConant / jikanpy / tests / test_aiojikan.py View on Github external
async def test_strip_base_url():
    async with AioJikan("http://localhost:8000/v3/") as temp_aio_jikan:
        assert temp_aio_jikan.base == "http://localhost:8000/v3"

    async with AioJikan("http://localhost:8000/v3/ ") as temp_aio_jikan_2:
        assert temp_aio_jikan_2.base == "http://localhost:8000/v3"
github AWConant / jikanpy / examplesasync.py View on Github external
from pprint import pprint

import asyncio
from jikanpy import AioJikan


aio_jikan = AioJikan()


async def main():
    async with AioJikan() as aio_jikan:
        mushishi = await aio_jikan.anime(457)
        pprint(mushishi)

        fma = await aio_jikan.manga(25)
        pprint(fma)

        ginko = await aio_jikan.character(425)
        pprint(ginko)

        naruto = await aio_jikan.search(search_type="anime", query="naruto")
        pprint(naruto)