-
Notifications
You must be signed in to change notification settings - Fork 1
/
shows.go
32 lines (27 loc) · 988 Bytes
/
shows.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
package fanarttv
// ShowResult represents the result for a show
type ShowResult struct {
Name string `json:"name"`
TvdbID string `json:"thetvdb_id"`
Backgrounds []*ImageInfo `json:"showbackground"`
Banners []*ImageInfo `json:"tvbanner"`
CharacterArts []*ImageInfo `json:"characterart"`
ClearArts []*ImageInfo `json:"clearart"`
ClearLogos []*ImageInfo `json:"clearlogo"`
HDClearArts []*ImageInfo `json:"hdclearart"`
HDTVLogos []*ImageInfo `json:"hdtvlogo"`
Posters []*ImageInfo `json:"tvposter"`
SeasonBanners []*ImageInfo `json:"seasonbanner"`
SeasonPosters []*ImageInfo `json:"seasonposter"`
SeasonThumbs []*ImageInfo `json:"seasonthumb"`
Thumbs []*ImageInfo `json:"tvthumb"`
}
// GetShowImages returns the images for a show
func (c *Client) GetShowImages(tvdbID string) (*ShowResult, error) {
url := c.Endpoint + "/tv/" + tvdbID
var sr ShowResult
if err := c.get(url, &sr); err != nil {
return nil, err
}
return &sr, nil
}