aboutsummaryrefslogtreecommitdiff
path: root/types/tmdb.go
blob: 49e570c1fc492f0e305831d222d05156a110b88d (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package types

type TMDBShowResult struct {
	ID            int      `json:"id"`
	Name          string   `json:"name"`
	FirstAirDate  string   `json:"first_air_date"`
	OriginCountry []string `json:"origin_country"`
	Adult         bool     `json:"adult"`
}

type TMDBSearchResponse struct {
	Page         int              `json:"page"`
	Results      []TMDBShowResult `json:"results"`
	TotalPages   int              `json:"total_pages"`
	TotalResults int              `json:"total_results"`
}

type TMDBEpisode struct {
	ID            int    `json:"id"`
	Name          string `json:"name"`
	Overview      string `json:"overview"`
	StillPath     string `json:"still_path"`
	AirDate       string `json:"air_date"`
	EpisodeNumber int    `json:"episode_number"`
	SeasonNumber  int    `json:"season_number"`
}

type TMDBSeasonDetails struct {
	ID           int           `json:"id"`
	AirDate      string        `json:"air_date"`
	EpisodeCount int           `json:"episode_count"`
	Name         string        `json:"name"`
	Overview     string        `json:"overview"`
	SeasonNumber int           `json:"season_number"`
	Episodes     []TMDBEpisode `json:"episodes"`
}

type TMDBShowDetails struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Overview string `json:"overview"`
	Seasons  []struct {
		ID           int    `json:"id"`
		Name         string `json:"name"`
		SeasonNumber int    `json:"season_number"`
		EpisodeCount int    `json:"episode_count"`
		AirDate      string `json:"air_date"`
	} `json:"seasons"`
}

type TMDBMovieResult struct {
	ID          int    `json:"id"`
	Adult       bool   `json:"adult"`
	Title       string `json:"title"`
	ReleaseDate string `json:"release_date"`
}

type TMDBMovieSearchResponse struct {
	Page         int               `json:"page"`
	Results      []TMDBMovieResult `json:"results"`
	TotalPages   int               `json:"total_pages"`
	TotalResults int               `json:"total_results"`
}

type TMDBMovieDetails struct {
	ID           int    `json:"id"`
	Title        string `json:"title"`
	Overview     string `json:"overview"`
	BackdropPath string `json:"backdrop_path"`
	PosterPath   string `json:"poster_path"`
	ReleaseDate  string `json:"release_date"`
	Runtime      int    `json:"runtime"`
}