motify

package
v0.0.0-...-389ba5e Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client handles accessing the Spotify APIs

func (*Client) AddTracksToPlaylist

func (c *Client) AddTracksToPlaylist(playlistID zs.ID, trackIDs ...zs.ID) (snapshotID string, err error)

func (*Client) CreatePlaylistForUser

func (c *Client) CreatePlaylistForUser(userID, playlistName, description string, public bool) (*zs.FullPlaylist, error)

func (*Client) CurrentUser

func (c *Client) CurrentUser() (*zs.PrivateUser, error)

func (*Client) CurrentUsersAlbumsOpt

func (c *Client) CurrentUsersAlbumsOpt(opt *zs.Options) (*zs.SavedAlbumPage, error)

func (*Client) CurrentUsersPlaylistsOpt

func (c *Client) CurrentUsersPlaylistsOpt(opt *zs.Options) (*zs.SimplePlaylistPage, error)

func (*Client) CurrentUsersTracksOpt

func (c *Client) CurrentUsersTracksOpt(opt *zs.Options) (*zs.SavedTrackPage, error)

func (*Client) GetAlbum

func (c *Client) GetAlbum(id zs.ID) (*zs.FullAlbum, error)

func (*Client) GetAlbumTracksOpt

func (c *Client) GetAlbumTracksOpt(id zs.ID, opt *zs.Options) (*spotify.SimpleTrackPage, error)

func (*Client) GetPlaylistOpt

func (c *Client) GetPlaylistOpt(playlistID zs.ID, fields string) (*zs.FullPlaylist, error)

func (*Client) GetPlaylistTracksOpt

func (c *Client) GetPlaylistTracksOpt(playlistID zs.ID, opt *zs.Options, fields string) (*zs.PlaylistTrackPage, error)

func (*Client) UnfollowPlaylist

func (c *Client) UnfollowPlaylist(owner, playlist zs.ID) error

type Spotify

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

Spotify authenticates and builds clients

func New

func New(redirectURL, clientID, clientSecret string) *Spotify

New returns a new Spotify struct which can be used to authenticate and build clients

func (*Spotify) AuthURL

func (s *Spotify) AuthURL(state string) string

AuthURL returns a url at which a user can authenticate

func (*Spotify) NewClient

func (s *Spotify) NewClient(token *oauth2.Token) Client

NewClient returns a Client that can be used to access Spotify APIs

func (*Spotify) Token

func (s *Spotify) Token(state string, r *http.Request) (*oauth2.Token, error)

Token extracts an oauth2 token from a http.Request

Jump to

Keyboard shortcuts

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