refactor: extract anime feature into its domain slice

This commit is contained in:
2026-04-06 22:38:37 +02:00
parent 67468b41a0
commit af6005500a
4 changed files with 89 additions and 44 deletions

View File

@@ -2,6 +2,16 @@ package jikan
import "fmt"
type SearchResult struct {
Animes []Anime
HasNextPage bool
}
type TopAnimeResult struct {
Animes []Anime
HasNextPage bool
}
// NamedEntity represents genres, studios, producers, etc.
type NamedEntity struct {
MalID int `json:"mal_id"`
@@ -145,13 +155,3 @@ func (a Anime) DisplayTitle() string {
}
return a.Title
}
type SearchResult struct {
Animes []Anime
HasNextPage bool
}
type TopAnimeResult struct {
Animes []Anime
HasNextPage bool
}