This is a microservice that was built to provide music information to the Untangled application. When receiving a request for a song, this microservice consumes the Spotify API, complies the relevant information, and returns that information in the response.
Explore the docs »
·
Report Bug
·
Request Feature
Visit Untangled to view all the repositories associated with this application.
This microservice allows you to query a song name and receive a response that includes the song name, artist name, album name, album release date, and a url for that song on spotify. It takes in the song name query, then consumes the Spotify API to get information about that song. The relevant information for that song is then extracted and compiled, and then returned in the microservice response.
# build a virtual environment to install your Python packages
python3 -m venv ./venv
# 'activate' the virtual environment for your project
# do this every time you start a new terminal and enter your project folder
source venv/bin/activate
# install your Python packages
pip3 install -r requirements.txt
#set your Spotify API keys
export SPOTIFY_CLIENT_ID=<your client id here>
export SPOTIFY_CLIENT_SECRET=<your client secret here>
To shut off your virtual environment, run deactivate
at a terminal where you
have an active virtual environment.
GET http://127.0.0.1:5000/api/v1/track?yesterday
Response:
{
"data": {
"album_name": "Help! (Remastered)",
"album_release_date": "1965-08-06",
"artist_name": "The Beatles",
"song": "Yesterday - Remastered 2009",
"url": "https://open.spotify.com/track/3BQHpFgAp4l80e1XslIjNI"
}
}
GET http://127.0.0.1:5000/api/v1/track?
Response:
{
"error": 422,
"message": "Unprocessable Entity, please try another song title"
}
GET http://127.0.0.1:5000/api/v1/track?asdfgasdfgasd
Response:
{
"message": "Unprocessable Entity, please try another song title",
"status": 422
}
To run tests first activate your virtual environment with source venv/bin/activate
Then run python3 -m pytest
See Open Issues or visit our Project Board for a list of proposed features, known issues, and project extensions.
Contributions are what make this community such an amazing and fun place to learn, grow, and create! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch
git checkout -b feature/NewGreatFeature
- Commit your Changes
git commit -m 'Add some NewGreatFeature'
- Push to the Branch
git push origin feature/NewGreatFeature
- Open a new Pull Request!
Bryce Jarrett - - GitHub
Cameron Romo - - GitHub
Joe Lopez - - GitHub
Estelle Staffieri - - GitHub
Grant Dempsey - - GitHub
Eduardo Parra - - GitHub
Jesse Mellinger - - GitHub
Sean Steel - - GitHub
Project Link: Untangled