Documentation ¶
Overview ¶
Package client provides an (partial) implementation of Takeout API with support for authentication and tokens.
Index ¶
- Constants
- Variables
- func Activity(context Context, activity model.Events) error
- func Get(context requestContext, uri string, result interface{}) error
- func GetLocation(context requestContext, uri string) (*url.URL, error)
- func Home(context Context) (view.Home, error)
- func Locate(context Context, uri string) (*url.URL, error)
- func Patch(context requestContext, uri string, body interface{}, result interface{}) error
- func Playlist(context Context) (spiff.Playlist, error)
- func Position(context Context, index int, position float64) error
- func Post(context requestContext, uri string, body interface{}, result interface{}) error
- func Progress(context Context) (view.Progress, error)
- func Radio(context Context) (view.Radio, error)
- func Replace(context Context, ref, spiffType, creator, title string) (spiff.Playlist, error)
- func SearchReplace(context Context, query string, shuffle, best bool) (spiff.Playlist, error)
- type AccessCode
- type Context
- type Headers
- type L
- type M
- type Tokens
Constants ¶
View Source
const (
BearerAuthorization = "Bearer"
)
Variables ¶
View Source
var ( HeaderAuthorization = http.CanonicalHeaderKey("Authorization") HeaderContentType = http.CanonicalHeaderKey("Content-Type") HeaderLocation = http.CanonicalHeaderKey("Location") HeaderUserAgent = http.CanonicalHeaderKey("User-Agent") ErrClientError = errors.New("client error") ErrForbidden = errors.New("forbidden") ErrNoRedirection = errors.New("no redirection") ErrServerError = errors.New("server error") )
Functions ¶
Types ¶
type AccessCode ¶
func Code ¶
func Code(context Context) (AccessCode, error)
Click to show internal directories.
Click to hide internal directories.