Do you like streaming and purchasing music ?
Ever wonder how much your entire Spotify library would cost for you to purchase? No? Well you still can !
- Clone the repository
- Create a Spotify API Key: https://developer.spotify.com/documentation/web-api/
- Add your
SPOTIFY_CLIENT_ID
andSPOTIFY_CLIENT_SECRET
to a.env
file andsource .env
(alternatively you can just run the script with these variables set in the environment).
# .env
export SPOTIFY_CLIENT_ID=123
export SPOTIFY_CLIENT_SECRET=456
- Run the script
ruby -W0 main.rb --user your_username
- Print!
Hello spotifyusername!
Your Spotify library is composed of:
115 playlists
3053 tracks
If you wanted to purchase your entire Spotify library, it would cost around: 3022.47 USD.
+----------------------------------------------+--------------------+
| Playlist | Cost |
+----------------------------------------------+--------------------+
| xxxxxxxxxxxxxxxxxxxxxxxxxx | 99.0 |
| xxxxxxxxxxxxxxxxxxxxxxxxx | 99.0 |
| xxxxxxxxxxxxxxxxxxxxxxxxxxx | 72.27 |
| xxxxxxxxxxxxxxxxxxxxxxxxxxx | 10.89 |
| xxxxxxxxxxxxxxxxxxxxxxxxxxx | 14.85 |
| xxxxxxxxxxxxxxxxxxxxxxxxxxx | 79.2 |
| xxxxxxxxxxxxxxxxxxxxxxxxxx | 78.21 |
# etcetera..
This repository is licensed under MIT Open Source