Git Product home page Git Product logo

recommendation-track-api's Introduction

recommendation-track-api

This API recommends music tracks based on the weather in a city.

Resolution to the ifood challenge (https://github.com/ifood/vemproifood-backend).

This project uses Spring Boot that provides a Rest Endpoint to get a list of tracks on Spotify based on the temperature in any city.

To Control execution of external integration the project make use of Java Future API and Completable execution.

Execution

To execute locally you can execute the above command on command line

./gradlew bootRun

The docker image is generated like it:

sudo docker build -t recommendation-track-api:1.0

After build the image, so we could execute the another command:

sudo docker run -d -p 8080:8080 -t recommendation-track-api:1.0

API Endpoint

/track

Request curl -X GET "localhost:8080/track?city=oslo"

OR

curl -X GET "localhost:8080/track?lat=151.2073&lat=-33.8679"

Response

[
   {
      "name":"Piano Concerto No. 21 in C Major, K. 467 \"Elvira Madigan\": II. Andante"
   },
   {
      "name":"Requiem, K. 626: Lacrimosa"
   },
   {
      "name":"Fantasia in D Minor, K.397"
   },
   {
      "name":"Symphony No.25 in G minor, K.183: 1. Allegro con brio"
   },
   {
      "name":"Piano Sonata No. 16 in C Major, K. 545 \"Sonata facile\": 1. Allegro"
   },
   {
      "name":"Adagio in E Major, K. 261"
   },
   {
      "name":"Serenade No. 13 in G Major, K. 525 \"Eine kleine Nachtmusik\": I. Allegro"
   },
   {
      "name":"Symphony No. 40 in G Minor, K. 550: I. Molto allegro"
   },
   {
      "name":"Mozart: Clarinet Concerto in A Major, K. 622: II. Adagio"
   },
   {
      "name":"Serenade in B-Flat Major, K. 361 \"Gran Partita\": III. Adagio"
   }
]

recommendation-track-api's People

Contributors

monteirocicero avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.