Skip to content

Commit

Permalink
Merge pull request #49 from fancybits/add-logos-to-tv-images
Browse files Browse the repository at this point in the history
Extract TVImage and add Logos for TV series
  • Loading branch information
cyruzin authored Dec 19, 2023
2 parents 6d49d56 + 1212a4b commit 740dcc8
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions tv.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ type TVAccountStates struct {
// If it belongs to your favourite list.
//
// https://developers.themoviedb.org/3/tv/get-tv-account-states
//
func (c *Client) GetTVAccountStates(
id int,
urlOptions map[string]string,
Expand Down Expand Up @@ -568,27 +567,23 @@ func (c *Client) GetTVExternalIDs(
return &tvExternalIDs, nil
}

// TVImage type is a struct for a single image.
type TVImage struct {
AspectRatio float32 `json:"aspect_ratio"`
FilePath string `json:"file_path"`
Height int `json:"height"`
Iso639_1 string `json:"iso_639_1"`
VoteAverage float32 `json:"vote_average"`
VoteCount int64 `json:"vote_count"`
Width int `json:"width"`
}

// TVImages type is a struct for images JSON response.
type TVImages struct {
ID int64 `json:"id,omitempty"`
Backdrops []struct {
AspectRatio float32 `json:"aspect_ratio"`
FilePath string `json:"file_path"`
Height int `json:"height"`
Iso639_1 string `json:"iso_639_1"`
VoteAverage float32 `json:"vote_average"`
VoteCount int64 `json:"vote_count"`
Width int `json:"width"`
} `json:"backdrops"`
Posters []struct {
AspectRatio float32 `json:"aspect_ratio"`
FilePath string `json:"file_path"`
Height int `json:"height"`
Iso639_1 string `json:"iso_639_1"`
VoteAverage float32 `json:"vote_average"`
VoteCount int64 `json:"vote_count"`
Width int `json:"width"`
} `json:"posters"`
ID int64 `json:"id,omitempty"`
Backdrops []MovieImage `json:"backdrops"`
Logos []MovieImage `json:"logos"`
Posters []MovieImage `json:"posters"`
}

// GetTVImages get the images that belong to a TV show.
Expand Down

0 comments on commit 740dcc8

Please sign in to comment.