]> git.lizzy.rs Git - go-anidb.git/blob - episode.go
Modernize
[go-anidb.git] / episode.go
1 package anidb
2
3 import (
4         "github.com/EliasFleckenstein03/go-anidb/misc"
5         "time"
6 )
7
8 type Episode struct {
9         EID EID // The Episode ID.
10         AID AID // The Anime ID this Episode belongs to.
11
12         // Type, Number
13         misc.Episode
14
15         Length time.Duration // rounded somehow to minutes
16
17         AirDate *time.Time // The original release date, if available.
18         Rating  Rating     // Episode-specific ratings.
19
20         Titles UniqueTitleMap // Map with a title for each language
21
22         Cached time.Time // When the data was retrieved from the server
23 }
24
25 func (ep *Episode) Anime() *Anime {
26         return ep.AID.Anime()
27 }