-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathepisode.go
37 lines (27 loc) · 824 Bytes
/
episode.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package trakt
import "time"
type EpisodeListParams struct {
BasicParams
TranslationLanguage string `url:"translations,omitempty" json:"-"`
}
type Episode struct {
commonElements `json:",inline"`
Season int64 `json:"season"`
Number int64 `json:"number"`
Absolute int64 `json:"number_abs"`
FirstAired time.Time `json:"first_aired"`
}
type EpisodeIterator struct{ Iterator }
func (e *EpisodeIterator) Episode() (*Episode, error) {
rcv := &Episode{}
return rcv, e.Scan(rcv)
}
type EpisodeWithTranslations struct {
Episode
Translations []*Translation `json:"translations"`
}
type EpisodeWithTranslationsIterator struct{ BasicIterator }
func (e *EpisodeWithTranslationsIterator) Episode() (*EpisodeWithTranslations, error) {
rcv := &EpisodeWithTranslations{}
return rcv, e.Scan(rcv)
}