moviedb

package module
v0.0.0-...-4292f0d Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2017 License: MIT Imports: 5 Imported by: 1

README

MIT License CircleCI

Library to get movies & tv airing today.

Methods

Method Description
GetPopularMovies() What are the most popular movies?
GetUpcomingMovies() What are the upcoming movies?
GetTopRatedMovies() What are the top rated movies?
GetNowPlayingMovies() What movies are in theatres?
GetPopularTVShows() What are the most popular tv shows?
GetTopRatedShows() What are the top rated tv shows?
GetOnTVShows() What tv shows are on tv?
GetAiringTodayShows() What are the tv shows airing today?

Install

go get -u github.com/mlabouardy/moviedb

Examples

To get list of upcoming movies:

func main() {
	db := NewMovieDB()
	fmt.Println("Upcoming movies")
	for _, show := range db.GetUpcomingMovies() {
		fmt.Printf("\tTitle: %s\n\tCover: %s\n\n", show.Title, show.Cover)
	}
}

Tutorials

Maintainers

License

This project is licensed under the MIT License - see the LICENSE file for details

Documentation

Index

Constants

View Source
const (
	URL             = "https://www.themoviedb.org/%s/%s"
	IMG_TAG         = "img"
	CLASS_ATTRIBUTE = "class"
	ITEM_CLASS      = "poster lazyload fade"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MovieDB

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

func NewMovieDB

func NewMovieDB() *MovieDB

func (MovieDB) GetAiringTodayShows

func (m MovieDB) GetAiringTodayShows() []Show

func (MovieDB) GetNowPlayingMovies

func (m MovieDB) GetNowPlayingMovies() []Show

func (MovieDB) GetOnTVShows

func (m MovieDB) GetOnTVShows() []Show

func (MovieDB) GetPopularMovies

func (m MovieDB) GetPopularMovies() []Show

func (MovieDB) GetPopularTVShows

func (m MovieDB) GetPopularTVShows() []Show

func (MovieDB) GetTopRatedMovies

func (m MovieDB) GetTopRatedMovies() []Show

func (MovieDB) GetTopRatedShows

func (m MovieDB) GetTopRatedShows() []Show

func (MovieDB) GetUpcomingMovies

func (m MovieDB) GetUpcomingMovies() []Show

type Show

type Show struct {
	Cover string
	Title string
}

Jump to

Keyboard shortcuts

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