spotify

package
v0.0.0-...-b337a49 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRetrievalFailed = errors.New("spotify: retrieval failed")

Functions

This section is empty.

Types

type SpotifyClient

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

func NewSpotifyClient

func NewSpotifyClient(ClientID, ClientSecret string) (*SpotifyClient, error)

func (*SpotifyClient) GetUserPlaylists

func (sc *SpotifyClient) GetUserPlaylists(userID string) ([]spotiyou.BasicPlaylist, error)

GetUserPlaylists returns all playlists of a user.

The data is fetched from the Spotify API. It returns a slice of BasicPlaylist which contains only the most important information about the playlist and its tracks.

The function may take a significant amount of time to complete. Multiple parallel API calls are made to fetch all playlists and their tracks.

Jump to

Keyboard shortcuts

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