spotify

package
v0.0.0-...-9c6cde7 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(c *fiber.Ctx) error

func Handler

func Handler(router fiber.Router)

func Playback

func Playback(c *fiber.Ctx) error

func RefreshTokens

func RefreshTokens(refreshToken string) error

func RequestAccessToken

func RequestAccessToken(authCode string) error

Types

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type PlaybackResponse

type PlaybackResponse struct {
	Timestamp int64 `json:"timestamp"`
	Progress  int   `json:"progress_ms"`
	Playing   bool  `json:"is_playing"`
	Item      any   `json:"item"`
}

type SavedCredentials

type SavedCredentials struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int16  `json:"expires_in"`
	Scope        string `json:"scope"`
}

Jump to

Keyboard shortcuts

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