blob: b8fadfae8cb034130c77ee66c85bb7e0ba1f3c53 (
plain) (
blame)
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
|
# import requests
# def media_list(anilist, pageNumber):
# return requests.post(
# "https://graphql.anilist.co",
# json={"query": media_list_query(user_id(anilist), pageNumber)},
# headers={
# "Authorization": anilist["token_type"] + " " + anilist["access_token"],
# "Content-Type": "application/json",
# "Accept": "application/json",
# },
# ).json()["data"]
# def media_list_query(user_id: int, page_number: int) -> str:
# return f"""{{
# Page(page: {page_number}) {{
# mediaList(userId: {user_id}, status_not_in: [COMPLETED]) {{
# media {{
# id
# status
# type
# title {{ romaji english }}
# nextAiringEpisode {{ episode }}
# mediaListEntry {{ progress }}
# startDate {{ year }}
# }}
# }}
# pageInfo {{ hasNextPage }}
# }}
# }}"""
|