Skip to content

Commit

Permalink
📝 Update usage section
Browse files Browse the repository at this point in the history
  • Loading branch information
MrArkon authored May 15, 2022
1 parent 943fa81 commit 7aaab9d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,17 @@ import asyncio
client = kitsu.Client()

async def main():
# Search a specific anime with the name
anime = await client.search_anime("jujutsu kaisen", limit=1)

print("Canonical Title: " + anime.canonical_title)
print("Average Rating: " + str(anime.average_rating))

# This returns a list of 5 animes in the spring season 2022
animes_in_spring = await client.search_anime(limit=5, season_year=2022, season='spring')

print(*[a.title for a in animes_in_spring], sep=", ")

# Close the internal aiohttp ClientSession
await client.close()

Expand All @@ -59,6 +65,7 @@ This prints:
```
Canonical Title: Jujutsu Kaisen
Average Rating: 85.98
That Time I Got Reincarnated as a Slime: Ramiris to the Rescue, Blue Thermal, Q&A=E, Smol Adventures, Estab-Life: Great Escape
```
You can find more examples in the [examples](https://github.com/MrArkon/kitsu.py/tree/master/examples/) directory.

Expand Down

0 comments on commit 7aaab9d

Please sign in to comment.