Move WatchlistEntry struct to own file

This commit is contained in:
bytedream 2022-06-19 01:03:10 +02:00
parent f9792aa847
commit 8ddb436fac
2 changed files with 13 additions and 12 deletions

View file

@ -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
View 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"`
}