tmdb

package
v0.0.0-...-50dfd56 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Film

type Film struct {
	ID           int               `bson:"id" json:"id" example:"299534"`
	Name         string            `bson:"name" json:"name" example:"Мстители: Финал"`
	OriginalName string            `bson:"original_name" json:"original_name" example:"Avengers: Endgame"`
	Poster       string            `bson:"poster_path" json:"poster_path" example:"http://image.tmdb.org/t/p/w500/4fjlSFUoW6L9FSAE5knxjjUDd6v.jpg"`
	ReleaseDate  string            `bson:"release_date" json:"release_date" example:"2019-04-24"`
	Genres       []*Genre          `bson:"genres" json:"genres"`
	Overview     string            `` /* 540-byte string literal not displayed */
	AddedDate    string            `bson:"added_date" json:"added_date" example:"2019-06-02 19:01:10"`
	YoutubeID    string            `bson:"youtube_id" json:"youtube_id" example:"https://www.youtube.com/watch?v=gbcVZgO4n4E"`
	MagnetLinks  map[string]string `` /* 213-byte string literal not displayed */
}

Film is response struct.

type Genre

type Genre struct {
	ID          int    `bson:"id" json:"id" example:"28"`
	EnglishName string `bson:"english_name" json:"english_name" example:"action"`
	RussianName string `bson:"russian_name" json:"russian_name" example:"боевик"`
}

Genre struct is overview of all genres from tmdb.

type MovieDB

type MovieDB struct {
	Genres []*Genre
	// contains filtered or unexported fields
}

MovieDB struct. For manipulating with tmdb package.

func GetMovieDB

func GetMovieDB() *MovieDB

GetMovieDB return *MovieDB pointer to struct.

func (*MovieDB) CreateMovieFromName

func (mdb *MovieDB) CreateMovieFromName(name string) (*Film, error)

CreateMovieFromName get film name and find in tmdb. Returns *Film struct with filled fields.

Jump to

Keyboard shortcuts

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