autoplaylist

package module
v0.0.0-...-947c6e2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: MIT Imports: 3 Imported by: 0

README

AutoPlaylist (for Spotify)

This is a Go package that will create a Spotify playlist based on saved artists, saved tracks, tracks from playlists, and top tracks and artists. It also has an option to create a new playlist based off of only one existing playlist.

 

Notes:

  1. It uses github.com/zmb3/spotify
  2. It requires that you have an authenticated spotify client with the correct permissions to pass into the function.
  3. The range for the number of the new playlist's tracks is 5 to 500.

 

Example for whole music library

	p, err := autoplaylist.NewAutoPlaylist(client, "name", "description", 100, "")
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println("success:", p.ID)
	}

Example for one playlist

	p, err := autoplaylist.NewAutoPlaylist(client, "name", "description", 100, "3hPeTyReRDrbVqtUHvwfSp")
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println("success:", p.ID)
	}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAutoPlaylist

func NewAutoPlaylist(client *spotify.Client, name string, description string, numTracks int, playlistID spotify.ID) (*spotify.FullPlaylist, error)

Types

type AutoPlaylist

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

Jump to

Keyboard shortcuts

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