tmdb

package
v0.0.0-...-9131046 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UrlBase   = "https://api.themoviedb.org/3"
	AuthToken = "?api_key=ba1fbe088324bbdad3b4eb972fa5a6a3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Genre

type Genre struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type ResponseSearch

type ResponseSearch struct {
	Page         int64        `json:"page"`
	Results      []ResultBase `json:"results"`
	TotalPages   int64        `json:"total_pages:`
	TotalResults int64        `json:"total_results:`
}

func SearchMovie

func SearchMovie(client *http.Client, q string) (ResponseSearch, error)

type ResultBase

type ResultBase struct {
	Adult            bool    `json:"adult"`
	BackdropPath     string  `json:"backdrop_path"`
	OriginalLanguage string  `json:"original_language"`
	OriginalTitle    string  `json:"original_title"`
	Overview         string  `json:"overview"`
	PosterPath       string  `json:"poster_path"`
	ReleaseDate      string  `json:"release_date"`
	Title            string  `json:"title"`
	Popularity       float64 `json:"popularity"`
	VoteAverage      float64 `json:"vote_average"`
	VoteCount        int64   `json:"vote_count"`
	Id               int64   `json:"id"`
	GenreIds         []int64 `json:"genre_ids"`
	Video            bool    `json:"video"`
}

type ResultFull

type ResultFull struct {
	ResultBase
	Runtime int64   `json:"runtime"`
	Genres  []Genre `json:"genres"`
}

func RetrieveMovieInfo

func RetrieveMovieInfo(client *http.Client, id string) (ResultFull, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL