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:
2025-05-23 16:20:56 +02:00
parent 88cc93fd50
commit 049f985c2d
4 changed files with 226 additions and 10 deletions

View File

@@ -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}}"""