feat(backend): add genres support to AniList integration
Add the `genres` field to AniList GraphQL queries and type definitions: - Add genres field to GetAniListItem query for fetching single anime details - Add genres field to AniListSearch query for search results - Add genres field to GetAniListUserWatchingList query for user's watch list - Update MediaList type definition to include Genres []string field This enhancement allows the application to retrieve and display anime genre information from the AniList API, providing users with better categorization and discovery capabilities.
This commit is contained in:
@@ -93,6 +93,7 @@ func (a *App) GetAniListItem(aniId int, login bool) AniListGetSingleAnime {
|
|||||||
timeUntilAiring
|
timeUntilAiring
|
||||||
episode
|
episode
|
||||||
}
|
}
|
||||||
|
genres
|
||||||
tags{
|
tags{
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -222,6 +223,7 @@ func (a *App) AniListSearch(query string) any {
|
|||||||
timeUntilAiring
|
timeUntilAiring
|
||||||
episode
|
episode
|
||||||
}
|
}
|
||||||
|
genres
|
||||||
tags{
|
tags{
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -307,6 +309,7 @@ func (a *App) GetAniListUserWatchingList(page int, perPage int, sort string) Ani
|
|||||||
timeUntilAiring
|
timeUntilAiring
|
||||||
episode
|
episode
|
||||||
}
|
}
|
||||||
|
genres
|
||||||
tags{
|
tags{
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ type MediaList struct {
|
|||||||
TimeUntilAiring int `json:"timeUntilAiring"`
|
TimeUntilAiring int `json:"timeUntilAiring"`
|
||||||
Episode int `json:"episode"`
|
Episode int `json:"episode"`
|
||||||
} `json:"nextAiringEpisode"`
|
} `json:"nextAiringEpisode"`
|
||||||
|
Genres []string `json:"genres"`
|
||||||
Tags []struct {
|
Tags []struct {
|
||||||
Id int `json:"id"`
|
Id int `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|||||||
Reference in New Issue
Block a user