This is a CLI application that uses spotify API to give users the top 3 albums and artists of a song writer in Spotify
Tech Stack
Spotfy Web API
The Spotify Web API is based on REST principles. Data resources are accessed via standard HTTPS requests in UTF-8 format to an API endpoint. Where possible, Web API uses appropriate HTTP verbs for each action:
Method Action
GET :Retrieves resources
POST :Creates resources
PUT :Changes and/or replaces resources or collections
DELETE :Deletes resources
argparse pythone module
The argparse module makes it easy to write user-friendly command-line interfaces. The program defines what arguments it requires, and argparse will figure out how to parse those out of sys.argv. The argparse module also automatically generates help and usage messages and issues errors when users give the program invalid arguments.
Running the code
- Clone the repo, such that you have the script in your device
git clone https://github.com/adiaux/SpotifyTopTrack.git
-
Save your token in a file
secret.py
in the variable spotify_token - Script is ready to run.
python3 app.py -h
API Reference
The documentation to understand and use Spotify api is