imdb

package
v0.0.0-...-6da4afb Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MovieClient

type MovieClient struct {
	Client *http.Client
}

MovieClient represent http client that access imdb site

func GetNewClient

func GetNewClient() *MovieClient

GetNewClient creates new instance of MovieClient

func (*MovieClient) GetHTMLDoc

func (mc *MovieClient) GetHTMLDoc(url string) (*goquery.Document, error)

GetHTMLDoc returns html document

func (*MovieClient) GetMovieDescription

func (mc *MovieClient) GetMovieDescription(document *goquery.Document) (string, error)

GetMovieDescription fetchs movie summary

func (*MovieClient) GetMovieInfo

func (mc *MovieClient) GetMovieInfo(inputName string) (MovieInfo, error)

GetMovieInfo fetches information about a movie

func (*MovieClient) GetMovieName

func (mc *MovieClient) GetMovieName(document *goquery.Document) (string, error)

GetMovieName fetchs movie name

func (*MovieClient) GetMoviePoster

func (mc *MovieClient) GetMoviePoster(document *goquery.Document) (string, error)

GetMoviePoster fetchs movie name

func (*MovieClient) GetMovieRating

func (mc *MovieClient) GetMovieRating(document *goquery.Document) (string, error)

GetMovieRating fetchs movie rating

func (*MovieClient) SearchTitleURL

func (mc *MovieClient) SearchTitleURL(inputName string) (string, error)

SearchTitleURL returns result url after searching

type MovieInfo

type MovieInfo struct {
	Name        string
	Rating      string
	Description string
	PosterLink  string
}

MovieInfo stores information about movie fetched from imdb

Jump to

Keyboard shortcuts

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