mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Added ids to ...FromID functions (how did this work before??)
This commit is contained in:
parent
aa1d72868b
commit
3ee5f7a538
4 changed files with 5 additions and 0 deletions
|
|
@ -94,6 +94,7 @@ func EpisodeFromID(crunchy *Crunchyroll, id string) (*Episode, error) {
|
||||||
|
|
||||||
episode := &Episode{
|
episode := &Episode{
|
||||||
crunchy: crunchy,
|
crunchy: crunchy,
|
||||||
|
ID: id,
|
||||||
}
|
}
|
||||||
if err := decodeMapToStruct(jsonBody, episode); err != nil {
|
if err := decodeMapToStruct(jsonBody, episode); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ func MovieListingFromID(crunchy *Crunchyroll, id string) (*MovieListing, error)
|
||||||
|
|
||||||
movieListing := &MovieListing{
|
movieListing := &MovieListing{
|
||||||
crunchy: crunchy,
|
crunchy: crunchy,
|
||||||
|
ID: id,
|
||||||
}
|
}
|
||||||
if err = decodeMapToStruct(jsonBody, movieListing); err != nil {
|
if err = decodeMapToStruct(jsonBody, movieListing); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ func SeasonFromID(crunchy *Crunchyroll, id string) (*Season, error) {
|
||||||
|
|
||||||
season := &Season{
|
season := &Season{
|
||||||
crunchy: crunchy,
|
crunchy: crunchy,
|
||||||
|
ID: id,
|
||||||
}
|
}
|
||||||
if err := decodeMapToStruct(jsonBody, season); err != nil {
|
if err := decodeMapToStruct(jsonBody, season); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
2
video.go
2
video.go
|
|
@ -86,6 +86,7 @@ func MovieFromID(crunchy *Crunchyroll, id string) (*Movie, error) {
|
||||||
movieListing := &Movie{
|
movieListing := &Movie{
|
||||||
crunchy: crunchy,
|
crunchy: crunchy,
|
||||||
}
|
}
|
||||||
|
movieListing.ID = id
|
||||||
if err = decodeMapToStruct(jsonBody, movieListing); err != nil {
|
if err = decodeMapToStruct(jsonBody, movieListing); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
@ -182,6 +183,7 @@ func SeriesFromID(crunchy *Crunchyroll, id string) (*Series, error) {
|
||||||
series := &Series{
|
series := &Series{
|
||||||
crunchy: crunchy,
|
crunchy: crunchy,
|
||||||
}
|
}
|
||||||
|
series.ID = id
|
||||||
if err = decodeMapToStruct(jsonBody, series); err != nil {
|
if err = decodeMapToStruct(jsonBody, series); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue