globalplayer

package module
v0.0.0-...-96ff8f7 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: GPL-3.0 Imports: 8 Imported by: 1

README

globalplayer

Contains APIs and useful data types to interact with the Global Player API.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBuildIdNotFound = errors.New("could not find build id")
)

Functions

func CheckBuildId

func CheckBuildId(client *http.Client, id string) bool

Checks if the build id is still valid

func GetBuildId

func GetBuildId(client *http.Client) (string, error)

Gets the build id for global player of errors.

func Login

func Login(email, password, apiKey string) (models.LoginResponse, error)

Login logs in through the the global player API returning the authorisation response, or errors.

Types

type GlobalPlayer

type GlobalPlayer interface {
	GetStations() (models.StationsPageResponse, error)
	GetCatchup(slug string) (models.CatchupResponse, error)
	GetCatchupShows(slug, id string) (models.CatchupShowResponse, error)
	GetLive() (models.LiveResponse, error)
}

GlobalPlayer is an interface to some of global players APIs

func NewClient

func NewClient(hc *http.Client, apiKey string) GlobalPlayer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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