mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Move WatchlistEntry struct to own file
This commit is contained in:
parent
f9792aa847
commit
8ddb436fac
2 changed files with 13 additions and 12 deletions
12
episode.go
12
episode.go
|
|
@ -100,18 +100,6 @@ const (
|
|||
WATCHLISTENTRYSERIES = "series"
|
||||
)
|
||||
|
||||
// WatchlistEntry contains information about an entry on the watchlist.
|
||||
type WatchlistEntry struct {
|
||||
Panel Panel `json:"panel"`
|
||||
|
||||
New bool `json:"new"`
|
||||
NewContent bool `json:"new_content"`
|
||||
IsFavorite bool `json:"is_favorite"`
|
||||
NeverWatched bool `json:"never_watched"`
|
||||
CompleteStatus bool `json:"complete_status"`
|
||||
Playahead uint `json:"playahead"`
|
||||
}
|
||||
|
||||
// EpisodeFromID returns an episode by its api id.
|
||||
func EpisodeFromID(crunchy *Crunchyroll, id string) (*Episode, error) {
|
||||
resp, err := crunchy.request(fmt.Sprintf("https://beta-api.crunchyroll.com/cms/v2/%s/%s/%s/episodes/%s?locale=%s&Signature=%s&Policy=%s&Key-Pair-Id=%s",
|
||||
|
|
|
|||
13
watchlist.go
Normal file
13
watchlist.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package crunchyroll
|
||||
|
||||
// WatchlistEntry contains information about an entry on the watchlist.
|
||||
type WatchlistEntry struct {
|
||||
Panel Panel `json:"panel"`
|
||||
|
||||
New bool `json:"new"`
|
||||
NewContent bool `json:"new_content"`
|
||||
IsFavorite bool `json:"is_favorite"`
|
||||
NeverWatched bool `json:"never_watched"`
|
||||
CompleteStatus bool `json:"complete_status"`
|
||||
Playahead uint `json:"playahead"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue