Add Gitea CI workflow and enhance AnilistAPI with new queries and data handling
- Introduced a Gitea CI workflow for building and publishing the package. - Updated AnilistAPI to support additional queries for genres and tags. - Improved request handling and response parsing in the API. - Enhanced Manga schema to ensure proper type annotations and data structure.
This commit is contained in:
@@ -3,6 +3,10 @@ query media($search: String) {
|
||||
Page {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
total
|
||||
perPage
|
||||
currentPage
|
||||
lastPage
|
||||
}
|
||||
media(type: MANGA, search: $search) {
|
||||
id
|
||||
@@ -52,3 +56,87 @@ Media (type: MANGA, id:$id) { # Insert our variables into the query arguments (i
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
REQUESTS_QUERY = """query query($search: String, $genres:[String], $tags:[String], $format: MediaFormat) {
|
||||
Page(perPage: 100) {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
total
|
||||
perPage
|
||||
currentPage
|
||||
lastPage
|
||||
}
|
||||
media(type: MANGA, search: $search, genre_in: $genres, tag_in: $tags, sort: SEARCH_MATCH, format: $format) {
|
||||
id
|
||||
title {
|
||||
romaji
|
||||
english
|
||||
native
|
||||
}
|
||||
synonyms
|
||||
format
|
||||
type
|
||||
status(version:2)
|
||||
genres
|
||||
tags{
|
||||
name
|
||||
isAdult
|
||||
}
|
||||
description
|
||||
coverImage {
|
||||
large
|
||||
|
||||
}
|
||||
isAdult
|
||||
chapters
|
||||
volumes
|
||||
externalLinks {
|
||||
site
|
||||
url
|
||||
type
|
||||
}
|
||||
countryOfOrigin
|
||||
siteUrl
|
||||
}
|
||||
|
||||
}
|
||||
}"""
|
||||
|
||||
REQUESTED_QUERY = """query query($search: Int) {
|
||||
Media(type: MANGA, id: $search, sort: SEARCH_MATCH) {
|
||||
id
|
||||
title {
|
||||
romaji
|
||||
english
|
||||
native
|
||||
}
|
||||
synonyms
|
||||
format
|
||||
type
|
||||
status(version:2)
|
||||
genres
|
||||
tags{
|
||||
name
|
||||
isAdult
|
||||
}
|
||||
description
|
||||
coverImage {
|
||||
large
|
||||
|
||||
}
|
||||
isAdult
|
||||
chapters
|
||||
volumes
|
||||
externalLinks {
|
||||
site
|
||||
url
|
||||
type
|
||||
}
|
||||
countryOfOrigin
|
||||
}
|
||||
|
||||
}"""
|
||||
|
||||
GENRES_QUERY = """query query{genres:GenreCollection}"""
|
||||
|
||||
TAGS_QUERY = """query query{tags:MediaTagCollection{name}}"""
|
||||
|
||||
Reference in New Issue
Block a user