trakt

package
v0.0.0-...-1607349 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthRequest

func AuthRequest(root, username, code, refreshToken, grantType string) (map[string]interface{}, bool)

AuthRequest authorize the connection with Trakt

func Handle

func Handle(pr plexhooks.PlexResponse, user store.User)

Handle determine if an item is a show or a movie

func HandleMovie

func HandleMovie(pr plexhooks.PlexResponse, accessToken string)

HandleMovie start the scrobbling for a movie

func HandleShow

func HandleShow(pr plexhooks.PlexResponse, accessToken string)

HandleShow start the scrobbling for a show

Types

type Episode

type Episode struct {
	Season int    `json:"season"`
	Number int    `json:"number"`
	Title  string `json:"title"`
	Ids    Ids    `json:"ids"`
}

Episode represent an episode

type Ids

type Ids struct {
	Trakt  int    `json:"trakt"`
	Tvdb   int    `json:"tvdb"`
	Imdb   string `json:"imdb"`
	Tmdb   int    `json:"tmdb"`
	Tvrage int    `json:"tvrage"`
}

Ids represent the IDs representing a media item accross the metadata providers

type Movie

type Movie struct {
	Title string `json:"title"`
	Year  int    `json:"year"`
	Ids   Ids    `json:"ids"`
}

Movie represent a movie

type MovieScrobbleBody

type MovieScrobbleBody struct {
	Movie    Movie `json:"movie"`
	Progress int   `json:"progress"`
}

MovieScrobbleBody represent the scrobbling status for a movie

type MovieSearchResult

type MovieSearchResult struct {
	Movie Movie
}

MovieSearchResult represent a search result for a movie

type Season

type Season struct {
	Number   int
	Episodes []Episode
}

Season represent a season

type Show

type Show struct {
	Title string `json:"title"`
	Year  int    `json:"year"`
	Ids   Ids
}

Show represent a show's IDs

type ShowInfo

type ShowInfo struct {
	Show    Show
	Episode Episode
}

ShowInfo represent a show

type ShowScrobbleBody

type ShowScrobbleBody struct {
	Episode  Episode `json:"episode"`
	Progress int     `json:"progress"`
}

ShowScrobbleBody represent the scrobbling status for a show

Jump to

Keyboard shortcuts

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