client

package
v0.0.0-...-1122212 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReusableReader

func ReusableReader(r io.Reader) io.Reader

Types

type ApiError

type ApiError struct {
	StatusCode int
	// contains filtered or unexported fields
}

func (*ApiError) Error

func (e *ApiError) Error() string

type IMDbClient

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

func (*IMDbClient) Hydrate

func (c *IMDbClient) Hydrate() error

func (*IMDbClient) ListGet

func (c *IMDbClient) ListGet(listID string) (*entities.IMDbList, error)

func (*IMDbClient) ListsGet

func (c *IMDbClient) ListsGet(listIDs []string) ([]entities.IMDbList, error)

func (*IMDbClient) ListsGetAll

func (c *IMDbClient) ListsGetAll() ([]entities.IMDbList, error)

func (*IMDbClient) RatingsGet

func (c *IMDbClient) RatingsGet() ([]entities.IMDbItem, error)

func (*IMDbClient) UserIDScrape

func (c *IMDbClient) UserIDScrape() error

func (*IMDbClient) WatchlistGet

func (c *IMDbClient) WatchlistGet() (*entities.IMDbList, error)

func (*IMDbClient) WatchlistIDScrape

func (c *IMDbClient) WatchlistIDScrape() error

type IMDbClientInterface

type IMDbClientInterface interface {
	ListGet(listID string) (*entities.IMDbList, error)
	ListsGet(listIDs []string) ([]entities.IMDbList, error)
	WatchlistGet() (*entities.IMDbList, error)
	ListsGetAll() ([]entities.IMDbList, error)
	RatingsGet() ([]entities.IMDbItem, error)
	UserIDScrape() error
	WatchlistIDScrape() error
	Hydrate() error
}

func NewIMDbClient

func NewIMDbClient(conf appconfig.IMDb, logger *slog.Logger) (IMDbClientInterface, error)

type TraktClient

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

func (*TraktClient) Activate

func (tc *TraktClient) Activate(userCode, authenticityToken string) (*string, error)

func (*TraktClient) ActivateAuthorize

func (tc *TraktClient) ActivateAuthorize(authenticityToken string) error

func (*TraktClient) BrowseActivate

func (tc *TraktClient) BrowseActivate() (*string, error)

func (*TraktClient) BrowseSignIn

func (tc *TraktClient) BrowseSignIn() (*string, error)

func (*TraktClient) GetAccessToken

func (tc *TraktClient) GetAccessToken(deviceCode string) (*entities.TraktAuthTokensResponse, error)

func (*TraktClient) GetAuthCodes

func (tc *TraktClient) GetAuthCodes() (*entities.TraktAuthCodesResponse, error)

func (*TraktClient) HistoryAdd

func (tc *TraktClient) HistoryAdd(items entities.TraktItems) error

func (*TraktClient) HistoryGet

func (tc *TraktClient) HistoryGet(itemType, itemID string) (entities.TraktItems, error)

func (*TraktClient) HistoryRemove

func (tc *TraktClient) HistoryRemove(items entities.TraktItems) error

func (*TraktClient) Hydrate

func (tc *TraktClient) Hydrate() error

func (*TraktClient) ListAdd

func (tc *TraktClient) ListAdd(listID, listName string) error

func (*TraktClient) ListGet

func (tc *TraktClient) ListGet(listID string) (*entities.TraktList, error)

func (*TraktClient) ListItemsAdd

func (tc *TraktClient) ListItemsAdd(listID string, items entities.TraktItems) error

func (*TraktClient) ListItemsRemove

func (tc *TraktClient) ListItemsRemove(listID string, items entities.TraktItems) error

func (*TraktClient) ListRemove

func (tc *TraktClient) ListRemove(listID string) error

func (*TraktClient) ListsGet

func (tc *TraktClient) ListsGet(idsMeta []entities.TraktIDMeta) ([]entities.TraktList, error)

func (*TraktClient) RatingsAdd

func (tc *TraktClient) RatingsAdd(items entities.TraktItems) error

func (*TraktClient) RatingsGet

func (tc *TraktClient) RatingsGet() (entities.TraktItems, error)

func (*TraktClient) RatingsRemove

func (tc *TraktClient) RatingsRemove(items entities.TraktItems) error

func (*TraktClient) SignIn

func (tc *TraktClient) SignIn(authenticityToken string) error

func (*TraktClient) WatchlistGet

func (tc *TraktClient) WatchlistGet() (*entities.TraktList, error)

func (*TraktClient) WatchlistItemsAdd

func (tc *TraktClient) WatchlistItemsAdd(items entities.TraktItems) error

func (*TraktClient) WatchlistItemsRemove

func (tc *TraktClient) WatchlistItemsRemove(items entities.TraktItems) error

type TraktClientInterface

type TraktClientInterface interface {
	BrowseSignIn() (*string, error)
	SignIn(authenticityToken string) error
	BrowseActivate() (*string, error)
	Activate(userCode, authenticityToken string) (*string, error)
	ActivateAuthorize(authenticityToken string) error
	GetAccessToken(deviceCode string) (*entities.TraktAuthTokensResponse, error)
	GetAuthCodes() (*entities.TraktAuthCodesResponse, error)
	WatchlistGet() (*entities.TraktList, error)
	WatchlistItemsAdd(items entities.TraktItems) error
	WatchlistItemsRemove(items entities.TraktItems) error
	ListGet(listID string) (*entities.TraktList, error)
	ListsGet(idMeta []entities.TraktIDMeta) ([]entities.TraktList, error)
	ListItemsAdd(listID string, items entities.TraktItems) error
	ListItemsRemove(listID string, items entities.TraktItems) error
	ListAdd(listID, listName string) error
	ListRemove(listID string) error
	RatingsGet() (entities.TraktItems, error)
	RatingsAdd(items entities.TraktItems) error
	RatingsRemove(items entities.TraktItems) error
	HistoryGet(itemType, itemID string) (entities.TraktItems, error)
	HistoryAdd(items entities.TraktItems) error
	HistoryRemove(items entities.TraktItems) error
	Hydrate() error
}

func NewTraktClient

func NewTraktClient(conf appconfig.Trakt, logger *slog.Logger) (TraktClientInterface, error)

Jump to

Keyboard shortcuts

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