Commit f859003a0a
Unsigned
Layout: unified · split
internal/structs.go +32 −23
| @@ -1,41 +1,50 @@ | ||
| 1 | 1 | package internal |
| 2 | 2 | |
| 3 | 3 | type AnimeTitle struct { |
| 4 | Romaji string | |
| 5 | English string | |
| 6 | Japanese string | |
| 4 | Romaji string `json:"title_romanji"` | |
| 5 | English string `json:"title"` | |
| 6 | Japanese string `json:"title_japanese"` | |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | type Anime struct { |
| 10 | Title AnimeTitle | |
| 11 | Ep Episode | |
| 12 | TotalEpisodes int | |
| 13 | MalId int | |
| 14 | AnilistId int | |
| 15 | AllanimeId string | |
| 10 | Title AnimeTitle `json:"title"` | |
| 11 | Ep Episode `json:"ep"` | |
| 12 | CoverImage string `json:"url"` // Assuming this field corresponds to the cover image URL | |
| 13 | TotalEpisodes int `json:"total_episodes"` // If provided by the API | |
| 14 | MalId int `json:"mal_id"` | |
| 15 | AnilistId int `json:"anilist_id"` // Assuming you have an Anilist ID in your struct | |
| 16 | AllanimeId string // Can be populated as necessary | |
| 17 | } | |
| 18 | ||
| 19 | type Skip struct { | |
| 20 | Start int `json:"start"` | |
| 21 | End int `json:"end"` | |
| 16 | 22 | } |
| 17 | 23 | |
| 18 | 24 | type SkipTimes struct { |
| 19 | Op int | |
| 20 | Ed int | |
| 25 | Op Skip `json:"op"` | |
| 26 | Ed Skip `json:"ed"` | |
| 21 | 27 | } |
| 22 | 28 | |
| 23 | 29 | type Episode struct { |
| 24 | Tit AnimeTitle | |
| 25 | Number int | |
| 26 | Skip_times SkipTimes | |
| 27 | Player playingVideo | |
| 28 | Links []string | |
| 29 | Is_filler bool | |
| 30 | Is_recap bool | |
| 31 | Aired string | |
| 32 | Synopsis string | |
| 30 | Title AnimeTitle `json:"title"` | |
| 31 | Number int `json:"number"` | |
| 32 | SkipTimes SkipTimes `json:"skip_times"` | |
| 33 | Player playingVideo `json:"player"` | |
| 34 | Resume bool `json:"resume"` | |
| 35 | Started bool `json:"started"` | |
| 36 | Duration int `json:"duration"` | |
| 37 | Links []string `json:"links"` | |
| 38 | IsFiller bool `json:"filler"` | |
| 39 | IsRecap bool `json:"recap"` | |
| 40 | Aired string `json:"aired"` | |
| 41 | Synopsis string `json:"synopsis"` | |
| 33 | 42 | } |
| 34 | 43 | |
| 35 | 44 | type playingVideo struct { |
| 36 | Url string | |
| 37 | Speed float64 | |
| 38 | PlaybackTime int | |
| 45 | Url string | |
| 46 | Speed float64 `json:"speed"` | |
| 47 | PlaybackTime int `json:"playback_time"` | |
| 39 | 48 | } |
| 40 | 49 | |
| 41 | 50 | type User struct { |