Coverage Report
Generated on 09 Feb 15 20:28 -0500 with
gocov-htmlPackage Overview: github.com/ryanbradynd05/go-tmdb 100.00%
This is a coverage report created after analysis of the github.com/ryanbradynd05/go-tmdb package. It
has been generated with the following command:
gocov test github.com/ryanbradynd05/go-tmdb | gocov-html
Here are the stats. Please select a function name to view its implementation and see what's left for testing.
func TMDb.SearchTv
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/search.go:
| 239 | func (tmdb *TMDb) SearchTv(name string, options map[string]string) (*TvSearchResults, error) { |
| 240 | var availableOptions = map[string]struct{}{ |
| 241 | "page": {}, |
| 242 | "language": {}, |
| 243 | "search_type": {}, |
| 244 | "first_air_date_year": {}} |
| 245 | var shows TvSearchResults |
| 246 | safeName := url.QueryEscape(name) |
| 247 | optionsString := getOptionsString(options, availableOptions) |
| 248 | uri := fmt.Sprintf("%s/search/tv?query=%s&api_key=%s%s", baseURL, safeName, tmdb.apiKey, optionsString) |
| 249 | result, err := getTmdb(uri, &shows) |
| 250 | return result.(*TvSearchResults), err |
| 251 | } |
func TMDb.SearchKeyword
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/search.go:
| 164 | func (tmdb *TMDb) SearchKeyword(name string, options map[string]string) (*KeywordSearchResults, error) { |
| 165 | var availableOptions = map[string]struct{}{ |
| 166 | "page": {}} |
| 167 | var keywords KeywordSearchResults |
| 168 | safeName := url.QueryEscape(name) |
| 169 | optionsString := getOptionsString(options, availableOptions) |
| 170 | uri := fmt.Sprintf("%s/search/keyword?query=%s&api_key=%s%s", baseURL, safeName, tmdb.apiKey, optionsString) |
| 171 | result, err := getTmdb(uri, &keywords) |
| 172 | return result.(*KeywordSearchResults), err |
| 173 | } |
func TMDb.SearchCompany
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/search.go:
| 151 | func (tmdb *TMDb) SearchCompany(name string, options map[string]string) (*CompanySearchResults, error) { |
| 152 | var availableOptions = map[string]struct{}{ |
| 153 | "page": {}} |
| 154 | var companies CompanySearchResults |
| 155 | safeName := url.QueryEscape(name) |
| 156 | optionsString := getOptionsString(options, availableOptions) |
| 157 | uri := fmt.Sprintf("%s/search/company?query=%s&api_key=%s%s", baseURL, safeName, tmdb.apiKey, optionsString) |
| 158 | result, err := getTmdb(uri, &companies) |
| 159 | return result.(*CompanySearchResults), err |
| 160 | } |
func TMDb.SearchCollection
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/search.go:
| 137 | func (tmdb *TMDb) SearchCollection(name string, options map[string]string) (*CollectionSearchResults, error) { |
| 138 | var availableOptions = map[string]struct{}{ |
| 139 | "page": {}, |
| 140 | "language": {}} |
| 141 | var collections CollectionSearchResults |
| 142 | safeName := url.QueryEscape(name) |
| 143 | optionsString := getOptionsString(options, availableOptions) |
| 144 | uri := fmt.Sprintf("%s/search/collection?query=%s&api_key=%s%s", baseURL, safeName, tmdb.apiKey, optionsString) |
| 145 | result, err := getTmdb(uri, &collections) |
| 146 | return result.(*CollectionSearchResults), err |
| 147 | } |
func TMDb.SearchPerson
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/search.go:
| 224 | func (tmdb *TMDb) SearchPerson(name string, options map[string]string) (*PersonSearchResults, error) { |
| 225 | var availableOptions = map[string]struct{}{ |
| 226 | "page": {}, |
| 227 | "search_type": {}, |
| 228 | "include_adult": {}} |
| 229 | var people PersonSearchResults |
| 230 | safeName := url.QueryEscape(name) |
| 231 | optionsString := getOptionsString(options, availableOptions) |
| 232 | uri := fmt.Sprintf("%s/search/person?query=%s&api_key=%s%s", baseURL, safeName, tmdb.apiKey, optionsString) |
| 233 | result, err := getTmdb(uri, &people) |
| 234 | return result.(*PersonSearchResults), err |
| 235 | } |
func TMDb.SearchMulti
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/search.go:
| 209 | func (tmdb *TMDb) SearchMulti(name string, options map[string]string) (*MultiSearchResults, error) { |
| 210 | var availableOptions = map[string]struct{}{ |
| 211 | "page": {}, |
| 212 | "language": {}, |
| 213 | "include_adult": {}} |
| 214 | var multis MultiSearchResults |
| 215 | safeName := url.QueryEscape(name) |
| 216 | optionsString := getOptionsString(options, availableOptions) |
| 217 | uri := fmt.Sprintf("%s/search/multi?query=%s&api_key=%s%s", baseURL, safeName, tmdb.apiKey, optionsString) |
| 218 | result, err := getTmdb(uri, &multis) |
| 219 | return result.(*MultiSearchResults), err |
| 220 | } |
func TMDb.SearchMovie
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/search.go:
| 191 | func (tmdb *TMDb) SearchMovie(name string, options map[string]string) (*MovieSearchResults, error) { |
| 192 | var availableOptions = map[string]struct{}{ |
| 193 | "page": {}, |
| 194 | "language": {}, |
| 195 | "include_adult": {}, |
| 196 | "year": {}, |
| 197 | "primary_release_year": {}, |
| 198 | "search_type": {}} |
| 199 | var movies MovieSearchResults |
| 200 | safeName := url.QueryEscape(name) |
| 201 | optionsString := getOptionsString(options, availableOptions) |
| 202 | uri := fmt.Sprintf("%s/search/movie?query=%s&api_key=%s%s", baseURL, safeName, tmdb.apiKey, optionsString) |
| 203 | result, err := getTmdb(uri, &movies) |
| 204 | return result.(*MovieSearchResults), err |
| 205 | } |
func TMDb.SearchList
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/search.go:
| 177 | func (tmdb *TMDb) SearchList(name string, options map[string]string) (*ListSearchResults, error) { |
| 178 | var availableOptions = map[string]struct{}{ |
| 179 | "page": {}, |
| 180 | "include_adult": {}} |
| 181 | var lists ListSearchResults |
| 182 | safeName := url.QueryEscape(name) |
| 183 | optionsString := getOptionsString(options, availableOptions) |
| 184 | uri := fmt.Sprintf("%s/search/list?query=%s&api_key=%s%s", baseURL, safeName, tmdb.apiKey, optionsString) |
| 185 | result, err := getTmdb(uri, &lists) |
| 186 | return result.(*ListSearchResults), err |
| 187 | } |
func TMDb.GetMovieGenres
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/genres.go:
| 17 | func (tmdb *TMDb) GetMovieGenres(options map[string]string) (*Genre, error) { |
| 18 | var availableOptions = map[string]struct{}{ |
| 19 | "language": {}} |
| 20 | var movieGenres Genre |
| 21 | optionsString := getOptionsString(options, availableOptions) |
| 22 | uri := fmt.Sprintf("%s/genre/movie/list?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 23 | result, err := getTmdb(uri, &movieGenres) |
| 24 | return result.(*Genre), err |
| 25 | } |
func TMDb.GetCollectionInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/collections.go:
| 43 | func (tmdb *TMDb) GetCollectionInfo(id int, options map[string]string) (*Collection, error) { |
| 44 | var availableOptions = map[string]struct{}{ |
| 45 | "language": {}, |
| 46 | "append_to_response": {}} |
| 47 | var collection Collection |
| 48 | optionsString := getOptionsString(options, availableOptions) |
| 49 | uri := fmt.Sprintf("%s/collection/%v?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 50 | result, err := getTmdb(uri, &collection) |
| 51 | return result.(*Collection), err |
| 52 | } |
func TMDb.GetCollectionImages
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/collections.go:
| 56 | func (tmdb *TMDb) GetCollectionImages(id int, options map[string]string) (*CollectionImages, error) { |
| 57 | var availableOptions = map[string]struct{}{ |
| 58 | "language": {}, |
| 59 | "append_to_response": {}, |
| 60 | "include_image_language": {}} |
| 61 | var images CollectionImages |
| 62 | optionsString := getOptionsString(options, availableOptions) |
| 63 | uri := fmt.Sprintf("%s/collection/%v/images?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 64 | result, err := getTmdb(uri, &images) |
| 65 | return result.(*CollectionImages), err |
| 66 | } |
func TMDb.GetCompanyInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/companies.go:
| 25 | func (tmdb *TMDb) GetCompanyInfo(id int, options map[string]string) (*Company, error) { |
| 26 | var availableOptions = map[string]struct{}{ |
| 27 | "append_to_response": {}} |
| 28 | var companyInfo Company |
| 29 | optionsString := getOptionsString(options, availableOptions) |
| 30 | uri := fmt.Sprintf("%s/company/%v?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 31 | result, err := getTmdb(uri, &companyInfo) |
| 32 | return result.(*Company), err |
| 33 | } |
func TMDb.GetCompanyMovies
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/companies.go:
| 37 | func (tmdb *TMDb) GetCompanyMovies(id int, options map[string]string) (*MoviePagedResults, error) { |
| 38 | var availableOptions = map[string]struct{}{ |
| 39 | "page": {}, |
| 40 | "language": {}, |
| 41 | "append_to_response": {}} |
| 42 | var movies MoviePagedResults |
| 43 | optionsString := getOptionsString(options, availableOptions) |
| 44 | uri := fmt.Sprintf("%s/company/%v/movies?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 45 | result, err := getTmdb(uri, &movies) |
| 46 | return result.(*MoviePagedResults), err |
| 47 | } |
func TMDb.GetTvInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 218 | func (tmdb *TMDb) GetTvInfo(id int, options map[string]string) (*TV, error) { |
| 219 | var availableOptions = map[string]struct{}{ |
| 220 | "language": {}, |
| 221 | "append_to_response": {}} |
| 222 | var tvInfo TV |
| 223 | optionsString := getOptionsString(options, availableOptions) |
| 224 | uri := fmt.Sprintf("%s/tv/%v?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 225 | result, err := getTmdb(uri, &tvInfo) |
| 226 | return result.(*TV), err |
| 227 | } |
func TMDb.GetAccountLists
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/account.go:
| 28 | func (tmdb *TMDb) GetAccountLists(id int, sessionID string, options map[string]string) (*MovieLists, error) { |
| 29 | var availableOptions = map[string]struct{}{ |
| 30 | "page": {}, |
| 31 | "language": {}} |
| 32 | var lists MovieLists |
| 33 | optionsString := getOptionsString(options, availableOptions) |
| 34 | uri := fmt.Sprintf("%s/account/%v/lists?api_key=%s&session_id=%s%s", baseURL, id, tmdb.apiKey, sessionID, optionsString) |
| 35 | result, err := getTmdb(uri, &lists) |
| 36 | return result.(*MovieLists), err |
| 37 | } |
func TMDb.GetAccountFavoriteMovies
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/account.go:
| 41 | func (tmdb *TMDb) GetAccountFavoriteMovies(id int, sessionID string, options map[string]string) (*MoviePagedResults, error) { |
| 42 | var availableOptions = map[string]struct{}{ |
| 43 | "page": {}, |
| 44 | "sort_by": {}, |
| 45 | "language": {}} |
| 46 | var favorites MoviePagedResults |
| 47 | optionsString := getOptionsString(options, availableOptions) |
| 48 | uri := fmt.Sprintf("%s/account/%v/favorite/movies?api_key=%s&session_id=%s%s", baseURL, id, tmdb.apiKey, sessionID, optionsString) |
| 49 | result, err := getTmdb(uri, &favorites) |
| 50 | return result.(*MoviePagedResults), err |
| 51 | } |
func TMDb.GetAccountFavoriteTv
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/account.go:
| 55 | func (tmdb *TMDb) GetAccountFavoriteTv(id int, sessionID string, options map[string]string) (*TvPagedResults, error) { |
| 56 | var availableOptions = map[string]struct{}{ |
| 57 | "page": {}, |
| 58 | "sort_by": {}, |
| 59 | "language": {}} |
| 60 | var favorites TvPagedResults |
| 61 | optionsString := getOptionsString(options, availableOptions) |
| 62 | uri := fmt.Sprintf("%s/account/%v/favorite/tv?api_key=%s&session_id=%s%s", baseURL, id, tmdb.apiKey, sessionID, optionsString) |
| 63 | result, err := getTmdb(uri, &favorites) |
| 64 | return result.(*TvPagedResults), err |
| 65 | } |
func TMDb.GetAccountRatedMovies
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/account.go:
| 69 | func (tmdb *TMDb) GetAccountRatedMovies(id int, sessionID string, options map[string]string) (*MoviePagedResults, error) { |
| 70 | var availableOptions = map[string]struct{}{ |
| 71 | "page": {}, |
| 72 | "sort_by": {}, |
| 73 | "language": {}} |
| 74 | var favorites MoviePagedResults |
| 75 | optionsString := getOptionsString(options, availableOptions) |
| 76 | uri := fmt.Sprintf("%s/account/%v/rated/movies?api_key=%s&session_id=%s%s", baseURL, id, tmdb.apiKey, sessionID, optionsString) |
| 77 | result, err := getTmdb(uri, &favorites) |
| 78 | return result.(*MoviePagedResults), err |
| 79 | } |
func TMDb.GetAccountRatedTv
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/account.go:
| 83 | func (tmdb *TMDb) GetAccountRatedTv(id int, sessionID string, options map[string]string) (*TvPagedResults, error) { |
| 84 | var availableOptions = map[string]struct{}{ |
| 85 | "page": {}, |
| 86 | "sort_by": {}, |
| 87 | "language": {}} |
| 88 | var favorites TvPagedResults |
| 89 | optionsString := getOptionsString(options, availableOptions) |
| 90 | uri := fmt.Sprintf("%s/account/%v/rated/tv?api_key=%s&session_id=%s%s", baseURL, id, tmdb.apiKey, sessionID, optionsString) |
| 91 | result, err := getTmdb(uri, &favorites) |
| 92 | return result.(*TvPagedResults), err |
| 93 | } |
func TMDb.GetAccountWatchlistMovies
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/account.go:
| 97 | func (tmdb *TMDb) GetAccountWatchlistMovies(id int, sessionID string, options map[string]string) (*MoviePagedResults, error) { |
| 98 | var availableOptions = map[string]struct{}{ |
| 99 | "page": {}, |
| 100 | "sort_by": {}, |
| 101 | "language": {}} |
| 102 | var favorites MoviePagedResults |
| 103 | optionsString := getOptionsString(options, availableOptions) |
| 104 | uri := fmt.Sprintf("%s/account/%v/watchlist/movies?api_key=%s&session_id=%s%s", baseURL, id, tmdb.apiKey, sessionID, optionsString) |
| 105 | result, err := getTmdb(uri, &favorites) |
| 106 | return result.(*MoviePagedResults), err |
| 107 | } |
func TMDb.GetAccountWatchlistTv
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/account.go:
| 111 | func (tmdb *TMDb) GetAccountWatchlistTv(id int, sessionID string, options map[string]string) (*TvPagedResults, error) { |
| 112 | var availableOptions = map[string]struct{}{ |
| 113 | "page": {}, |
| 114 | "sort_by": {}, |
| 115 | "language": {}} |
| 116 | var favorites TvPagedResults |
| 117 | optionsString := getOptionsString(options, availableOptions) |
| 118 | uri := fmt.Sprintf("%s/account/%v/watchlist/tv?api_key=%s&session_id=%s%s", baseURL, id, tmdb.apiKey, sessionID, optionsString) |
| 119 | result, err := getTmdb(uri, &favorites) |
| 120 | return result.(*TvPagedResults), err |
| 121 | } |
func TMDb.GetMovieReleases
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 488 | func (tmdb *TMDb) GetMovieReleases(id int, options map[string]string) (*MovieReleases, error) { |
| 489 | var availableOptions = map[string]struct{}{ |
| 490 | "append_to_response": {}} |
| 491 | var releases MovieReleases |
| 492 | optionsString := getOptionsString(options, availableOptions) |
| 493 | uri := fmt.Sprintf("%s/movie/%v/releases?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 494 | result, err := getTmdb(uri, &releases) |
| 495 | return result.(*MovieReleases), err |
| 496 | } |
func TMDb.GetMovieReviews
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 500 | func (tmdb *TMDb) GetMovieReviews(id int, options map[string]string) (*MovieReviews, error) { |
| 501 | var availableOptions = map[string]struct{}{ |
| 502 | "page": {}, |
| 503 | "language": {}, |
| 504 | "append_to_response": {}} |
| 505 | var reviews MovieReviews |
| 506 | optionsString := getOptionsString(options, availableOptions) |
| 507 | uri := fmt.Sprintf("%s/movie/%v/reviews?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 508 | result, err := getTmdb(uri, &reviews) |
| 509 | return result.(*MovieReviews), err |
| 510 | } |
func TMDb.GetMovieSimilar
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 514 | func (tmdb *TMDb) GetMovieSimilar(id int, options map[string]string) (*MoviePagedResults, error) { |
| 515 | var availableOptions = map[string]struct{}{ |
| 516 | "page": {}, |
| 517 | "language": {}, |
| 518 | "append_to_response": {}} |
| 519 | var similar MoviePagedResults |
| 520 | optionsString := getOptionsString(options, availableOptions) |
| 521 | uri := fmt.Sprintf("%s/movie/%v/similar?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 522 | result, err := getTmdb(uri, &similar) |
| 523 | return result.(*MoviePagedResults), err |
| 524 | } |
func TMDb.GetPersonTaggedImages
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 289 | func (tmdb *TMDb) GetPersonTaggedImages(id int, options map[string]string) (*PersonTaggedImages, error) { |
| 290 | var availableOptions = map[string]struct{}{ |
| 291 | "language": {}, |
| 292 | "page": {}} |
| 293 | var images PersonTaggedImages |
| 294 | optionsString := getOptionsString(options, availableOptions) |
| 295 | uri := fmt.Sprintf("%s/person/%v/tagged_images?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 296 | result, err := getTmdb(uri, &images) |
| 297 | return result.(*PersonTaggedImages), err |
| 298 | } |
func TMDb.GetMovieTranslations
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 541 | func (tmdb *TMDb) GetMovieTranslations(id int, options map[string]string) (*MovieTranslations, error) { |
| 542 | var availableOptions = map[string]struct{}{ |
| 543 | "append_to_response": {}} |
| 544 | var translations MovieTranslations |
| 545 | optionsString := getOptionsString(options, availableOptions) |
| 546 | uri := fmt.Sprintf("%s/movie/%v/translations?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 547 | result, err := getTmdb(uri, &translations) |
| 548 | return result.(*MovieTranslations), err |
| 549 | } |
func TMDb.GetMovieVideos
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 553 | func (tmdb *TMDb) GetMovieVideos(id int, options map[string]string) (*MovieVideos, error) { |
| 554 | var availableOptions = map[string]struct{}{ |
| 555 | "language": {}, |
| 556 | "append_to_response": {}} |
| 557 | var videos MovieVideos |
| 558 | optionsString := getOptionsString(options, availableOptions) |
| 559 | uri := fmt.Sprintf("%s/movie/%v/videos?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 560 | result, err := getTmdb(uri, &videos) |
| 561 | return result.(*MovieVideos), err |
| 562 | } |
func TMDb.GetMovieUpcoming
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 566 | func (tmdb *TMDb) GetMovieUpcoming(options map[string]string) (*MovieDatedResults, error) { |
| 567 | var availableOptions = map[string]struct{}{ |
| 568 | "page": {}, |
| 569 | "language": {}} |
| 570 | var upcoming MovieDatedResults |
| 571 | optionsString := getOptionsString(options, availableOptions) |
| 572 | uri := fmt.Sprintf("%s/movie/upcoming?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 573 | result, err := getTmdb(uri, &upcoming) |
| 574 | return result.(*MovieDatedResults), err |
| 575 | } |
func TMDb.GetPersonInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 199 | func (tmdb *TMDb) GetPersonInfo(id int, options map[string]string) (*Person, error) { |
| 200 | var availableOptions = map[string]struct{}{ |
| 201 | "append_to_response": {}} |
| 202 | var personInfo Person |
| 203 | optionsString := getOptionsString(options, availableOptions) |
| 204 | uri := fmt.Sprintf("%s/person/%v?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 205 | result, err := getTmdb(uri, &personInfo) |
| 206 | return result.(*Person), err |
| 207 | } |
func TMDb.GetPersonChanges
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 211 | func (tmdb *TMDb) GetPersonChanges(id int, options map[string]string) (*PersonChanges, error) { |
| 212 | var availableOptions = map[string]struct{}{ |
| 213 | "start_date": {}, |
| 214 | "end_date": {}} |
| 215 | var changes PersonChanges |
| 216 | optionsString := getOptionsString(options, availableOptions) |
| 217 | uri := fmt.Sprintf("%s/person/%v/changes?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 218 | result, err := getTmdb(uri, &changes) |
| 219 | return result.(*PersonChanges), err |
| 220 | } |
func TMDb.GetPersonCombinedCredits
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 224 | func (tmdb *TMDb) GetPersonCombinedCredits(id int, options map[string]string) (*PersonCombinedCredits, error) { |
| 225 | var availableOptions = map[string]struct{}{ |
| 226 | "language": {}, |
| 227 | "append_to_response": {}} |
| 228 | var credits PersonCombinedCredits |
| 229 | optionsString := getOptionsString(options, availableOptions) |
| 230 | uri := fmt.Sprintf("%s/person/%v/combined_credits?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 231 | result, err := getTmdb(uri, &credits) |
| 232 | return result.(*PersonCombinedCredits), err |
| 233 | } |
func TMDb.GetPersonMovieCredits
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 264 | func (tmdb *TMDb) GetPersonMovieCredits(id int, options map[string]string) (*PersonMovieCredits, error) { |
| 265 | var availableOptions = map[string]struct{}{ |
| 266 | "language": {}, |
| 267 | "append_to_response": {}} |
| 268 | var credits PersonMovieCredits |
| 269 | optionsString := getOptionsString(options, availableOptions) |
| 270 | uri := fmt.Sprintf("%s/person/%v/movie_credits?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 271 | result, err := getTmdb(uri, &credits) |
| 272 | return result.(*PersonMovieCredits), err |
| 273 | } |
func TMDb.GetPersonPopular
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 277 | func (tmdb *TMDb) GetPersonPopular(options map[string]string) (*PersonPopular, error) { |
| 278 | var availableOptions = map[string]struct{}{ |
| 279 | "page": {}} |
| 280 | var popular PersonPopular |
| 281 | optionsString := getOptionsString(options, availableOptions) |
| 282 | uri := fmt.Sprintf("%s/person/popular?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 283 | result, err := getTmdb(uri, &popular) |
| 284 | return result.(*PersonPopular), err |
| 285 | } |
func TMDb.GetPersonTvCredits
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 302 | func (tmdb *TMDb) GetPersonTvCredits(id int, options map[string]string) (*PersonTvCredits, error) { |
| 303 | var availableOptions = map[string]struct{}{ |
| 304 | "language": {}, |
| 305 | "append_to_response": {}} |
| 306 | var credits PersonTvCredits |
| 307 | optionsString := getOptionsString(options, availableOptions) |
| 308 | uri := fmt.Sprintf("%s/person/%v/tv_credits?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 309 | result, err := getTmdb(uri, &credits) |
| 310 | return result.(*PersonTvCredits), err |
| 311 | } |
func TMDb.GetTvAiringToday
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 240 | func (tmdb *TMDb) GetTvAiringToday(options map[string]string) (*TvPagedResults, error) { |
| 241 | var availableOptions = map[string]struct{}{ |
| 242 | "page": {}, |
| 243 | "language": {}, |
| 244 | "timezone": {}} |
| 245 | var onAir TvPagedResults |
| 246 | optionsString := getOptionsString(options, availableOptions) |
| 247 | uri := fmt.Sprintf("%s/tv/airing_today?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 248 | result, err := getTmdb(uri, &onAir) |
| 249 | return result.(*TvPagedResults), err |
| 250 | } |
func TMDb.GetTvChanges
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 263 | func (tmdb *TMDb) GetTvChanges(id int, options map[string]string) (*TvChanges, error) { |
| 264 | var availableOptions = map[string]struct{}{ |
| 265 | "start_date": {}, |
| 266 | "end_date": {}} |
| 267 | var changes TvChanges |
| 268 | optionsString := getOptionsString(options, availableOptions) |
| 269 | uri := fmt.Sprintf("%s/tv/%v/changes?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 270 | result, err := getTmdb(uri, &changes) |
| 271 | return result.(*TvChanges), err |
| 272 | } |
func TMDb.GetTvCredits
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 276 | func (tmdb *TMDb) GetTvCredits(id int, options map[string]string) (*TvCredits, error) { |
| 277 | var availableOptions = map[string]struct{}{ |
| 278 | "language": {}, |
| 279 | "append_to_response": {}} |
| 280 | var credits TvCredits |
| 281 | optionsString := getOptionsString(options, availableOptions) |
| 282 | uri := fmt.Sprintf("%s/tv/%v/credits?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 283 | result, err := getTmdb(uri, &credits) |
| 284 | return result.(*TvCredits), err |
| 285 | } |
func TMDb.GetTvImages
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 289 | func (tmdb *TMDb) GetTvImages(id int, options map[string]string) (*TvImages, error) { |
| 290 | var availableOptions = map[string]struct{}{ |
| 291 | "language": {}, |
| 292 | "include_image_language": {}} |
| 293 | var images TvImages |
| 294 | optionsString := getOptionsString(options, availableOptions) |
| 295 | uri := fmt.Sprintf("%s/tv/%v/images?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 296 | result, err := getTmdb(uri, &images) |
| 297 | return result.(*TvImages), err |
| 298 | } |
func TMDb.GetTvKeywords
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 302 | func (tmdb *TMDb) GetTvKeywords(id int, options map[string]string) (*TvKeywords, error) { |
| 303 | var availableOptions = map[string]struct{}{ |
| 304 | "append_to_response": {}} |
| 305 | var keywords TvKeywords |
| 306 | optionsString := getOptionsString(options, availableOptions) |
| 307 | uri := fmt.Sprintf("%s/tv/%v/keywords?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 308 | result, err := getTmdb(uri, &keywords) |
| 309 | return result.(*TvKeywords), err |
| 310 | } |
func TMDb.GetTvOnTheAir
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 323 | func (tmdb *TMDb) GetTvOnTheAir(options map[string]string) (*TvPagedResults, error) { |
| 324 | var availableOptions = map[string]struct{}{ |
| 325 | "page": {}, |
| 326 | "language": {}} |
| 327 | var onAir TvPagedResults |
| 328 | optionsString := getOptionsString(options, availableOptions) |
| 329 | uri := fmt.Sprintf("%s/tv/on_the_air?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 330 | result, err := getTmdb(uri, &onAir) |
| 331 | return result.(*TvPagedResults), err |
| 332 | } |
func TMDb.GetTvPopular
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 336 | func (tmdb *TMDb) GetTvPopular(options map[string]string) (*TvPagedResults, error) { |
| 337 | var availableOptions = map[string]struct{}{ |
| 338 | "page": {}, |
| 339 | "language": {}} |
| 340 | var onAir TvPagedResults |
| 341 | optionsString := getOptionsString(options, availableOptions) |
| 342 | uri := fmt.Sprintf("%s/tv/popular?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 343 | result, err := getTmdb(uri, &onAir) |
| 344 | return result.(*TvPagedResults), err |
| 345 | } |
func TMDb.GetTvSimilar
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 349 | func (tmdb *TMDb) GetTvSimilar(id int, options map[string]string) (*TvPagedResults, error) { |
| 350 | var availableOptions = map[string]struct{}{ |
| 351 | "page": {}, |
| 352 | "language": {}, |
| 353 | "append_to_response": {}} |
| 354 | var similar TvPagedResults |
| 355 | optionsString := getOptionsString(options, availableOptions) |
| 356 | uri := fmt.Sprintf("%s/tv/%v/similar?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 357 | result, err := getTmdb(uri, &similar) |
| 358 | return result.(*TvPagedResults), err |
| 359 | } |
func TMDb.GetTvTopRated
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 363 | func (tmdb *TMDb) GetTvTopRated(options map[string]string) (*TvPagedResults, error) { |
| 364 | var availableOptions = map[string]struct{}{ |
| 365 | "page": {}, |
| 366 | "language": {}} |
| 367 | var onAir TvPagedResults |
| 368 | optionsString := getOptionsString(options, availableOptions) |
| 369 | uri := fmt.Sprintf("%s/tv/top_rated?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 370 | result, err := getTmdb(uri, &onAir) |
| 371 | return result.(*TvPagedResults), err |
| 372 | } |
func TMDb.GetTvSeasonVideos
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvseasons.go:
| 86 | func (tmdb *TMDb) GetTvSeasonVideos(showID, seasonNum int, options map[string]string) (*TvVideos, error) { |
| 87 | var availableOptions = map[string]struct{}{ |
| 88 | "language": {}} |
| 89 | var videos TvVideos |
| 90 | optionsString := getOptionsString(options, availableOptions) |
| 91 | uri := fmt.Sprintf("%s/tv/%v/season/%v/videos?api_key=%s%s", baseURL, showID, seasonNum, tmdb.apiKey, optionsString) |
| 92 | result, err := getTmdb(uri, &videos) |
| 93 | return result.(*TvVideos), err |
| 94 | } |
func TMDb.GetTvVideos
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 385 | func (tmdb *TMDb) GetTvVideos(id int, options map[string]string) (*TvVideos, error) { |
| 386 | var availableOptions = map[string]struct{}{ |
| 387 | "language": {}} |
| 388 | var videos TvVideos |
| 389 | optionsString := getOptionsString(options, availableOptions) |
| 390 | uri := fmt.Sprintf("%s/tv/%v/videos?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 391 | result, err := getTmdb(uri, &videos) |
| 392 | return result.(*TvVideos), err |
| 393 | } |
func TMDb.GetTvEpisodeInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvepisodes.go:
| 45 | func (tmdb *TMDb) GetTvEpisodeInfo(showID, seasonNum, episodeNum int, options map[string]string) (*TvEpisode, error) { |
| 46 | var availableOptions = map[string]struct{}{ |
| 47 | "language": {}, |
| 48 | "append_to_response": {}} |
| 49 | var episode TvEpisode |
| 50 | optionsString := getOptionsString(options, availableOptions) |
| 51 | uri := fmt.Sprintf("%s/tv/%v/season/%v/episode/%v?api_key=%s%s", baseURL, showID, seasonNum, episodeNum, tmdb.apiKey, optionsString) |
| 52 | result, err := getTmdb(uri, &episode) |
| 53 | return result.(*TvEpisode), err |
| 54 | } |
func TMDb.GetTvEpisodeChanges
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvepisodes.go:
| 58 | func (tmdb *TMDb) GetTvEpisodeChanges(id int, options map[string]string) (*TvChanges, error) { |
| 59 | var availableOptions = map[string]struct{}{ |
| 60 | "start_date": {}, |
| 61 | "end_date": {}} |
| 62 | var changes TvChanges |
| 63 | optionsString := getOptionsString(options, availableOptions) |
| 64 | uri := fmt.Sprintf("%s/tv/episode/%v/changes?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 65 | result, err := getTmdb(uri, &changes) |
| 66 | return result.(*TvChanges), err |
| 67 | } |
func TMDb.GetTvEpisodeExternalIds
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvepisodes.go:
| 80 | func (tmdb *TMDb) GetTvEpisodeExternalIds(showID, seasonNum, episodeNum int, options map[string]string) (*TvExternalIds, error) { |
| 81 | var availableOptions = map[string]struct{}{ |
| 82 | "language": {}} |
| 83 | var ids TvExternalIds |
| 84 | optionsString := getOptionsString(options, availableOptions) |
| 85 | uri := fmt.Sprintf("%s/tv/%v/season/%v/episode/%v/external_ids?api_key=%s%s", baseURL, showID, seasonNum, episodeNum, tmdb.apiKey, optionsString) |
| 86 | result, err := getTmdb(uri, &ids) |
| 87 | return result.(*TvExternalIds), err |
| 88 | } |
func TMDb.GetTvEpisodeVideos
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvepisodes.go:
| 101 | func (tmdb *TMDb) GetTvEpisodeVideos(showID, seasonNum, episodeNum int, options map[string]string) (*TvVideos, error) { |
| 102 | var availableOptions = map[string]struct{}{ |
| 103 | "language": {}} |
| 104 | var videos TvVideos |
| 105 | optionsString := getOptionsString(options, availableOptions) |
| 106 | uri := fmt.Sprintf("%s/tv/%v/season/%v/episode/%v/videos?api_key=%s%s", baseURL, showID, seasonNum, episodeNum, tmdb.apiKey, optionsString) |
| 107 | result, err := getTmdb(uri, &videos) |
| 108 | return result.(*TvVideos), err |
| 109 | } |
func TMDb.GetTvSeasonInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvseasons.go:
| 26 | func (tmdb *TMDb) GetTvSeasonInfo(showID, seasonID int, options map[string]string) (*TvSeason, error) { |
| 27 | var availableOptions = map[string]struct{}{ |
| 28 | "language": {}, |
| 29 | "append_to_response": {}} |
| 30 | var season TvSeason |
| 31 | optionsString := getOptionsString(options, availableOptions) |
| 32 | uri := fmt.Sprintf("%s/tv/%v/season/%v?api_key=%s%s", baseURL, showID, seasonID, tmdb.apiKey, optionsString) |
| 33 | result, err := getTmdb(uri, &season) |
| 34 | return result.(*TvSeason), err |
| 35 | } |
func TMDb.GetTvSeasonChanges
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvseasons.go:
| 39 | func (tmdb *TMDb) GetTvSeasonChanges(id int, options map[string]string) (*TvChanges, error) { |
| 40 | var availableOptions = map[string]struct{}{ |
| 41 | "start_date": {}, |
| 42 | "end_date": {}} |
| 43 | var changes TvChanges |
| 44 | optionsString := getOptionsString(options, availableOptions) |
| 45 | uri := fmt.Sprintf("%s/tv/season/%v/changes?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 46 | result, err := getTmdb(uri, &changes) |
| 47 | return result.(*TvChanges), err |
| 48 | } |
func TMDb.GetTvSeasonExternalIds
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvseasons.go:
| 61 | func (tmdb *TMDb) GetTvSeasonExternalIds(showID, seasonNum int, options map[string]string) (*TvExternalIds, error) { |
| 62 | var availableOptions = map[string]struct{}{ |
| 63 | "language": {}} |
| 64 | var ids TvExternalIds |
| 65 | optionsString := getOptionsString(options, availableOptions) |
| 66 | uri := fmt.Sprintf("%s/tv/%v/season/%v/external_ids?api_key=%s%s", baseURL, showID, seasonNum, tmdb.apiKey, optionsString) |
| 67 | result, err := getTmdb(uri, &ids) |
| 68 | return result.(*TvExternalIds), err |
| 69 | } |
func TMDb.GetTvSeasonImages
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvseasons.go:
| 73 | func (tmdb *TMDb) GetTvSeasonImages(showID, seasonNum int, options map[string]string) (*TvSeasonImages, error) { |
| 74 | var availableOptions = map[string]struct{}{ |
| 75 | "language": {}, |
| 76 | "include_image_language": {}} |
| 77 | var images TvSeasonImages |
| 78 | optionsString := getOptionsString(options, availableOptions) |
| 79 | uri := fmt.Sprintf("%s/tv/%v/season/%v/images?api_key=%s%s", baseURL, showID, seasonNum, tmdb.apiKey, optionsString) |
| 80 | result, err := getTmdb(uri, &images) |
| 81 | return result.(*TvSeasonImages), err |
| 82 | } |
func TMDb.GetCreditInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/credits.go:
| 41 | func (tmdb *TMDb) GetCreditInfo(id string, options map[string]string) (*Credit, error) { |
| 42 | var availableOptions = map[string]struct{}{ |
| 43 | "language": {}} |
| 44 | var creditInfo Credit |
| 45 | optionsString := getOptionsString(options, availableOptions) |
| 46 | uri := fmt.Sprintf("%s/credit/%v?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 47 | result, err := getTmdb(uri, &creditInfo) |
| 48 | return result.(*Credit), err |
| 49 | } |
func TMDb.DiscoverMovie
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/discover.go:
| 9 | func (tmdb *TMDb) DiscoverMovie(options map[string]string) (*MoviePagedResults, error) { |
| 10 | var availableOptions = map[string]struct{}{ |
| 11 | "certification_country": {}, |
| 12 | "certification": {}, |
| 13 | "certification.lte": {}, |
| 14 | "include_adult": {}, |
| 15 | "include_video": {}, |
| 16 | "language": {}, |
| 17 | "page": {}, |
| 18 | "primary_release_year": {}, |
| 19 | "primary_release_date.gte": {}, |
| 20 | "primary_release_date.lte": {}, |
| 21 | "release_date.gte": {}, |
| 22 | "release_date.lte": {}, |
| 23 | "sort_by": {}, |
| 24 | "vote_count.gte": {}, |
| 25 | "vote_count.lte": {}, |
| 26 | "vote_average.gte": {}, |
| 27 | "vote_average.lte": {}, |
| 28 | "with_cast": {}, |
| 29 | "with_crew": {}, |
| 30 | "with_companies": {}, |
| 31 | "with_genres": {}, |
| 32 | "with_keywords": {}, |
| 33 | "with_people": {}, |
| 34 | "year": {}} |
| 35 | optionsString := getOptionsString(options, availableOptions) |
| 36 | var results MoviePagedResults |
| 37 | uri := fmt.Sprintf("%s/discover/movie?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 38 | result, err := getTmdb(uri, &results) |
| 39 | return result.(*MoviePagedResults), err |
| 40 | } |
func TMDb.DiscoverTV
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/discover.go:
| 44 | func (tmdb *TMDb) DiscoverTV(options map[string]string) (*TvPagedResults, error) { |
| 45 | var availableOptions = map[string]struct{}{ |
| 46 | "page": {}, |
| 47 | "language": {}, |
| 48 | "sort_by": {}, |
| 49 | "first_air_date_year": {}, |
| 50 | "first_air_date.gte": {}, |
| 51 | "first_air_date.lte": {}, |
| 52 | "vote_count.gte": {}, |
| 53 | "vote_average.gte": {}, |
| 54 | "with_genres": {}, |
| 55 | "with_networks": {}} |
| 56 | optionsString := getOptionsString(options, availableOptions) |
| 57 | var results TvPagedResults |
| 58 | uri := fmt.Sprintf("%s/discover/tv?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 59 | result, err := getTmdb(uri, &results) |
| 60 | return result.(*TvPagedResults), err |
| 61 | } |
func TMDb.GetFind
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/find.go:
| 34 | func (tmdb *TMDb) GetFind(id, source string, options map[string]string) (*FindResults, error) { |
| 35 | var availableOptions = map[string]struct{}{ |
| 36 | "language": {}} |
| 37 | var results FindResults |
| 38 | optionsString := getOptionsString(options, availableOptions) |
| 39 | uri := fmt.Sprintf("%s/find/%s?api_key=%s&external_source=%s%s", baseURL, id, tmdb.apiKey, source, optionsString) |
| 40 | result, err := getTmdb(uri, &results) |
| 41 | return result.(*FindResults), err |
| 42 | } |
func TMDb.GetTvGenres
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/genres.go:
| 29 | func (tmdb *TMDb) GetTvGenres(options map[string]string) (*Genre, error) { |
| 30 | var availableOptions = map[string]struct{}{ |
| 31 | "language": {}} |
| 32 | var tvGenres Genre |
| 33 | optionsString := getOptionsString(options, availableOptions) |
| 34 | uri := fmt.Sprintf("%s/genre/tv/list?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 35 | result, err := getTmdb(uri, &tvGenres) |
| 36 | return result.(*Genre), err |
| 37 | } |
func TMDb.GetGuestSessionRatedMovies
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/guestsessions.go:
| 9 | func (tmdb *TMDb) GetGuestSessionRatedMovies(sessionID string, options map[string]string) (*MoviePagedResults, error) { |
| 10 | var availableOptions = map[string]struct{}{ |
| 11 | "page": {}, |
| 12 | "sort_by": {}, |
| 13 | "sort_order": {}, |
| 14 | "language": {}} |
| 15 | var favorites MoviePagedResults |
| 16 | optionsString := getOptionsString(options, availableOptions) |
| 17 | uri := fmt.Sprintf("%s/guest_session/%v/rated_movies?api_key=%s%s", baseURL, sessionID, tmdb.apiKey, optionsString) |
| 18 | result, err := getTmdb(uri, &favorites) |
| 19 | return result.(*MoviePagedResults), err |
| 20 | } |
func TMDb.GetKeywordMovies
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/keywords.go:
| 24 | func (tmdb *TMDb) GetKeywordMovies(id int, options map[string]string) (*MoviePagedResults, error) { |
| 25 | var availableOptions = map[string]struct{}{ |
| 26 | "language": {}, |
| 27 | "page": {}} |
| 28 | var movies MoviePagedResults |
| 29 | optionsString := getOptionsString(options, availableOptions) |
| 30 | uri := fmt.Sprintf("%s/keyword/%v/movies?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 31 | result, err := getTmdb(uri, &movies) |
| 32 | return result.(*MoviePagedResults), err |
| 33 | } |
func getTmdb
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/main.go:
| 29 | func getTmdb(url string, payload interface{}) (interface{}, error) { |
| 30 | res, err := http.Get(url) |
| 31 | if err == nil { |
| 32 | body, err := ioutil.ReadAll(res.Body) |
| 33 | if err == nil { |
| 34 | json.Unmarshal(body, &payload) |
| 35 | } |
| 36 | } |
| 37 | return payload, err |
| 38 | } |
func getOptionsString
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/main.go:
| 40 | func getOptionsString(options map[string]string, availableOptions map[string]struct{}) string { |
| 41 | var optionsString = "" |
| 42 | for key, val := range options { |
| 43 | if _, ok := availableOptions[key]; ok { |
| 44 | newString := fmt.Sprintf("%s&%s=%s", optionsString, key, val) |
| 45 | optionsString = newString |
| 46 | } |
| 47 | } |
| 48 | return optionsString |
| 49 | } |
func TMDb.GetMovieInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 353 | func (tmdb *TMDb) GetMovieInfo(id int, options map[string]string) (*Movie, error) { |
| 354 | var availableOptions = map[string]struct{}{ |
| 355 | "language": {}, |
| 356 | "append_to_response": {}} |
| 357 | var movie Movie |
| 358 | optionsString := getOptionsString(options, availableOptions) |
| 359 | uri := fmt.Sprintf("%s/movie/%v?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 360 | result, err := getTmdb(uri, &movie) |
| 361 | return result.(*Movie), err |
| 362 | } |
func TMDb.GetMovieTopRated
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 528 | func (tmdb *TMDb) GetMovieTopRated(options map[string]string) (*MoviePagedResults, error) { |
| 529 | var availableOptions = map[string]struct{}{ |
| 530 | "page": {}, |
| 531 | "language": {}} |
| 532 | var topRated MoviePagedResults |
| 533 | optionsString := getOptionsString(options, availableOptions) |
| 534 | uri := fmt.Sprintf("%s/movie/top_rated?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 535 | result, err := getTmdb(uri, &topRated) |
| 536 | return result.(*MoviePagedResults), err |
| 537 | } |
func TMDb.GetMovieAlternativeTitles
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 375 | func (tmdb *TMDb) GetMovieAlternativeTitles(id int, options map[string]string) (*MovieAlternativeTitles, error) { |
| 376 | var availableOptions = map[string]struct{}{ |
| 377 | "country": {}, |
| 378 | "append_to_response": {}} |
| 379 | var titles MovieAlternativeTitles |
| 380 | optionsString := getOptionsString(options, availableOptions) |
| 381 | uri := fmt.Sprintf("%s/movie/%v/alternative_titles?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 382 | result, err := getTmdb(uri, &titles) |
| 383 | return result.(*MovieAlternativeTitles), err |
| 384 | } |
func TMDb.GetMovieChanges
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 388 | func (tmdb *TMDb) GetMovieChanges(id int, options map[string]string) (*MovieChanges, error) { |
| 389 | var availableOptions = map[string]struct{}{ |
| 390 | "start_date": {}, |
| 391 | "end_date": {}} |
| 392 | var changes MovieChanges |
| 393 | optionsString := getOptionsString(options, availableOptions) |
| 394 | uri := fmt.Sprintf("%s/movie/%v/changes?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 395 | result, err := getTmdb(uri, &changes) |
| 396 | return result.(*MovieChanges), err |
| 397 | } |
func TMDb.GetMovieCredits
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 401 | func (tmdb *TMDb) GetMovieCredits(id int, options map[string]string) (*MovieCredits, error) { |
| 402 | var availableOptions = map[string]struct{}{ |
| 403 | "append_to_response": {}} |
| 404 | var credits MovieCredits |
| 405 | optionsString := getOptionsString(options, availableOptions) |
| 406 | uri := fmt.Sprintf("%s/movie/%v/credits?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 407 | result, err := getTmdb(uri, &credits) |
| 408 | return result.(*MovieCredits), err |
| 409 | } |
func TMDb.GetMovieImages
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 413 | func (tmdb *TMDb) GetMovieImages(id int, options map[string]string) (*MovieImages, error) { |
| 414 | var availableOptions = map[string]struct{}{ |
| 415 | "language": {}, |
| 416 | "append_to_response": {}, |
| 417 | "include_image_language": {}} |
| 418 | var images MovieImages |
| 419 | optionsString := getOptionsString(options, availableOptions) |
| 420 | uri := fmt.Sprintf("%s/movie/%v/images?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 421 | result, err := getTmdb(uri, &images) |
| 422 | return result.(*MovieImages), err |
| 423 | } |
func TMDb.GetMovieKeywords
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 427 | func (tmdb *TMDb) GetMovieKeywords(id int, options map[string]string) (*MovieKeywords, error) { |
| 428 | var availableOptions = map[string]struct{}{ |
| 429 | "append_to_response": {}} |
| 430 | var keywords MovieKeywords |
| 431 | optionsString := getOptionsString(options, availableOptions) |
| 432 | uri := fmt.Sprintf("%s/movie/%v/keywords?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 433 | result, err := getTmdb(uri, &keywords) |
| 434 | return result.(*MovieKeywords), err |
| 435 | } |
func TMDb.GetMovieLists
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 448 | func (tmdb *TMDb) GetMovieLists(id int, options map[string]string) (*MovieLists, error) { |
| 449 | var availableOptions = map[string]struct{}{ |
| 450 | "page": {}, |
| 451 | "language": {}, |
| 452 | "append_to_response": {}} |
| 453 | var lists MovieLists |
| 454 | optionsString := getOptionsString(options, availableOptions) |
| 455 | uri := fmt.Sprintf("%s/movie/%v/lists?api_key=%s%s", baseURL, id, tmdb.apiKey, optionsString) |
| 456 | result, err := getTmdb(uri, &lists) |
| 457 | return result.(*MovieLists), err |
| 458 | } |
func TMDb.GetMovieNowPlaying
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 462 | func (tmdb *TMDb) GetMovieNowPlaying(options map[string]string) (*MovieDatedResults, error) { |
| 463 | var availableOptions = map[string]struct{}{ |
| 464 | "page": {}, |
| 465 | "language": {}} |
| 466 | var nowPlaying MovieDatedResults |
| 467 | optionsString := getOptionsString(options, availableOptions) |
| 468 | uri := fmt.Sprintf("%s/movie/now_playing?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 469 | result, err := getTmdb(uri, &nowPlaying) |
| 470 | return result.(*MovieDatedResults), err |
| 471 | } |
func TMDb.GetMoviePopular
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 475 | func (tmdb *TMDb) GetMoviePopular(options map[string]string) (*MoviePagedResults, error) { |
| 476 | var availableOptions = map[string]struct{}{ |
| 477 | "page": {}, |
| 478 | "language": {}} |
| 479 | var popular MoviePagedResults |
| 480 | optionsString := getOptionsString(options, availableOptions) |
| 481 | uri := fmt.Sprintf("%s/movie/popular?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 482 | result, err := getTmdb(uri, &popular) |
| 483 | return result.(*MoviePagedResults), err |
| 484 | } |
func TMDb.GetChangesPerson
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/changes.go:
| 32 | func (tmdb *TMDb) GetChangesPerson(options map[string]string) (*Changes, error) { |
| 33 | var personChanges Changes |
| 34 | optionsString := getOptionsString(options, changeOptions) |
| 35 | uri := fmt.Sprintf("%s/person/changes?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 36 | result, err := getTmdb(uri, &personChanges) |
| 37 | return result.(*Changes), err |
| 38 | } |
func TMDb.GetChangesTv
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/changes.go:
| 42 | func (tmdb *TMDb) GetChangesTv(options map[string]string) (*Changes, error) { |
| 43 | var tvChanges Changes |
| 44 | optionsString := getOptionsString(options, changeOptions) |
| 45 | uri := fmt.Sprintf("%s/tv/changes?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 46 | result, err := getTmdb(uri, &tvChanges) |
| 47 | return result.(*Changes), err |
| 48 | } |
func TMDb.GetChangesMovie
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/changes.go:
| 22 | func (tmdb *TMDb) GetChangesMovie(options map[string]string) (*Changes, error) { |
| 23 | var movieChanges Changes |
| 24 | optionsString := getOptionsString(options, changeOptions) |
| 25 | uri := fmt.Sprintf("%s/movie/changes?api_key=%s%s", baseURL, tmdb.apiKey, optionsString) |
| 26 | result, err := getTmdb(uri, &movieChanges) |
| 27 | return result.(*Changes), err |
| 28 | } |
func TMDb.GetTvAccountStates
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 231 | func (tmdb *TMDb) GetTvAccountStates(id int, sessionID string) (*TvAccountState, error) { |
| 232 | var state TvAccountState |
| 233 | uri := fmt.Sprintf("%s/tv/%v/account_states?api_key=%s&session_id=%s", baseURL, id, tmdb.apiKey, sessionID) |
| 234 | result, err := getTmdb(uri, &state) |
| 235 | return result.(*TvAccountState), err |
| 236 | } |
func TMDb.GetNetworkInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/networks.go:
| 15 | func (tmdb *TMDb) GetNetworkInfo(id int) (*Network, error) { |
| 16 | var networkInfo Network |
| 17 | uri := fmt.Sprintf("%s/network/%v?api_key=%s", baseURL, id, tmdb.apiKey) |
| 18 | result, err := getTmdb(uri, &networkInfo) |
| 19 | return result.(*Network), err |
| 20 | } |
func TMDb.GetAccountInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/account.go:
| 19 | func (tmdb *TMDb) GetAccountInfo(sessionID string) (*AccountInfo, error) { |
| 20 | var account AccountInfo |
| 21 | uri := fmt.Sprintf("%s/account?api_key=%s&session_id=%s", baseURL, tmdb.apiKey, sessionID) |
| 22 | result, err := getTmdb(uri, &account) |
| 23 | return result.(*AccountInfo), err |
| 24 | } |
func TMDb.GetTvLatest
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 314 | func (tmdb *TMDb) GetTvLatest() (*TV, error) { |
| 315 | var tv TV |
| 316 | uri := fmt.Sprintf("%s/tv/latest?api_key=%s", baseURL, tmdb.apiKey) |
| 317 | result, err := getTmdb(uri, &tv) |
| 318 | return result.(*TV), err |
| 319 | } |
func TMDb.GetTvAlternativeTitles
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 254 | func (tmdb *TMDb) GetTvAlternativeTitles(id int) (*TvAlternativeTitles, error) { |
| 255 | var titles TvAlternativeTitles |
| 256 | uri := fmt.Sprintf("%s/tv/%v/alternative_titles?api_key=%s", baseURL, id, tmdb.apiKey) |
| 257 | result, err := getTmdb(uri, &titles) |
| 258 | return result.(*TvAlternativeTitles), err |
| 259 | } |
func TMDb.GetJobList
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/jobs.go:
| 17 | func (tmdb *TMDb) GetJobList() (*Job, error) { |
| 18 | var jobList Job |
| 19 | uri := fmt.Sprintf("%s/job/list?api_key=%s", baseURL, tmdb.apiKey) |
| 20 | result, err := getTmdb(uri, &jobList) |
| 21 | return result.(*Job), err |
| 22 | } |
func TMDb.GetKeywordInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/keywords.go:
| 15 | func (tmdb *TMDb) GetKeywordInfo(id int) (*Keyword, error) { |
| 16 | var keywordInfo Keyword |
| 17 | uri := fmt.Sprintf("%s/keyword/%v?api_key=%s", baseURL, id, tmdb.apiKey) |
| 18 | result, err := getTmdb(uri, &keywordInfo) |
| 19 | return result.(*Keyword), err |
| 20 | } |
func TMDb.GetTvEpisodeCredits
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvepisodes.go:
| 71 | func (tmdb *TMDb) GetTvEpisodeCredits(showID, seasonNum, episodeNum int) (*TvCredits, error) { |
| 72 | var credits TvCredits |
| 73 | uri := fmt.Sprintf("%s/tv/%v/season/%v/episode/%v/credits?api_key=%s", baseURL, showID, seasonNum, episodeNum, tmdb.apiKey) |
| 74 | result, err := getTmdb(uri, &credits) |
| 75 | return result.(*TvCredits), err |
| 76 | } |
func TMDb.GetListInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/lists.go:
| 28 | func (tmdb *TMDb) GetListInfo(id string) (*ListInfo, error) { |
| 29 | var listInfo ListInfo |
| 30 | uri := fmt.Sprintf("%s/list/%v?api_key=%s", baseURL, id, tmdb.apiKey) |
| 31 | result, err := getTmdb(uri, &listInfo) |
| 32 | return result.(*ListInfo), err |
| 33 | } |
func TMDb.GetListItemStatus
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/lists.go:
| 43 | func (tmdb *TMDb) GetListItemStatus(id string, movieID int) (*ListItemStatus, error) { |
| 44 | var itemStatus ListItemStatus |
| 45 | uri := fmt.Sprintf("%s/list/%v/item_status?api_key=%s&movie_id=%v", baseURL, id, tmdb.apiKey, movieID) |
| 46 | result, err := getTmdb(uri, &itemStatus) |
| 47 | return result.(*ListItemStatus), err |
| 48 | } |
func TMDb.GetPersonExternalIds
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 237 | func (tmdb *TMDb) GetPersonExternalIds(id int) (*TvExternalIds, error) { |
| 238 | var ids TvExternalIds |
| 239 | uri := fmt.Sprintf("%s/person/%v/external_ids?api_key=%s", baseURL, id, tmdb.apiKey) |
| 240 | result, err := getTmdb(uri, &ids) |
| 241 | return result.(*TvExternalIds), err |
| 242 | } |
func TMDb.GetPersonImages
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 246 | func (tmdb *TMDb) GetPersonImages(id int) (*PersonImages, error) { |
| 247 | var images PersonImages |
| 248 | uri := fmt.Sprintf("%s/person/%v/images?api_key=%s", baseURL, id, tmdb.apiKey) |
| 249 | result, err := getTmdb(uri, &images) |
| 250 | return result.(*PersonImages), err |
| 251 | } |
func TMDb.GetPersonLatest
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/people.go:
| 255 | func (tmdb *TMDb) GetPersonLatest() (*PersonLatest, error) { |
| 256 | var latest PersonLatest |
| 257 | uri := fmt.Sprintf("%s/person/latest?api_key=%s", baseURL, tmdb.apiKey) |
| 258 | result, err := getTmdb(uri, &latest) |
| 259 | return result.(*PersonLatest), err |
| 260 | } |
func TMDb.GetTvSeasonCredits
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvseasons.go:
| 52 | func (tmdb *TMDb) GetTvSeasonCredits(showID, seasonNum int) (*TvCredits, error) { |
| 53 | var credits TvCredits |
| 54 | uri := fmt.Sprintf("%s/tv/%v/season/%v/credits?api_key=%s", baseURL, showID, seasonNum, tmdb.apiKey) |
| 55 | result, err := getTmdb(uri, &credits) |
| 56 | return result.(*TvCredits), err |
| 57 | } |
func TMDb.GetTvEpisodeImages
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tvepisodes.go:
| 92 | func (tmdb *TMDb) GetTvEpisodeImages(showID, seasonNum, episodeNum int) (*TvEpisodeImages, error) { |
| 93 | var images TvEpisodeImages |
| 94 | uri := fmt.Sprintf("%s/tv/%v/season/%v/episode/%v/images?api_key=%s", baseURL, showID, seasonNum, episodeNum, tmdb.apiKey) |
| 95 | result, err := getTmdb(uri, &images) |
| 96 | return result.(*TvEpisodeImages), err |
| 97 | } |
func TMDb.GetMovieAccountStates
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 366 | func (tmdb *TMDb) GetMovieAccountStates(id int, sessionID string) (*MovieAccountState, error) { |
| 367 | var state MovieAccountState |
| 368 | uri := fmt.Sprintf("%s/movie/%v/account_states?api_key=%s&session_id=%s", baseURL, id, tmdb.apiKey, sessionID) |
| 369 | result, err := getTmdb(uri, &state) |
| 370 | return result.(*MovieAccountState), err |
| 371 | } |
func TMDb.GetCertificationsTvList
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/certifications.go:
| 27 | func (tmdb *TMDb) GetCertificationsTvList() (*Certification, error) { |
| 28 | var tvCert Certification |
| 29 | uri := fmt.Sprintf("%s/certification/tv/list?api_key=%s", baseURL, tmdb.apiKey) |
| 30 | result, err := getTmdb(uri, &tvCert) |
| 31 | return result.(*Certification), err |
| 32 | } |
func TMDb.GetReviewInfo
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/reviews.go:
| 21 | func (tmdb *TMDb) GetReviewInfo(id string) (*Review, error) { |
| 22 | var reviewInfo Review |
| 23 | uri := fmt.Sprintf("%s/review/%v?api_key=%s", baseURL, id, tmdb.apiKey) |
| 24 | result, err := getTmdb(uri, &reviewInfo) |
| 25 | return result.(*Review), err |
| 26 | } |
func TMDb.GetMovieLatest
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/movies.go:
| 439 | func (tmdb *TMDb) GetMovieLatest() (*Movie, error) { |
| 440 | var movie Movie |
| 441 | uri := fmt.Sprintf("%s/movie/latest?api_key=%s", baseURL, tmdb.apiKey) |
| 442 | result, err := getTmdb(uri, &movie) |
| 443 | return result.(*Movie), err |
| 444 | } |
func TMDb.GetConfiguration
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/configuration.go:
| 23 | func (tmdb *TMDb) GetConfiguration() (*Configuration, error) { |
| 24 | var config Configuration |
| 25 | uri := fmt.Sprintf("%s/configuration?api_key=%s", baseURL, tmdb.apiKey) |
| 26 | result, err := getTmdb(uri, &config) |
| 27 | return result.(*Configuration), err |
| 28 | } |
func TMDb.GetTimezonesList
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/timezones.go:
| 12 | func (tmdb *TMDb) GetTimezonesList() (*Timezones, error) { |
| 13 | var timezoneList Timezones |
| 14 | uri := fmt.Sprintf("%s/timezones/list?api_key=%s", baseURL, tmdb.apiKey) |
| 15 | result, err := getTmdb(uri, &timezoneList) |
| 16 | return result.(*Timezones), err |
| 17 | } |
func TMDb.GetTvTranslations
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/tv.go:
| 376 | func (tmdb *TMDb) GetTvTranslations(id int) (*TvTranslations, error) { |
| 377 | var translations TvTranslations |
| 378 | uri := fmt.Sprintf("%s/tv/%v/translations?api_key=%s", baseURL, id, tmdb.apiKey) |
| 379 | result, err := getTmdb(uri, &translations) |
| 380 | return result.(*TvTranslations), err |
| 381 | } |
func TMDb.GetAuthValidateToken
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/authentication.go:
| 38 | func (tmdb *TMDb) GetAuthValidateToken(token, user, password string) (*AuthenticationToken, error) { |
| 39 | var validToken AuthenticationToken |
| 40 | uri := fmt.Sprintf("%s/authentication/token/validate_with_login?api_key=%s&request_token=%s&username=%s&password=%s", baseURL, tmdb.apiKey, token, user, password) |
| 41 | result, err := getTmdb(uri, &validToken) |
| 42 | return result.(*AuthenticationToken), err |
| 43 | } |
func TMDb.GetAuthToken
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/authentication.go:
| 29 | func (tmdb *TMDb) GetAuthToken() (*AuthenticationToken, error) { |
| 30 | var token AuthenticationToken |
| 31 | uri := fmt.Sprintf("%s/authentication/token/new?api_key=%s", baseURL, tmdb.apiKey) |
| 32 | result, err := getTmdb(uri, &token) |
| 33 | return result.(*AuthenticationToken), err |
| 34 | } |
func TMDb.GetCertificationsMovieList
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/certifications.go:
| 18 | func (tmdb *TMDb) GetCertificationsMovieList() (*Certification, error) { |
| 19 | var movieCert Certification |
| 20 | uri := fmt.Sprintf("%s/certification/movie/list?api_key=%s", baseURL, tmdb.apiKey) |
| 21 | result, err := getTmdb(uri, &movieCert) |
| 22 | return result.(*Certification), err |
| 23 | } |
func TMDb.GetAuthGuestSession
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/authentication.go:
| 56 | func (tmdb *TMDb) GetAuthGuestSession() (*AuthenticationGuestSession, error) { |
| 57 | var session AuthenticationGuestSession |
| 58 | uri := fmt.Sprintf("%s/authentication/guest_session/new?api_key=%s", baseURL, tmdb.apiKey) |
| 59 | result, err := getTmdb(uri, &session) |
| 60 | return result.(*AuthenticationGuestSession), err |
| 61 | } |
func TMDb.GetAuthSession
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/authentication.go:
| 47 | func (tmdb *TMDb) GetAuthSession(token string) (*AuthenticationSession, error) { |
| 48 | var session AuthenticationSession |
| 49 | uri := fmt.Sprintf("%s/authentication/session/new?api_key=%s&request_token=%s", baseURL, tmdb.apiKey, token) |
| 50 | result, err := getTmdb(uri, &session) |
| 51 | return result.(*AuthenticationSession), err |
| 52 | } |
func ToJSON
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/main.go:
| 23 | func ToJSON(payload interface{}) (string, error) { |
| 24 | jsonRes := []byte("{}") //Default value in case of error |
| 25 | jsonRes, err := json.MarshalIndent(payload, "", " ") |
| 26 | return string(jsonRes), err |
| 27 | } |
func Init
BackIn /Users/ryanbrady/Projects/Personal/go-tmdb/src/github.com/ryanbradynd05/go-tmdb/main.go:
| 18 | func Init(apiKey string) *TMDb { |
| 19 | return &TMDb{apiKey: apiKey} |
| 20 | } |
github.com/ryanbradynd05/go-tmdb
100.00%