/spotify-playlist-by-temperature

Create a playlist suggestion according to the current temperature.

Primary LanguageJavaScript

spotify-playlist-by-temperature

Create a playlist suggestion according to the current temperature.

Business rules

  • If temperature (celcius) is above 30 degrees, suggest tracks for party
  • In case temperature is between 15 and 30 degrees, suggest pop music tracks
  • If it's a bit chilly (between 10 and 14 degrees), suggest rock music tracks
  • Otherwise, if it's freezing outside, suggests classical music tracks

Routes

Method Endpoint Query parameters
GET /playlist city= CITY NAME
GET /playlist/coordinates lat= LATITUDE lon= LONGITUDE

How to run it

Get your spotify API key Developers spotify and your OpenWeatherMap API key OpenWeatherMap

set them on your .env file

Install the dependencies and devDependencies and start the server.

$ yarn install
$ node src/index.js

This project was based on Ifood backend challenge - Made with ❤️ by João vitor oliveira