-
Notifications
You must be signed in to change notification settings - Fork 29
/
examplesasync.py
36 lines (23 loc) · 864 Bytes
/
examplesasync.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from pprint import pprint
import asyncio
from jikanpy import AioJikan
aio_jikan = AioJikan()
# The following are examples only. Running this many at once
# will get you rate limited if you are not self hosting
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.characters(425)
pprint(ginko)
naruto = await aio_jikan.search(search_type="anime", query="naruto")
pprint(naruto)
winter_2018 = await aio_jikan.seasons(year=2018, season="winter")
pprint(winter_2018)
monday = await aio_jikan.schedules(day="monday")
pprint(monday)
top_anime = await aio_jikan.top(type="anime")
pprint(top_anime)
asyncio.run(main())