trakt

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 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) ([]Item, error)

type Item added in v1.0.2

type Item 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"`
}

Generic Item struct for the Trakt v2 API

type MovieItem

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

type ShowItem added in v1.0.2

type ShowItem struct {
	Watchers  int  `json:"watchers"`
	UserCount int  `json:"user_count"`
	Show      Item `json:"show"`
}

Jump to

Keyboard shortcuts

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