tmdb

package module
Version: v0.0.0-...-0a7244a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2016 License: MIT Imports: 8 Imported by: 0

README

go-tmdb

GoDoc -- Code Coverage Report

A Go Wrapper for the API of The Movie DB. Complete documentation and test suite are included.

An api_key is needed to use the API. Register for one at themoviedb.org.

Note: This product uses the TMDb API but is not endorsed or certified by TMDb.

The Movie DB

How to install

go get github.com/ryanbradynd05/go-tmdb

How to use

Import the library

import "github.com/ryanbradynd05/go-tmdb"

Create a container struct for global properties

type TMDb struct {
  apiKey string
}

Initialize the library using your api_key

func Init(apiKey string) *TMDb {
  return &TMDb{apiKey: apiKey}
}

Use the api methods as you want, for example:

fightClubInfo, err := TMDb.GetMovieInfo(550, nil)

To use optional parameters, pass in a map[string]string of options and values:

var options = make(map[string]string)
options["language"] = "es"
spanishFightClub, err := TMDb.GetMovieInfo(550, options)

All functions return Go structs. To return JSON, use the ToJSON function:

fightClubJson, err := TMDb.ToJSON(fightClubInfo)

How to test

Create a local.yml file in the root directory that mirrors the local.yml.example file. Then, either run go test to simply run the tests or run the coverage.sh file to run the tests with coverage info.

Available methods

All themoviedb.org API v3 GET methods are included. The POST and DELETE APIs are not included yet. For examples on how to call each function, refer to that function's tests. For documentation of the TheMovieDB's API, see their documentation.

License

The MIT License (MIT)

Copyright (c) 2015 Ryan Brady

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToJSON

func ToJSON(payload interface{}) (string, error)

ToJSON converts from struct to JSON

Types

type AccountInfo

type AccountInfo struct {
	ID           int
	IncludeAdult bool   `json:"include_adult"`
	Iso3166_1    string `json:"iso_3166_1"`
	Iso639_1     string `json:"iso_639_1"`
	Name         string
	Username     string
}

AccountInfo struct

type AuthenticationGuestSession

type AuthenticationGuestSession struct {
	Success        bool
	GuestSessionID string `json:"guest_session_id"`
	ExpiresAt      string `json:"expires_at"`
}

AuthenticationGuestSession struct

type AuthenticationSession

type AuthenticationSession struct {
	Success   bool
	SessionID string `json:"session_id"`
}

AuthenticationSession struct

type AuthenticationToken

type AuthenticationToken struct {
	Success      bool
	RequestToken string `json:"request_token"`
	ExpiresAt    string `json:"expires_at,omitempty"`
}

AuthenticationToken struct

type Certification

type Certification struct {
	Certifications map[string][]struct {
		Certification string
		Meaning       string
		Order         int
	}
}

Certification struct

type Changes

type Changes struct {
	Results []struct {
		ID    int
		Adult bool
	}
}

Changes struct

type Collection

type Collection struct {
	BackdropPath string `json:"backdrop_path"`
	ID           int
	Name         string
	PosterPath   string            `json:"poster_path"`
	Images       *CollectionImages `json:",omitempty"`
	Parts        []struct {
		BackdropPath string `json:"backdrop_path"`
		ID           int
		PosterPath   string `json:"poster_path"`
		ReleaseDate  string `json:"release_date"`
		Title        string
	}
}

Collection struct

type CollectionImage

type CollectionImage struct {
	AspectRatio float32 `json:"aspect_ratio"`
	FilePath    string  `json:"file_path"`
	Height      int
	Iso639_1    string `json:"iso_639_1"`
	Width       int
}

CollectionImage struct

type CollectionImages

type CollectionImages struct {
	Backdrops  []CollectionImage
	ID         int
	Name       string
	PosterPath string `json:"poster_path"`
	Posters    []CollectionImage
}

CollectionImages struct

type CollectionSearchResults

type CollectionSearchResults struct {
	Page    int
	Results []struct {
		ID           int
		BackdropPath string `json:"backdrop_path"`
		Name         string
		PosterPath   string `json:"poster_path"`
	}
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
}

CollectionSearchResults struct

type Company

type Company struct {
	Description   string
	Headquarters  string
	Homepage      string
	ID            int
	LogoPath      string `json:"logo_path"`
	Name          string
	Movies        *MoviePagedResults `json:",omitempty"`
	ParentCompany struct {
		Name     string
		ID       int
		LogoPath string `json:"logo_path"`
	} `json:"parent_company"`
}

Company struct

type CompanySearchResults

type CompanySearchResults struct {
	Page    int
	Results []struct {
		ID       int
		LogoPath string `json:"logo_path"`
		Name     string
	}
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
}

CompanySearchResults struct

type Configuration

type Configuration struct {
	Images struct {
		BaseURL       string   `json:"base_url"`
		SecureBaseURL string   `json:"secure_base_url"`
		BackdropSizes []string `json:"backdrop_sizes"`
		LogoSizes     []string `json:"logo_sizes"`
		PosterSizes   []string `json:"poster_sizes"`
		ProfileSizes  []string `json:"profile_sizes"`
		StillSizes    []string `json:"still_sizes"`
	}
	ChangeKeys []string `json:"change_keys"`
}

Configuration struct

type Credit

type Credit struct {
	CreditType string `json:"credit_type"`
	Department string
	Job        string
	Media      struct {
		ID           int
		Name         string
		OriginalName string `json:"original_name"`
		Character    string
		Episodes     []struct {
			AirDate       string `json:"air_date"`
			EpisodeNumber int    `json:"episode_number"`
			Name          string
			Overview      string
			SeasonNumber  int    `json:"season_number"`
			StillPath     string `json:"still_path"`
		}
		Seasons []struct {
			AirDate      string `json:"air_date"`
			PosterPath   string `json:"poster_path"`
			SeasonNumber int    `json:"season_number"`
		}
	}
	MediaType string `json:"media_type"`
	ID        string
	Person    struct {
		Name string
		ID   string
	}
}

Credit struct

type FindResults

type FindResults struct {
	MovieResults     []MovieShort  `json:"movie_results,omitempty"`
	PersonResults    []PersonShort `json:"person_results,omitempty"`
	TvResults        []TvShort     `json:"tv_results,omitempty"`
	TvEpisodeResults []struct {
		AirDate       string `json:"air_date"`
		EpisodeNumber int    `json:"episode_number"`
		Name          string
		ID            int
		SeasonNumber  int     `json:"season_number"`
		StillPath     string  `json:"still_path"`
		ShowID        int     `json:"show_id"`
		VoteAverage   float32 `json:"vote_average"`
		VoteCount     int     `json:"vote_count"`
	} `json:"tv_episode_results,omitempty"`
	TvSeasonResults []struct {
		AirDate      string `json:"air_date"`
		Name         string
		ID           int
		SeasonNumber int `json:"season_number"`
		ShowID       int `json:"show_id"`
	} `json:"tv_season_results,omitempty"`
}

FindResults struct

type Genre

type Genre struct {
	Genres []struct {
		ID   int
		Name string
	}
}

Genre struct

type Job

type Job struct {
	Jobs []struct {
		Department string
		JobList    []string `json:"job_list"`
	}
}

Job struct

type Keyword

type Keyword struct {
	ID   int
	Name string
}

Keyword struct

type KeywordSearchResults

type KeywordSearchResults struct {
	Page    int
	Results []struct {
		ID   int
		Name string
	}
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
}

KeywordSearchResults struct

type ListInfo

type ListInfo struct {
	CreatedBy     string `json:"created_by"`
	FavoriteCount int    `json:"favorite_count"`
	ID            string
	Description   string
	Items         []MovieShort
	ItemCount     int    `json:"item_count"`
	Iso639_1      string `json:"iso_639_1"`
	Name          string
	PosterPath    string `json:"poster_path"`
}

ListInfo struct

type ListItemStatus

type ListItemStatus struct {
	ID          string
	ItemPresent bool `json:"item_present"`
}

ListItemStatus struct

type ListSearchResults

type ListSearchResults struct {
	Page    int
	Results []struct {
		Description   string
		FavoriteCount int `json:"favorite_count"`
		ID            string
		ItemCount     int    `json:"item_count"`
		Iso639_1      string `json:"iso_639_1"`
		ListType      string `json:"list_type"`
		Name          string
		PosterPath    string `json:"poster_path"`
	}
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
}

ListSearchResults struct

type Movie

type Movie struct {
	Adult               bool
	BackdropPath        string `json:"backdrop_path"`
	BelongsToCollection bool   `json:"belongs_to_collection"`
	Budget              uint32
	Genres              []struct {
		ID   int
		Name string
	}
	Homepage            string
	ID                  int
	ImdbID              string `json:"imdb_id"`
	OriginalLanguage    string `json:"original_language"`
	OriginalTitle       string `json:"original_title"`
	Overview            string
	Popularity          float32
	PosterPath          string `json:"poster_path"`
	ProductionCompanies []struct {
		ID   int
		Name string
	} `json:"production_companies"`
	ProductionCountries []struct {
		Iso3166_1 string `json:"iso_3166_1"`
		Name      string
	} `json:"production_countries"`
	ReleaseDate     string `json:"release_date"`
	Revenue         uint32
	Runtime         uint32
	SpokenLanguages []struct {
		Iso639_1 string `json:"iso_639_1"`
		Name     string
	} `json:"spoken_languages"`
	Status            string
	Tagline           string
	Title             string
	Video             bool
	VoteAverage       float32                 `json:"vote_average"`
	VoteCount         uint32                  `json:"vote_count"`
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Credits           *MovieCredits           `json:",omitempty"`
	Images            *MovieImages            `json:",omitempty"`
	Keywords          *MovieKeywords          `json:",omitempty"`
	Releases          *MovieReleases          `json:",omitempty"`
	Videos            *MovieVideos            `json:",omitempty"`
	Translations      *MovieTranslations      `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Reviews           *MovieReviews           `json:",omitempty"`
	Lists             *MovieLists             `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

Movie struct

type MovieAccountState

type MovieAccountState struct {
	ID        int
	Favorite  bool
	Watchlist bool
	Rated     struct {
		Value float32
	}
}

MovieAccountState struct

type MovieAlternativeTitles

type MovieAlternativeTitles struct {
	ID     int
	Titles []struct {
		Iso3166_1 string `json:"iso_3166_1"`
		Title     string
	}
	AccountStates *MovieAccountState `json:"account_states,omitempty"`
	Credits       *MovieCredits      `json:",omitempty"`
	Images        *MovieImages       `json:",omitempty"`
	Keywords      *MovieKeywords     `json:",omitempty"`
	Releases      *MovieReleases     `json:",omitempty"`
	Videos        *MovieVideos       `json:",omitempty"`
	Translations  *MovieTranslations `json:",omitempty"`
	Similar       *MoviePagedResults `json:",omitempty"`
	Reviews       *MovieReviews      `json:",omitempty"`
	Lists         *MovieLists        `json:",omitempty"`
	Changes       *MovieChanges      `json:",omitempty"`
	Rating        *MovieRating       `json:",omitempty"`
}

MovieAlternativeTitles struct

type MovieChanges

type MovieChanges struct {
	Changes []struct {
		Key   string
		Items []struct {
			ID     string
			Action string
			Time   string
		}
	}
}

MovieChanges struct

type MovieCredits

type MovieCredits struct {
	ID   int
	Cast []struct {
		CastID      int `json:"cast_id"`
		Character   string
		CreditID    string `json:"credit_id"`
		ID          int
		Name        string
		Order       int
		ProfilePath string `json:"profile_path"`
	}
	Crew []struct {
		CreditID    string `json:"credit_id"`
		Department  string
		ID          int
		Job         string
		Name        string
		ProfilePath string `json:"profile_path"`
	}
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Images            *MovieImages            `json:",omitempty"`
	Keywords          *MovieKeywords          `json:",omitempty"`
	Releases          *MovieReleases          `json:",omitempty"`
	Videos            *MovieVideos            `json:",omitempty"`
	Translations      *MovieTranslations      `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Reviews           *MovieReviews           `json:",omitempty"`
	Lists             *MovieLists             `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

MovieCredits struct

type MovieDatedResults

type MovieDatedResults struct {
	Dates struct {
		Minimum string
		Maximum string
	}
	Page         int
	Results      []MovieShort
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
}

MovieDatedResults struct

type MovieImage

type MovieImage struct {
	FilePath    string `json:"file_path"`
	Width       int
	Height      int
	Iso639_1    string  `json:"iso_639_1"`
	AspectRatio float32 `json:"aspect_ratio"`
	VoteAverage float32 `json:"vote_average"`
	VoteCount   uint32  `json:"vote_count"`
}

MovieImage struct

type MovieImages

type MovieImages struct {
	ID                int
	Backdrops         []MovieImage
	Posters           []MovieImage
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Credits           *MovieCredits           `json:",omitempty"`
	Keywords          *MovieKeywords          `json:",omitempty"`
	Releases          *MovieReleases          `json:",omitempty"`
	Videos            *MovieVideos            `json:",omitempty"`
	Translations      *MovieTranslations      `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Reviews           *MovieReviews           `json:",omitempty"`
	Lists             *MovieLists             `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

MovieImages struct

type MovieKeywords

type MovieKeywords struct {
	ID       int
	Keywords []struct {
		ID   int
		Name string
	}
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Credits           *MovieCredits           `json:",omitempty"`
	Images            *MovieImages            `json:",omitempty"`
	Releases          *MovieReleases          `json:",omitempty"`
	Videos            *MovieVideos            `json:",omitempty"`
	Translations      *MovieTranslations      `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Reviews           *MovieReviews           `json:",omitempty"`
	Lists             *MovieLists             `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

MovieKeywords struct

type MovieLists

type MovieLists struct {
	ID      int
	Page    int
	Results []struct {
		Description   string
		FavoriteCount int `json:"favorite_count"`
		ID            string
		ItemCount     int    `json:"item_count"`
		Iso639_1      string `json:"iso_639_1"`
		Name          string
		PosterPath    string `json:"poster_path"`
	}
	TotalPages        int                     `json:"total_pages"`
	TotalResults      int                     `json:"total_results"`
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Credits           *MovieCredits           `json:",omitempty"`
	Images            *MovieImages            `json:",omitempty"`
	Keywords          *MovieKeywords          `json:",omitempty"`
	Releases          *MovieReleases          `json:",omitempty"`
	Videos            *MovieVideos            `json:",omitempty"`
	Translations      *MovieTranslations      `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Reviews           *MovieReviews           `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

MovieLists struct

type MoviePagedResults

type MoviePagedResults struct {
	ID                int
	Page              int
	Results           []MovieShort
	TotalPages        int                     `json:"total_pages"`
	TotalResults      int                     `json:"total_results"`
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Credits           *MovieCredits           `json:",omitempty"`
	Images            *MovieImages            `json:",omitempty"`
	Keywords          *MovieKeywords          `json:",omitempty"`
	Releases          *MovieReleases          `json:",omitempty"`
	Videos            *MovieVideos            `json:",omitempty"`
	Translations      *MovieTranslations      `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Reviews           *MovieReviews           `json:",omitempty"`
	Lists             *MovieLists             `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

MoviePagedResults struct

type MovieRating

type MovieRating struct {
	StatusCode    int    `json:"status_code"`
	StatusMessage string `json:"status_message"`
}

MovieRating struct

type MovieReleases

type MovieReleases struct {
	ID        int
	Countries []struct {
		Iso3166_1     string `json:"iso_3166_1"`
		Certification string
		ReleaseDate   string `json:"release_date"`
	}
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Credits           *MovieCredits           `json:",omitempty"`
	Images            *MovieImages            `json:",omitempty"`
	Keywords          *MovieKeywords          `json:",omitempty"`
	Videos            *MovieVideos            `json:",omitempty"`
	Translations      *MovieTranslations      `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Reviews           *MovieReviews           `json:",omitempty"`
	Lists             *MovieLists             `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

MovieReleases struct

type MovieReviews

type MovieReviews struct {
	ID      int
	Page    int
	Results []struct {
		ID      string
		Author  string
		Content string
		URL     string
	}
	TotalPages        int                     `json:"total_pages"`
	TotalResults      int                     `json:"total_results"`
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Credits           *MovieCredits           `json:",omitempty"`
	Images            *MovieImages            `json:",omitempty"`
	Keywords          *MovieKeywords          `json:",omitempty"`
	Releases          *MovieReleases          `json:",omitempty"`
	Videos            *MovieVideos            `json:",omitempty"`
	Translations      *MovieTranslations      `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Lists             *MovieLists             `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

MovieReviews struct

type MovieSearchResults

type MovieSearchResults struct {
	Page         int
	Results      []MovieShort
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
}

MovieSearchResults struct

type MovieShort

type MovieShort struct {
	Adult         bool
	BackdropPath  string `json:"backdrop_path"`
	ID            int
	OriginalTitle string `json:"original_title"`
	Popularity    float32
	PosterPath    string `json:"poster_path"`
	ReleaseDate   string `json:"release_date"`
	Title         string
	Video         bool
	VoteAverage   float32 `json:"vote_average"`
	VoteCount     uint32  `json:"vote_count"`
}

MovieShort struct

type MovieTranslations

type MovieTranslations struct {
	ID           int
	Translations []struct {
		Iso639_1    string `json:"iso_639_1"`
		Name        string
		EnglishName string `json:"english_name"`
	}
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Credits           *MovieCredits           `json:",omitempty"`
	Images            *MovieImages            `json:",omitempty"`
	Keywords          *MovieKeywords          `json:",omitempty"`
	Releases          *MovieReleases          `json:",omitempty"`
	Videos            *MovieVideos            `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Reviews           *MovieReviews           `json:",omitempty"`
	Lists             *MovieLists             `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

MovieTranslations struct

type MovieVideos

type MovieVideos struct {
	ID      int
	Results []struct {
		ID       int
		Iso639_1 string `json:"iso_639_1"`
		Key      string
		Name     string
		Site     string
		Size     int
		Type     string
	}
	AlternativeTitles *MovieAlternativeTitles `json:"alternative_titles,omitempty"`
	Credits           *MovieCredits           `json:",omitempty"`
	Images            *MovieImages            `json:",omitempty"`
	Keywords          *MovieKeywords          `json:",omitempty"`
	Releases          *MovieReleases          `json:",omitempty"`
	Translations      *MovieTranslations      `json:",omitempty"`
	Similar           *MoviePagedResults      `json:",omitempty"`
	Reviews           *MovieReviews           `json:",omitempty"`
	Lists             *MovieLists             `json:",omitempty"`
	Changes           *MovieChanges           `json:",omitempty"`
	Rating            *MovieRating            `json:",omitempty"`
}

MovieVideos struct

type MultiSearchResults

type MultiSearchResults struct {
	Page    int
	Results []struct {
		BackdropPath  string `json:"backdrop_path"`
		ID            int
		OriginalName  string   `json:"original_name"`
		FirstAirDate  string   `json:"first_air_date"`
		OriginCountry []string `json:"origin_country"`
		PosterPath    string   `json:"poster_path"`
		Popularity    float32
		Name          string
		VoteAverage   float32 `json:"vote_average"`
		VoteCount     uint32  `json:"vote_count"`
		MediaType     string  `json:"media_type"`
	}
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
}

MultiSearchResults struct

type Network

type Network struct {
	ID   int
	Name string
}

Network struct

type Person

type Person struct {
	ID              int
	Name            string
	Overview        string
	Adult           bool
	Biography       string
	Birthday        string
	Deathday        string
	Homepage        string
	AlsoKnownAs     []string               `json:"also_known_as"`
	PlaceOfBirth    string                 `json:"place_of_birth"`
	ProfilePath     string                 `json:"profile_path"`
	Changes         *PersonChanges         `json:",omitempty"`
	MovieCredits    *PersonMovieCredits    `json:"movie_credits,omitempty"`
	TvCredits       *PersonTvCredits       `json:"tv_credits,omitempty"`
	CombinedCredits *PersonCombinedCredits `json:"combined_credits,omitempty"`
	ExternalIds     *TvExternalIds         `json:"external_ids,omitempty"`
	Images          *PersonImages          `json:",omitempty"`
	TaggedImages    *PersonTaggedImages    `json:"tagged_images,omitempty"`
}

Person struct

type PersonChanges

type PersonChanges struct {
	Changes []struct {
		Key   string
		Items []struct {
			ID     string
			Action string
			Time   string
		}
	}
}

PersonChanges struct

type PersonCombinedCredits

type PersonCombinedCredits struct {
	ID   int
	Cast []struct {
		Adult         bool
		Character     string
		CreditID      string `json:"credit_id"`
		ID            int
		OriginalTitle string `json:"original_title"`
		PosterPath    string `json:"poster_path"`
		ReleaseDate   string `json:"release_date"`
		Title         string
		MediaType     string `json:"media_type"`
	}
	Crew []struct {
		Adult         bool
		CreditID      string `json:"credit_id"`
		Department    string
		ID            int
		Job           string
		OriginalTitle string `json:"original_title"`
		PosterPath    string `json:"poster_path"`
		ReleaseDate   string `json:"release_date"`
		Title         string
		MediaType     string `json:"media_type"`
	}
}

PersonCombinedCredits struct

type PersonImages

type PersonImages struct {
	ID       int
	Profiles []struct {
		AspectRatio float32 `json:"aspect_ratio"`
		FilePath    string  `json:"file_path"`
		ID          string
		Width       int
		Height      int
		Iso639_1    string  `json:"iso_639_1"`
		VoteAverage float32 `json:"vote_average"`
		VoteCount   int     `json:"vote_count"`
	}
}

PersonImages struct

type PersonLatest

type PersonLatest struct {
	ID           int
	Name         string
	Adult        bool
	Biography    string
	Birthday     string
	Deathday     string
	Homepage     string
	AlsoKnownAs  []string `json:"also_known_as"`
	PlaceOfBirth string   `json:"place_of_birth"`
	ProfilePath  string   `json:"profile_path"`
}

PersonLatest struct

type PersonMovieCredits

type PersonMovieCredits struct {
	ID   int
	Cast []struct {
		Adult         bool
		Character     string
		CreditID      string `json:"credit_id"`
		ID            int
		OriginalTitle string `json:"original_title"`
		PosterPath    string `json:"poster_path"`
		ReleaseDate   string `json:"release_date"`
		Title         string
	}
	Crew []struct {
		Adult         bool
		CreditID      string `json:"credit_id"`
		Department    string
		ID            int
		Job           string
		OriginalTitle string `json:"original_title"`
		PosterPath    string `json:"poster_path"`
		ReleaseDate   string `json:"release_date"`
		Title         string
	}
}

PersonMovieCredits struct

type PersonPopular

type PersonPopular struct {
	Page         int
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
	Results      []PersonShort
}

PersonPopular struct

type PersonSearchResults

type PersonSearchResults struct {
	Page    int
	Results []struct {
		Adult      bool
		ID         int
		Name       string
		Popularity float32
		PosterPath string `json:"poster_path"`
		KnownFor   []struct {
			Adult         bool
			BackdropPath  string `json:"backdrop_path"`
			ID            int
			OriginalTitle string `json:"original_title"`
			ReleaseDate   string `json:"release_date"`
			PosterPath    string `json:"poster_path"`
			Popularity    float32
			Title         string
			VoteAverage   float32 `json:"vote_average"`
			VoteCount     uint32  `json:"vote_count"`
			MediaType     string  `json:"media_type"`
		} `json:"known_for"`
	}
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
}

PersonSearchResults struct

type PersonShort

type PersonShort struct {
	Adult       bool
	ID          int
	Name        string
	Popularity  float32
	ProfilePath string       `json:"profile_path"`
	KnownFor    []MovieShort `json:"known_for"`
}

PersonShort struct

type PersonTaggedImages

type PersonTaggedImages struct {
	ID           int
	Page         int
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
	Results      []struct {
		AspectRatio float32 `json:"aspect_ratio"`
		FilePath    string  `json:"file_path"`
		ID          string
		Width       int
		Height      int
		Iso639_1    string  `json:"iso_639_1"`
		VoteAverage float32 `json:"vote_average"`
		VoteCount   int     `json:"vote_count"`
		ImageType   string  `json:"image_type"`
		MediaType   string  `json:"media_type"`
		Media       struct {
			Adult         bool
			BackdropPath  string `json:"backdrop_path"`
			ID            int
			OriginalTitle string `json:"original_title"`
			PosterPath    string `json:"poster_path"`
			ReleaseDate   string `json:"release_date"`
			Title         string
			Popularity    float32
		}
	}
}

PersonTaggedImages struct

type PersonTvCredits

type PersonTvCredits struct {
	ID   int
	Cast []struct {
		Character    string
		CreditID     string `json:"credit_id"`
		EpisodeCount int    `json:"episode_count"`
		FirstAirDate string `json:"first_air_date"`
		ID           int
		Name         string
		OriginalName string `json:"original_name"`
		PosterPath   string `json:"poster_path"`
	}
	Crew []struct {
		CreditID     string `json:"credit_id"`
		Department   string
		FirstAirDate string `json:"first_air_date"`
		ID           int
		Job          string
		Name         string
		OriginalName string `json:"original_name"`
		PosterPath   string `json:"poster_path"`
	}
}

PersonTvCredits struct

type Review

type Review struct {
	ID         string
	Author     string
	Content    string
	Iso639_1   string `json:"iso_639_1"`
	MediaID    int    `json:"media_id"`
	MediaTitle string `json:"media_title"`
	MediaType  string `json:"media_type"`
	URL        string
}

Review struct

type TMDb

type TMDb struct {
	// contains filtered or unexported fields
}

TMDb container struct for global properties

func Init

func Init(apiKey string) *TMDb

Init setup the apiKey

func (*TMDb) DiscoverMovie

func (tmdb *TMDb) DiscoverMovie(options map[string]string) (*MoviePagedResults, error)

DiscoverMovie discovers movies by different types of data like average rating, number of votes, genres and certifications http://docs.themoviedb.apiary.io/#reference/discover/discovermovie/get

func (*TMDb) DiscoverTV

func (tmdb *TMDb) DiscoverTV(options map[string]string) (*TvPagedResults, error)

DiscoverTV discovers TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates http://docs.themoviedb.apiary.io/#reference/discover/discovertv/get

func (*TMDb) GetAccountFavoriteMovies

func (tmdb *TMDb) GetAccountFavoriteMovies(id int, sessionID string, options map[string]string) (*MoviePagedResults, error)

GetAccountFavoriteMovies gets the list of favorite movies for an account http://docs.themoviedb.apiary.io/#reference/account/accountidfavoritemovies/get

func (*TMDb) GetAccountFavoriteTv

func (tmdb *TMDb) GetAccountFavoriteTv(id int, sessionID string, options map[string]string) (*TvPagedResults, error)

GetAccountFavoriteTv gets the list of favorite movies for an account http://docs.themoviedb.apiary.io/#reference/account/accountidfavoritetv/get

func (*TMDb) GetAccountInfo

func (tmdb *TMDb) GetAccountInfo(sessionID string) (*AccountInfo, error)

GetAccountInfo gets the basic information for an account http://docs.themoviedb.apiary.io/#reference/account/account/get

func (*TMDb) GetAccountLists

func (tmdb *TMDb) GetAccountLists(id int, sessionID string, options map[string]string) (*MovieLists, error)

GetAccountLists gets the lists that you have created and marked as a favorite http://docs.themoviedb.apiary.io/#reference/account/accountidlists/get

func (*TMDb) GetAccountRatedMovies

func (tmdb *TMDb) GetAccountRatedMovies(id int, sessionID string, options map[string]string) (*MoviePagedResults, error)

GetAccountRatedMovies gets the list of rated movies (and associated rating) for an account http://docs.themoviedb.apiary.io/#reference/account/accountidratedmovies/get

func (*TMDb) GetAccountRatedTv

func (tmdb *TMDb) GetAccountRatedTv(id int, sessionID string, options map[string]string) (*TvPagedResults, error)

GetAccountRatedTv gets the list of rated TV shows (and associated rating) for an account http://docs.themoviedb.apiary.io/#reference/account/accountidratedtv/get

func (*TMDb) GetAccountWatchlistMovies

func (tmdb *TMDb) GetAccountWatchlistMovies(id int, sessionID string, options map[string]string) (*MoviePagedResults, error)

GetAccountWatchlistMovies gets the list of movies on an accounts watchlist http://docs.themoviedb.apiary.io/#reference/account/accountidwatchlistmovies/get

func (*TMDb) GetAccountWatchlistTv

func (tmdb *TMDb) GetAccountWatchlistTv(id int, sessionID string, options map[string]string) (*TvPagedResults, error)

GetAccountWatchlistTv gets the list of TV series on an accounts watchlist http://docs.themoviedb.apiary.io/#reference/account/accountidwatchlisttv/get

func (*TMDb) GetAuthGuestSession

func (tmdb *TMDb) GetAuthGuestSession() (*AuthenticationGuestSession, error)

GetAuthGuestSession generates a valid request token for user based authentication http://docs.themoviedb.apiary.io/#reference/authentication/authenticationguestsessionnew/get

func (*TMDb) GetAuthSession

func (tmdb *TMDb) GetAuthSession(token string) (*AuthenticationSession, error)

GetAuthSession generates a session id for user based authentication http://docs.themoviedb.apiary.io/#reference/authentication/authenticationsessionnew/get

func (*TMDb) GetAuthToken

func (tmdb *TMDb) GetAuthToken() (*AuthenticationToken, error)

GetAuthToken generates a valid request token for user based authentication http://docs.themoviedb.apiary.io/#reference/authentication/authenticationtokennew/get

func (*TMDb) GetAuthValidateToken

func (tmdb *TMDb) GetAuthValidateToken(token, user, password string) (*AuthenticationToken, error)

GetAuthValidateToken authenticates a user with a TMDb username and password http://docs.themoviedb.apiary.io/#reference/authentication/authenticationtokenvalidatewithlogin/get

func (*TMDb) GetCertificationsMovieList

func (tmdb *TMDb) GetCertificationsMovieList() (*Certification, error)

GetCertificationsMovieList for movies http://docs.themoviedb.apiary.io/#reference/certifications/certificationmovielist/get

func (*TMDb) GetCertificationsTvList

func (tmdb *TMDb) GetCertificationsTvList() (*Certification, error)

GetCertificationsTvList for tv shows http://docs.themoviedb.apiary.io/#reference/certifications/certificationtvlist/get

func (*TMDb) GetChangesMovie

func (tmdb *TMDb) GetChangesMovie(options map[string]string) (*Changes, error)

GetChangesMovie gets a list of movie ids that have been edited http://docs.themoviedb.apiary.io/#reference/changes/moviechanges/get

func (*TMDb) GetChangesPerson

func (tmdb *TMDb) GetChangesPerson(options map[string]string) (*Changes, error)

GetChangesPerson gets a list of people ids that have been edited http://docs.themoviedb.apiary.io/#reference/changes/personchanges/get

func (*TMDb) GetChangesTv

func (tmdb *TMDb) GetChangesTv(options map[string]string) (*Changes, error)

GetChangesTv gets a list of tv show ids that have been edited http://docs.themoviedb.apiary.io/#reference/changes/tvchanges/get

func (*TMDb) GetCollectionImages

func (tmdb *TMDb) GetCollectionImages(id int, options map[string]string) (*CollectionImages, error)

GetCollectionImages gets a list of people ids that have been edited http://docs.themoviedb.apiary.io/#reference/collections/collectionidimages/get

func (*TMDb) GetCollectionInfo

func (tmdb *TMDb) GetCollectionInfo(id int, options map[string]string) (*Collection, error)

GetCollectionInfo gets the basic collection information for a specific collection id http://docs.themoviedb.apiary.io/#reference/collections/collectionid/get

func (*TMDb) GetCompanyInfo

func (tmdb *TMDb) GetCompanyInfo(id int, options map[string]string) (*Company, error)

GetCompanyInfo gets all of the basic information about a company http://docs.themoviedb.apiary.io/#reference/companies/companyid/get

func (*TMDb) GetCompanyMovies

func (tmdb *TMDb) GetCompanyMovies(id int, options map[string]string) (*MoviePagedResults, error)

GetCompanyMovies gets the list of movies associated with a particular company http://docs.themoviedb.apiary.io/#reference/companies/companyidmovies/get

func (*TMDb) GetConfiguration

func (tmdb *TMDb) GetConfiguration() (*Configuration, error)

GetConfiguration gets the system wide configuration information http://docs.themoviedb.apiary.io/#reference/configuration/configuration/get

func (*TMDb) GetCreditInfo

func (tmdb *TMDb) GetCreditInfo(id string, options map[string]string) (*Credit, error)

GetCreditInfo gets the detailed information about a particular credit record http://docs.themoviedb.apiary.io/#reference/credits/creditcreditid/get

func (*TMDb) GetFind

func (tmdb *TMDb) GetFind(id, source string, options map[string]string) (*FindResults, error)

GetFind makes it easy to search for objects in our database by an external id http://docs.themoviedb.apiary.io/#reference/find/findid/get

func (*TMDb) GetGuestSessionRatedMovies

func (tmdb *TMDb) GetGuestSessionRatedMovies(sessionID string, options map[string]string) (*MoviePagedResults, error)

GetGuestSessionRatedMovies gets the list of rated movies for a specific guest session id http://docs.themoviedb.apiary.io/#reference/guest-sessions/guestsessionguestsessionidratedmovies/get

func (*TMDb) GetJobList

func (tmdb *TMDb) GetJobList() (*Job, error)

GetJobList gets a list of valid jobs http://docs.themoviedb.apiary.io/#reference/jobs/joblist/get

func (*TMDb) GetKeywordInfo

func (tmdb *TMDb) GetKeywordInfo(id int) (*Keyword, error)

GetKeywordInfo gets the basic information for a specific keyword id http://docs.themoviedb.apiary.io/#reference/keywords/keywordid/get

func (*TMDb) GetKeywordMovies

func (tmdb *TMDb) GetKeywordMovies(id int, options map[string]string) (*MoviePagedResults, error)

GetKeywordMovies gets the list of movies for a particular keyword by id http://docs.themoviedb.apiary.io/#reference/keywords/keywordidmovies/get

func (*TMDb) GetListInfo

func (tmdb *TMDb) GetListInfo(id string) (*ListInfo, error)

GetListInfo gets a list by id http://docs.themoviedb.apiary.io/#reference/lists/listid/get

func (*TMDb) GetListItemStatus

func (tmdb *TMDb) GetListItemStatus(id string, movieID int) (*ListItemStatus, error)

GetListItemStatus checks to see if a movie ID is already added to a list http://docs.themoviedb.apiary.io/#reference/lists/listiditemstatus/get

func (*TMDb) GetMovieAccountStates

func (tmdb *TMDb) GetMovieAccountStates(id int, sessionID string) (*MovieAccountState, error)

GetMovieAccountStates gets the status of whether or not the movie has been rated or added to their favourite or movie watch list http://docs.themoviedb.apiary.io/#reference/movies/movieidaccountstates/get

func (*TMDb) GetMovieAlternativeTitles

func (tmdb *TMDb) GetMovieAlternativeTitles(id int, options map[string]string) (*MovieAlternativeTitles, error)

GetMovieAlternativeTitles for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidalternativetitles/get

func (*TMDb) GetMovieChanges

func (tmdb *TMDb) GetMovieChanges(id int, options map[string]string) (*MovieChanges, error)

GetMovieChanges for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidchanges/get

func (*TMDb) GetMovieCredits

func (tmdb *TMDb) GetMovieCredits(id int, options map[string]string) (*MovieCredits, error)

GetMovieCredits for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidcredits/get

func (*TMDb) GetMovieGenres

func (tmdb *TMDb) GetMovieGenres(options map[string]string) (*Genre, error)

GetMovieGenres gets the list of movie genres http://docs.themoviedb.apiary.io/#reference/genres/genremovielist/get

func (*TMDb) GetMovieImages

func (tmdb *TMDb) GetMovieImages(id int, options map[string]string) (*MovieImages, error)

GetMovieImages for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidimages/get

func (*TMDb) GetMovieInfo

func (tmdb *TMDb) GetMovieInfo(id int, options map[string]string) (*Movie, error)

GetMovieInfo for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieid/get

func (*TMDb) GetMovieKeywords

func (tmdb *TMDb) GetMovieKeywords(id int, options map[string]string) (*MovieKeywords, error)

GetMovieKeywords for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidkeywords/get

func (*TMDb) GetMovieLatest

func (tmdb *TMDb) GetMovieLatest() (*Movie, error)

GetMovieLatest gets the latest movie http://docs.themoviedb.apiary.io/#reference/movies/movielatest/get

func (*TMDb) GetMovieLists

func (tmdb *TMDb) GetMovieLists(id int, options map[string]string) (*MovieLists, error)

GetMovieLists that the movie belongs to http://docs.themoviedb.apiary.io/#reference/movies/movieidlists/get

func (*TMDb) GetMovieNowPlaying

func (tmdb *TMDb) GetMovieNowPlaying(options map[string]string) (*MovieDatedResults, error)

GetMovieNowPlaying that have been, or are being released this week http://docs.themoviedb.apiary.io/#reference/movies/movienowplaying/get

func (*TMDb) GetMoviePopular

func (tmdb *TMDb) GetMoviePopular(options map[string]string) (*MoviePagedResults, error)

GetMoviePopular gets the list of popular movies on The Movie Database http://docs.themoviedb.apiary.io/#reference/movies/moviepopular/get

func (*TMDb) GetMovieReleases

func (tmdb *TMDb) GetMovieReleases(id int, options map[string]string) (*MovieReleases, error)

GetMovieReleases for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidreleases/get

func (*TMDb) GetMovieReviews

func (tmdb *TMDb) GetMovieReviews(id int, options map[string]string) (*MovieReviews, error)

GetMovieReviews for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidreviews/get

func (*TMDb) GetMovieSimilar

func (tmdb *TMDb) GetMovieSimilar(id int, options map[string]string) (*MoviePagedResults, error)

GetMovieSimilar for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidsimilar/get

func (*TMDb) GetMovieTopRated

func (tmdb *TMDb) GetMovieTopRated(options map[string]string) (*MoviePagedResults, error)

GetMovieTopRated gets the list of top rated movies http://docs.themoviedb.apiary.io/#reference/movies/movietoprated/get

func (*TMDb) GetMovieTranslations

func (tmdb *TMDb) GetMovieTranslations(id int, options map[string]string) (*MovieTranslations, error)

GetMovieTranslations for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidtranslations/get

func (*TMDb) GetMovieUpcoming

func (tmdb *TMDb) GetMovieUpcoming(options map[string]string) (*MovieDatedResults, error)

GetMovieUpcoming by release date http://docs.themoviedb.apiary.io/#reference/movies/movieupcoming/get

func (*TMDb) GetMovieVideos

func (tmdb *TMDb) GetMovieVideos(id int, options map[string]string) (*MovieVideos, error)

GetMovieVideos for a specific movie id http://docs.themoviedb.apiary.io/#reference/movies/movieidvideos/get

func (*TMDb) GetNetworkInfo

func (tmdb *TMDb) GetNetworkInfo(id int) (*Network, error)

GetNetworkInfo gets the basic information about a TV network http://docs.themoviedb.apiary.io/#reference/networks/networkid/get

func (*TMDb) GetPersonChanges

func (tmdb *TMDb) GetPersonChanges(id int, options map[string]string) (*PersonChanges, error)

GetPersonChanges for a specific person id http://docs.themoviedb.apiary.io/#reference/people/personidchanges/get

func (*TMDb) GetPersonCombinedCredits

func (tmdb *TMDb) GetPersonCombinedCredits(id int, options map[string]string) (*PersonCombinedCredits, error)

GetPersonCombinedCredits gets the combined (movie and TV) credits for a specific person id http://docs.themoviedb.apiary.io/#reference/people/personidcombinedcredits/get

func (*TMDb) GetPersonExternalIds

func (tmdb *TMDb) GetPersonExternalIds(id int) (*TvExternalIds, error)

GetPersonExternalIds gets the external ids for a specific person id http://docs.themoviedb.apiary.io/#reference/people/personidexternalids/get

func (*TMDb) GetPersonImages

func (tmdb *TMDb) GetPersonImages(id int) (*PersonImages, error)

GetPersonImages gets the images for a specific person id http://docs.themoviedb.apiary.io/#reference/people/personidimages/get

func (*TMDb) GetPersonInfo

func (tmdb *TMDb) GetPersonInfo(id int, options map[string]string) (*Person, error)

GetPersonInfo gets the general person information for a specific id http://docs.themoviedb.apiary.io/#reference/people/personid/get

func (*TMDb) GetPersonLatest

func (tmdb *TMDb) GetPersonLatest() (*PersonLatest, error)

GetPersonLatest gets the latest person id http://docs.themoviedb.apiary.io/#reference/people/personlatest/get

func (*TMDb) GetPersonMovieCredits

func (tmdb *TMDb) GetPersonMovieCredits(id int, options map[string]string) (*PersonMovieCredits, error)

GetPersonMovieCredits gets the movie credits for a specific person id http://docs.themoviedb.apiary.io/#reference/people/personidmoviecredits/get

func (*TMDb) GetPersonPopular

func (tmdb *TMDb) GetPersonPopular(options map[string]string) (*PersonPopular, error)

GetPersonPopular gets the list of popular people on The Movie Database http://docs.themoviedb.apiary.io/#reference/people/personpopular/get

func (*TMDb) GetPersonTaggedImages

func (tmdb *TMDb) GetPersonTaggedImages(id int, options map[string]string) (*PersonTaggedImages, error)

GetPersonTaggedImages gets the images that have been tagged with a specific person id http://docs.themoviedb.apiary.io/#reference/people/personidtaggedimages/get

func (*TMDb) GetPersonTvCredits

func (tmdb *TMDb) GetPersonTvCredits(id int, options map[string]string) (*PersonTvCredits, error)

GetPersonTvCredits gets the TV credits for a specific person id http://docs.themoviedb.apiary.io/#reference/people/personidtvcredits/get

func (*TMDb) GetReviewInfo

func (tmdb *TMDb) GetReviewInfo(id string) (*Review, error)

GetReviewInfo gets the full details of a review by ID http://docs.themoviedb.apiary.io/#reference/reviews/reviewid/get

func (*TMDb) GetTimezonesList

func (tmdb *TMDb) GetTimezonesList() (*Timezones, error)

GetTimezonesList gets the list of supported timezones http://docs.themoviedb.apiary.io/#reference/timezones/timezoneslist/get

func (*TMDb) GetTvAccountStates

func (tmdb *TMDb) GetTvAccountStates(id int, sessionID string) (*TvAccountState, error)

GetTvAccountStates gets the status of whether or not the TV show has been rated or added to their favourite or watch lists http://docs.themoviedb.apiary.io/#reference/tv/tvidaccountstates/get

func (*TMDb) GetTvAiringToday

func (tmdb *TMDb) GetTvAiringToday(options map[string]string) (*TvPagedResults, error)

GetTvAiringToday gets the list of TV shows that air today http://docs.themoviedb.apiary.io/#reference/tv/tvairingtoday/get

func (*TMDb) GetTvAlternativeTitles

func (tmdb *TMDb) GetTvAlternativeTitles(id int) (*TvAlternativeTitles, error)

GetTvAlternativeTitles gets the alternative titles for a specific show id http://docs.themoviedb.apiary.io/#reference/tv/tvidalternativetitles/get

func (*TMDb) GetTvChanges

func (tmdb *TMDb) GetTvChanges(id int, options map[string]string) (*TvChanges, error)

GetTvChanges gets the changes for a specific show id http://docs.themoviedb.apiary.io/#reference/tv/tvidchanges/get

func (*TMDb) GetTvCredits

func (tmdb *TMDb) GetTvCredits(id int, options map[string]string) (*TvCredits, error)

GetTvCredits gets the credits for a specific TV show id http://docs.themoviedb.apiary.io/#reference/tv/tvidcredits/get

func (*TMDb) GetTvEpisodeChanges

func (tmdb *TMDb) GetTvEpisodeChanges(id int, options map[string]string) (*TvChanges, error)

GetTvEpisodeChanges gets a TV episode's changes by episode ID http://docs.themoviedb.apiary.io/#reference/tv-episodes/tvepisodeidchanges/get

func (*TMDb) GetTvEpisodeCredits

func (tmdb *TMDb) GetTvEpisodeCredits(showID, seasonNum, episodeNum int) (*TvCredits, error)

GetTvEpisodeCredits gets the TV episode credits by combination of season and episode number http://docs.themoviedb.apiary.io/#reference/tv-episodes/tvidseasonseasonnumberepisodeepisodenumbercredits/get

func (*TMDb) GetTvEpisodeExternalIds

func (tmdb *TMDb) GetTvEpisodeExternalIds(showID, seasonNum, episodeNum int, options map[string]string) (*TvExternalIds, error)

GetTvEpisodeExternalIds gets the external ids for a TV episode by comabination of a season and episode number http://docs.themoviedb.apiary.io/#reference/tv-episodes/tvidseasonseasonnumberepisodeepisodenumberexternalids/get

func (*TMDb) GetTvEpisodeImages

func (tmdb *TMDb) GetTvEpisodeImages(showID, seasonNum, episodeNum int) (*TvEpisodeImages, error)

GetTvEpisodeImages gets the images (episode stills) for a TV episode by combination of a season and episode number http://docs.themoviedb.apiary.io/#reference/tv-episodes/tvidseasonseasonnumberepisodeepisodenumberimages/get

func (*TMDb) GetTvEpisodeInfo

func (tmdb *TMDb) GetTvEpisodeInfo(showID, seasonNum, episodeNum int, options map[string]string) (*TvEpisode, error)

GetTvEpisodeInfo gets the primary information about a TV episode by combination of a season and episode number http://docs.themoviedb.apiary.io/#reference/tv-episodes/tvidseasonseasonnumberepisodeepisodenumber/get

func (*TMDb) GetTvEpisodeVideos

func (tmdb *TMDb) GetTvEpisodeVideos(showID, seasonNum, episodeNum int, options map[string]string) (*TvVideos, error)

GetTvEpisodeVideos gets the videos that have been added to a TV episode http://docs.themoviedb.apiary.io/#reference/tv-episodes/tvidseasonseasonnumberepisodeepisodenumbervideos/get

func (*TMDb) GetTvGenres

func (tmdb *TMDb) GetTvGenres(options map[string]string) (*Genre, error)

GetTvGenres gets the list of TV genres http://docs.themoviedb.apiary.io/#reference/genres/genretvlist/get

func (*TMDb) GetTvImages

func (tmdb *TMDb) GetTvImages(id int, options map[string]string) (*TvImages, error)

GetTvImages gets the images for a TV series http://docs.themoviedb.apiary.io/#reference/tv/tvidimages/get

func (*TMDb) GetTvInfo

func (tmdb *TMDb) GetTvInfo(id int, options map[string]string) (*TV, error)

GetTvInfo gets the primary information about a TV series by id http://docs.themoviedb.apiary.io/#reference/tv/tvid/get

func (*TMDb) GetTvKeywords

func (tmdb *TMDb) GetTvKeywords(id int, options map[string]string) (*TvKeywords, error)

GetTvKeywords gets the keywords for a specific TV show id http://docs.themoviedb.apiary.io/#reference/tv/tvidkeywords/get

func (*TMDb) GetTvLatest

func (tmdb *TMDb) GetTvLatest() (*TV, error)

GetTvLatest gets the latest TV show http://docs.themoviedb.apiary.io/#reference/tv/tvlatest/get

func (*TMDb) GetTvOnTheAir

func (tmdb *TMDb) GetTvOnTheAir(options map[string]string) (*TvPagedResults, error)

GetTvOnTheAir gets the list of TV shows that are currently on the air http://docs.themoviedb.apiary.io/#reference/tv/tvontheair/get

func (*TMDb) GetTvPopular

func (tmdb *TMDb) GetTvPopular(options map[string]string) (*TvPagedResults, error)

GetTvPopular gets the list of popular TV shows http://docs.themoviedb.apiary.io/#reference/tv/tvpopular/get

func (*TMDb) GetTvSeasonChanges

func (tmdb *TMDb) GetTvSeasonChanges(id int, options map[string]string) (*TvChanges, error)

GetTvSeasonChanges gets a TV season's changes by season ID http://docs.themoviedb.apiary.io/#reference/tv-seasons/tvseasonidchanges/get

func (*TMDb) GetTvSeasonCredits

func (tmdb *TMDb) GetTvSeasonCredits(showID, seasonNum int) (*TvCredits, error)

GetTvSeasonCredits gets the cast & crew credits for a TV season by season number http://docs.themoviedb.apiary.io/#reference/tv-seasons/tvidseasonseasonnumbercredits/get

func (*TMDb) GetTvSeasonExternalIds

func (tmdb *TMDb) GetTvSeasonExternalIds(showID, seasonNum int, options map[string]string) (*TvExternalIds, error)

GetTvSeasonExternalIds gets the external ids for a TV season by season number http://docs.themoviedb.apiary.io/#reference/tv-seasons/tvidseasonseasonnumberexternalids/get

func (*TMDb) GetTvSeasonImages

func (tmdb *TMDb) GetTvSeasonImages(showID, seasonNum int, options map[string]string) (*TvSeasonImages, error)

GetTvSeasonImages gets the images (posters) that we have stored for a TV season by season number http://docs.themoviedb.apiary.io/#reference/tv-seasons/tvidseasonseasonnumberimages/get

func (*TMDb) GetTvSeasonInfo

func (tmdb *TMDb) GetTvSeasonInfo(showID, seasonID int, options map[string]string) (*TvSeason, error)

GetTvSeasonInfo the primary information about a TV season by its season number http://docs.themoviedb.apiary.io/#reference/tv-seasons/tvidseasonseasonnumber/get

func (*TMDb) GetTvSeasonVideos

func (tmdb *TMDb) GetTvSeasonVideos(showID, seasonNum int, options map[string]string) (*TvVideos, error)

GetTvSeasonVideos gets the videos that have been added to a TV season http://docs.themoviedb.apiary.io/#reference/tv-seasons/tvidseasonseasonnumbervideos/get

func (*TMDb) GetTvSimilar

func (tmdb *TMDb) GetTvSimilar(id int, options map[string]string) (*TvPagedResults, error)

GetTvSimilar gets the similar TV shows for a specific tv show id http://docs.themoviedb.apiary.io/#reference/tv/tvidsimilar/get

func (*TMDb) GetTvTopRated

func (tmdb *TMDb) GetTvTopRated(options map[string]string) (*TvPagedResults, error)

GetTvTopRated gets the list of top rated TV shows http://docs.themoviedb.apiary.io/#reference/tv/tvtoprated/get

func (*TMDb) GetTvTranslations

func (tmdb *TMDb) GetTvTranslations(id int) (*TvTranslations, error)

GetTvTranslations gets the list of translations that exist for a TV series http://docs.themoviedb.apiary.io/#reference/tv/tvidtranslations/get

func (*TMDb) GetTvVideos

func (tmdb *TMDb) GetTvVideos(id int, options map[string]string) (*TvVideos, error)

GetTvVideos gets the videos that have been added to a TV series http://docs.themoviedb.apiary.io/#reference/tv/tvidvideos/get

func (*TMDb) SearchCollection

func (tmdb *TMDb) SearchCollection(name string, options map[string]string) (*CollectionSearchResults, error)

SearchCollection searches for collections by name http://docs.themoviedb.apiary.io/#reference/search/searchcollection/get

func (*TMDb) SearchCompany

func (tmdb *TMDb) SearchCompany(name string, options map[string]string) (*CompanySearchResults, error)

SearchCompany searches for companies by name http://docs.themoviedb.apiary.io/#reference/search/searchcompany/get

func (*TMDb) SearchKeyword

func (tmdb *TMDb) SearchKeyword(name string, options map[string]string) (*KeywordSearchResults, error)

SearchKeyword searches for keywords by name http://docs.themoviedb.apiary.io/#reference/search/searchkeyword/get

func (*TMDb) SearchList

func (tmdb *TMDb) SearchList(name string, options map[string]string) (*ListSearchResults, error)

SearchList searches for lists by name and description http://docs.themoviedb.apiary.io/#reference/search/searchlist/get

func (*TMDb) SearchMovie

func (tmdb *TMDb) SearchMovie(name string, options map[string]string) (*MovieSearchResults, error)

SearchMovie searches for movies by title http://docs.themoviedb.apiary.io/#reference/search/searchmovie/get

func (*TMDb) SearchMulti

func (tmdb *TMDb) SearchMulti(name string, options map[string]string) (*MultiSearchResults, error)

SearchMulti searches the movie, tv show and person collections with a single query http://docs.themoviedb.apiary.io/#reference/search/searchmulti/get

func (*TMDb) SearchPerson

func (tmdb *TMDb) SearchPerson(name string, options map[string]string) (*PersonSearchResults, error)

SearchPerson searches for people by name http://docs.themoviedb.apiary.io/#reference/search/searchperson/get

func (*TMDb) SearchTv

func (tmdb *TMDb) SearchTv(name string, options map[string]string) (*TvSearchResults, error)

SearchTv searches for TV shows by title http://docs.themoviedb.apiary.io/#reference/search/searchtv/get

type TV

type TV struct {
	BackdropPath string `json:"backdrop_path"`
	CreatedBy    []struct {
		ID          int
		Name        string
		ProfilePath string `json:"profile_path"`
	}
	EpisodeRunTime []int  `json:"episode_run_time"`
	FirstAirDate   string `json:"first_air_date"`
	Genres         []struct {
		ID   int
		Name string
	}
	Homepage     string
	ID           int
	InProduction bool `json:"in_production"`
	Languages    []string
	LastAirDate  string `json:"last_air_date"`
	Name         string
	Networks     []struct {
		ID   int
		Name string
	}
	NumberOfEpisodes    int      `json:"number_of_episodes"`
	NumberOfSeasons     int      `json:"number_of_seasons"`
	OriginCountry       []string `json:"origin_country"`
	OriginalLanguage    string   `json:"original_language"`
	OriginalName        string   `json:"original_name"`
	Overview            string
	Popularity          float32
	PosterPath          string `json:"poster_path"`
	ProductionCompanies []struct {
		ID   int
		Name string
	} `json:"production_companies"`
	Seasons []struct {
		AirDate      string `json:"air_date"`
		EpisodeCount int    `json:"episode_count"`
		ID           int
		PosterPath   string `json:"poster_path"`
		SeasonNumber int    `json:"season_number"`
	}
	Status            string
	Type              string
	VoteAverage       float32              `json:"vote_average"`
	VoteCount         uint32               `json:"vote_count"`
	AlternativeTitles *TvAlternativeTitles `json:"alternative_titles,omitempty"`
	Changes           *TvChanges           `json:",omitempty"`
	Credits           *TvCredits           `json:",omitempty"`
	Images            *TvImages            `json:",omitempty"`
	Keywords          *TvKeywords          `json:",omitempty"`
	Similar           *TvPagedResults      `json:",omitempty"`
	Translations      *TvTranslations      `json:",omitempty"`
	Videos            *TvVideos            `json:",omitempty"`
}

TV struct

type Timezones

type Timezones []map[string][]string

Timezones map

type TvAccountState

type TvAccountState struct {
	ID        int
	Favorite  bool
	Watchlist bool
	Rated     struct {
		Value float32
	}
}

TvAccountState struct

type TvAlternativeTitles

type TvAlternativeTitles struct {
	ID      int
	Results []struct {
		Iso3166_1 string `json:"iso_3166_1"`
		Title     string
	}
}

TvAlternativeTitles struct

type TvChanges

type TvChanges struct {
	Changes []struct {
		Key   string
		Items []struct {
			ID     string
			Action string
			Time   string
		}
	}
}

TvChanges struct

type TvCredits

type TvCredits struct {
	ID   int
	Cast []struct {
		Character   string
		CreditID    string `json:"credit_id"`
		ID          int
		Name        string
		Order       int
		ProfilePath string `json:"profile_path"`
	}
	AlternativeTitles *TvAlternativeTitles `json:"alternative_titles,omitempty"`
	Changes           *TvChanges           `json:",omitempty"`
	Images            *TvImages            `json:",omitempty"`
	Keywords          *TvKeywords          `json:",omitempty"`
	Similar           *TvPagedResults      `json:",omitempty"`
	Translations      *TvTranslations      `json:",omitempty"`
	Videos            *TvVideos            `json:",omitempty"`
}

TvCredits struct

type TvEpisode

type TvEpisode struct {
	AirDate string `json:"air_date"`
	Crew    []struct {
		ID          int
		CreditID    string `json:"credit_id"`
		Name        string
		Department  string
		Job         string
		ProfilePath string `json:"profile_path"`
	}
	EpisodeNumber int `json:"episode_number"`
	GuestStars    []struct {
		ID          int
		CreditID    string `json:"credit_id"`
		Name        string
		Character   string
		Order       int
		ProfilePath string `json:"profile_path"`
	} `json:"guest_stars"`
	Name           string
	Overview       string
	ID             int
	ProductionCode string  `json:"production_code"`
	SeasonNumber   int     `json:"season_number"`
	StillPath      string  `json:"still_path"`
	VoteAverage    float32 `json:"vote_average"`
	VoteCount      uint32  `json:"vote_count"`
}

TvEpisode struct

type TvEpisodeImages

type TvEpisodeImages struct {
	ID     int
	Stills []TvImage
}

TvEpisodeImages struct

type TvExternalIds

type TvExternalIds struct {
	ID          int
	ImdbID      string `json:"imdb_id"`
	FreebaseID  string `json:"freebase_id"`
	FreebaseMid string `json:"freebase_mid"`
	TvdbID      int    `json:"tvdb_id"`
	TvrageID    int    `json:"tvrage_id"`
}

TvExternalIds struct

type TvImage

type TvImage struct {
	FilePath    string `json:"file_path"`
	Width       int
	Height      int
	Iso639_1    string  `json:"iso_639_1"`
	AspectRatio float32 `json:"aspect_ratio"`
	VoteAverage float32 `json:"vote_average"`
	VoteCount   uint32  `json:"vote_count"`
}

TvImage struct

type TvImages

type TvImages struct {
	ID        int
	Backdrops []TvImage
	Posters   []TvImage
}

TvImages struct

type TvKeywords

type TvKeywords struct {
	ID      int
	Results []struct {
		ID   int
		Name string
	}
	AlternativeTitles *TvAlternativeTitles `json:"alternative_titles,omitempty"`
	Changes           *TvChanges           `json:",omitempty"`
	Credits           *TvCredits           `json:",omitempty"`
	Images            *TvImages            `json:",omitempty"`
	Similar           *TvPagedResults      `json:",omitempty"`
	Translations      *TvTranslations      `json:",omitempty"`
	Videos            *TvVideos            `json:",omitempty"`
}

TvKeywords struct

type TvPagedResults

type TvPagedResults struct {
	ID                int `json:",omitempty"`
	Page              int
	Results           []TvShort
	TotalPages        int                  `json:"total_pages"`
	TotalResults      int                  `json:"total_results"`
	AlternativeTitles *TvAlternativeTitles `json:"alternative_titles,omitempty"`
	Changes           *TvChanges           `json:",omitempty"`
	Credits           *TvCredits           `json:",omitempty"`
	Images            *TvImages            `json:",omitempty"`
	Keywords          *TvKeywords          `json:",omitempty"`
	Similar           *TvPagedResults      `json:",omitempty"`
	Translations      *TvTranslations      `json:",omitempty"`
	Videos            *TvVideos            `json:",omitempty"`
}

TvPagedResults struct

type TvSearchResults

type TvSearchResults struct {
	Page    int
	Results []struct {
		BackdropPath  string `json:"backdrop_path"`
		ID            int
		OriginalName  string   `json:"original_name"`
		FirstAirDate  string   `json:"first_air_date"`
		OriginCountry []string `json:"origin_country"`
		PosterPath    string   `json:"poster_path"`
		Popularity    float32
		Name          string
		VoteAverage   float32 `json:"vote_average"`
		VoteCount     uint32  `json:"vote_count"`
	}
	TotalPages   int `json:"total_pages"`
	TotalResults int `json:"total_results"`
}

TvSearchResults struct

type TvSeason

type TvSeason struct {
	ID           int
	AirDate      string `json:"air_date"`
	Name         string
	Overview     string
	PosterPath   string `json:"poster_path"`
	SeasonNumber int    `json:"season_number"`
	Episodes     []TvEpisode
}

TvSeason struct

type TvSeasonImages

type TvSeasonImages struct {
	ID      int
	Posters []TvImage
}

TvSeasonImages struct

type TvShort

type TvShort struct {
	Adult         bool
	BackdropPath  string `json:"backdrop_path"`
	ID            int
	OriginalName  string   `json:"original_name"`
	OriginCountry []string `json:"origin_country"`
	Popularity    float32
	PosterPath    string `json:"poster_path"`
	FirstAirDate  string `json:"first_air_date"`
	Name          string
	Video         bool
	VoteAverage   float32 `json:"vote_average"`
	VoteCount     uint32  `json:"vote_count"`
}

TvShort struct

type TvTranslations

type TvTranslations struct {
	ID           int
	Translations []struct {
		Iso639_1    string `json:"iso_639_1"`
		Name        string
		EnglishName string `json:"english_name"`
	}
}

TvTranslations struct

type TvVideos

type TvVideos struct {
	ID      int
	Results []struct {
		ID       int
		Iso639_1 string `json:"iso_639_1"`
		Key      string
		Name     string
		Site     string
		Size     int
		Type     string
	}
}

TvVideos struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL