trakt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TRAKT_URL        = "https://api.trakt.tv/"
	TRAKT_PAGE_LIMIT = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config *viper.Viper, logger *zerolog.Logger, restyClient *resty.Client) *Client

func (*Client) FetchList

func (c *Client) FetchList(url string, limit int) ([]MovieItem, error)

type Movie

type Movie struct {
	IDs struct {
		Imdb  string `json:"imdb"`
		Slug  string `json:"slug"`
		Tmdb  int    `json:"tmdb"`
		Trakt int    `json:"trakt"`
	} `json:"ids"`
	Title string `json:"title"`
	Year  int    `json:"year"`
}

Movie struct for the Trakt v2 API

type MovieItem

type MovieItem struct {
	Watchers int   `json:"watchers"`
	Movie    Movie `json:"movie"`
}

Jump to

Keyboard shortcuts

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