update code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
MANGA_QUERY = """
|
||||
query media($search: String) {
|
||||
QUERY = """
|
||||
query media($search: String, $type: MediaType) {
|
||||
Page {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
@@ -8,7 +8,7 @@ Page {
|
||||
currentPage
|
||||
lastPage
|
||||
}
|
||||
media(type: MANGA, search: $search) {
|
||||
media(type: $type, search: $search) {
|
||||
id
|
||||
title {
|
||||
romaji
|
||||
@@ -21,9 +21,9 @@ Page {
|
||||
}
|
||||
"""
|
||||
|
||||
MANGA_ID_QUERY = """
|
||||
ID_QUERY = """
|
||||
query media($id: Int) { # Define which variables will be used in the query (id)
|
||||
Media (type: MANGA, id:$id) { # Insert our variables into the query arguments (id)
|
||||
Media (id:$id) { # Insert our variables into the query arguments (id)
|
||||
id
|
||||
title {
|
||||
romaji
|
||||
@@ -53,11 +53,12 @@ Media (type: MANGA, id:$id) { # Insert our variables into the query arguments (i
|
||||
type
|
||||
}
|
||||
countryOfOrigin
|
||||
siteUrl
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
REQUESTS_QUERY = """query query($search: String, $genres:[String], $tags:[String], $format: MediaFormat) {
|
||||
REQUESTS_QUERY = """query query($search: String, $genres:[String], $tags:[String], $format: MediaFormat, $type: MediaType) {
|
||||
Page(perPage: 100) {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
@@ -66,7 +67,7 @@ Page(perPage: 100) {
|
||||
currentPage
|
||||
lastPage
|
||||
}
|
||||
media(type: MANGA, search: $search, genre_in: $genres, tag_in: $tags, sort: SEARCH_MATCH, format: $format) {
|
||||
media(type: $type, search: $search, genre_in: $genres, tag_in: $tags, sort: SEARCH_MATCH, format: $format) {
|
||||
id
|
||||
title {
|
||||
romaji
|
||||
@@ -102,8 +103,8 @@ Page(perPage: 100) {
|
||||
}
|
||||
}"""
|
||||
|
||||
REQUESTED_QUERY = """query query($search: Int) {
|
||||
Media(type: MANGA, id: $search, sort: SEARCH_MATCH) {
|
||||
REQUESTED_QUERY = """query query($search: Int, $type: MediaType) {
|
||||
Media(type: $type, id: $search, sort: SEARCH_MATCH) {
|
||||
id
|
||||
title {
|
||||
romaji
|
||||
|
||||
Reference in New Issue
Block a user