tvdb

package module
v0.0.0-...-6fcb5ef Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: MPL-2.0 Imports: 15 Imported by: 1

README

go-tvdb

client library for the TVDB API

supported versions

go-tvdb TVDB API
v1.0.0 v3.0.0

usage

most of the code here was generated by go-swagger from the official tvdb swagger spec. these bindings are usable directly by importing the generated package. the generated client is unintuitive to use (mostly due to the tvdb api being inconsistent and not fully REST-ful), so a light wrapper client is provided in the root package that normalizes common api interactions.

todo

complete the wrapper so that calling the generated client is never necessary.

license

go-tvdb is licensed MPL-2 which means you can use it as you please with no restrictions EXCEPT: if you distribute it or derivative works, you must provide the source (a link is sufficient) OF THIS LIBRARY including any modifications that you make to THIS LIBRARY.

read more here

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Str

func Str(s string) *string

Types

type Client

type Client struct {
	Authn *models.Auth
	// contains filtered or unexported fields
}

func DefaultClient

func DefaultClient(auth *models.Auth) *Client

func (*Client) GetEpisodeByID

func (c *Client) GetEpisodeByID(ctx context.Context, id int64) (*models.Episode, *models.JSONErrors, error)

func (*Client) GetLanguageByID

func (c *Client) GetLanguageByID(ctx context.Context, id string) (*models.Language, error)

func (*Client) GetLanguages

func (c *Client) GetLanguages(ctx context.Context) ([]*models.Language, error)

func (*Client) GetMovieByID

func (c *Client) GetMovieByID(ctx context.Context, id int64) (*models.Movie, error)

func (*Client) GetMovieUpdates

func (c *Client) GetMovieUpdates(ctx context.Context, since time.Time) ([]int64, error)

func (*Client) GetSearchParams

func (c *Client) GetSearchParams(ctx context.Context) ([]string, error)

func (*Client) GetSeriesByID

func (c *Client) GetSeriesByID(ctx context.Context, id int64) (*models.Series, *models.JSONErrors, error)

func (*Client) GetSeriesEpisode

func (c *Client) GetSeriesEpisode(ctx context.Context, id, page int64, queryParams map[string]string) ([]*models.Episode, *models.Links, *models.JSONErrors, error)

func (*Client) GetSeriesEpisodes

func (c *Client) GetSeriesEpisodes(ctx context.Context, id, page int64) ([]*models.Episode, *models.Links, *models.JSONErrors, error)

func (*Client) GetUpdates

func (c *Client) GetUpdates(ctx context.Context, after, before time.Time) ([]*models.Update, *models.JSONErrors, error)

func (*Client) SearchSeries

func (c *Client) SearchSeries(ctx context.Context, searchParams map[string]string) ([]*models.SeriesSearchResult, error)

func (*Client) SetLang

func (c *Client) SetLang(lang string) *Client

type Episodes

type Episodes interface {
	GetEpisodeByID(context.Context, int64) (*models.Episode, *models.JSONErrors, error)
}

type Languages

type Languages interface {
	GetLanguages(context.Context) ([]*models.Language, error)
	GetLanguageByID(context.Context, string) (*models.Language, error)
}

type Movies

type Movies interface {
	GetMovieByID(context.Context, int64) (*models.Movie, error)
	GetMovieUpdates(context.Context, time.Time) ([]int64, error)
}
type Search interface {
	SearchSeries(context.Context, map[string]string) ([]*models.SeriesSearchResult, error)
	GetSearchParams(context.Context) ([]string, error)
}

type Series

type Series interface {
	GetSeriesByID(context.Context, int64) (*models.Series, *models.JSONErrors, error)
	GetSeriesEpisodes(context.Context, int64, int64) ([]*models.Episode, *models.Links, *models.JSONErrors, error)
}

type Update

type Update interface {
	GetUpdates(context.Context, time.Time, time.Time) ([]*models.Update, *models.JSONErrors, error)
}

Jump to

Keyboard shortcuts

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