api

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BearerNone = iota
	BearerCode
	BearerAccess
	BearerRefresh
	BearerMedia
)

Variables

This section is empty.

Functions

func Home

func Home(context ApiContext) (*view.Home, error)

func Locate

func Locate(context ApiContext, uri string) (*url.URL, error)

func Playlist

func Playlist(context ApiContext) (*spiff.Playlist, error)

func Position

func Position(context ApiContext, index int, position float64) error

func Progress

func Progress(context ApiContext) (*view.Progress, error)

func Radio

func Radio(context ApiContext) (*view.Radio, error)

func Replace

func Replace(context ApiContext, ref, spiffType, creator, title string) (*spiff.Playlist, error)

func SearchReplace

func SearchReplace(context ApiContext, query string, shuffle bool) (*spiff.Playlist, error)

Types

type AccessCode

type AccessCode struct {
	AccessToken string
	Code        string
}

func Code

func Code(context ApiContext) (*AccessCode, error)

type ApiContext

type ApiContext interface {
	Endpoint() string
	UserAgent() string
	Code() string
	CodeToken() string
	AccessToken() string
	RefreshToken() string
	MediaToken() string
	UpdateAccessToken(string)
}

type L

type L []string

type M

type M map[string]interface{}

type Tokens

type Tokens struct {
	AccessToken  string
	RefreshToken string
	MediaToken   string `json:",omitempty"`
}

func CheckCode

func CheckCode(context ApiContext) (*Tokens, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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