Skip to content
This repository has been archived by the owner on Jan 9, 2022. It is now read-only.

Latest commit

 

History

History
38 lines (23 loc) · 929 Bytes

quickstart.rst

File metadata and controls

38 lines (23 loc) · 929 Bytes

Quickstart

Warning

All AsyncDex operations have to be done inside of an async context.

Create an instance of MangadexClient:

from asyncdex import MangadexClient

async def main():
    client = MangadexClient()

Make a request for a random manga and print the authors of the manga:

manga = await client.random_manga()
print(f"{manga.id}: {manga.titles.en.primary}")
await manga.load_authors()
print(f"Author of {manga.titles.en.primary}: {manga.authors[0].name}")

Log in to your MangaDex account (see authentication for other authentication options):

client = MangadexClient(username="yourusername", password="yourpassword")
await client.login()

View your manga follows list:

async for item in client.user.manga():
    print(item.titles.first().primary)