Skip to content

syordanov94/spotify_lab_golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify_lab_golang

A simple lab that uses the Spotify library written in Golang. The example implemented performs the following:

  1. Generates a token required to login to the Spotify API
  2. Searches through all the playlists that contain the word "Christmas" in their name.
  3. Recovers all the songs for each one of the playlists until it has 40 different ones.
  4. Prints out the definitive Spotify christmas playlist we can use for next year's holiday season parties.

## Prerequisites

  • Golang 1.20 or higher installed
  • A spotify account. You can create one here. Additionally you will need to create a Spotify APP and generate the Spotify Account ID and the Spotify Secret. You can see how to create all this here.
  • Recommended but not mandatory VS Code or a similar IDE

How to install and Run the project

First you will need to set the environment variables that correspond to the Spotify configuration. If you use Mac OS, you can set them like this:

export SPOTIFY_ID=XXXXXXXXXXXXX
export SPOTIFY_SECRET=XXXXXXXXXXXX

If you are using Windows, you can set them like this:

setx SPOTIFY_ID "Variable value"
setx SPOTIFY_SECRET "Variable value"

You will need to download all the external libraries using:

go mod tidy

Finally, navigate to the /cmd folder and run the following command:

go run main.go

About

A Spotify application written in Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages