smadigan91 / spotify-rec-app

5 stars 0 forks source link

Implement Recommendation API #4

Closed smadigan91 closed 4 years ago

smadigan91 commented 4 years ago

Given a Recommendation Specification object, generate a playlist with the songs that were recommended.

Should be able to take any form of identification for seed information, e.g. a url, uri, or id. The backend can worry about sanitizing the input.

smadigan91 commented 4 years ago

sample request json for easy access

{
  "playlist_name": "playlist name",
  "seed": {
    "playlist": "http://spotify.com/playlist/uri/or/id/or/url",
    "tracks": [
      "uri1/id1/link1",
      "uri2/id2/link2"
    ],
    "artists": [
      "uri1/id1/link1",
      "uri2/id2/link2"
    ],
    "genres": [
      "genre1"
    ]
  },
  "parameters": {
    "target": {
      "track_attributes": {
        "duration_ms": 255349,
        "key": 5,
        "mode": 0,
        "time_signature": 4,
        "acousticness": 0.514,
        "danceability": 0.735,
        "energy": 0.578,
        "instrumentalness": 0.0902,
        "liveness": 0.159,
        "speechiness": 0.0461,
        "valence": 0.624,
        "tempo": 98.002,
        "popularity": 55
      }
    },
    "min": {
      "track_attributes": {
        "duration_ms": 255349,
        "key": 5,
        "mode": 0,
        "time_signature": 4,
        "acousticness": 0.514,
        "danceability": 0.735,
        "energy": 0.578,
        "instrumentalness": 0.0902,
        "liveness": 0.159,
        "speechiness": 0.0461,
        "valence": 0.624,
        "tempo": 98.002,
        "popularity": 55
      }
    },
    "max": {
      "track_attributes": {
        "duration_ms": 255349,
        "key": 5,
        "mode": 0,
        "time_signature": 4,
        "acousticness": 0.514,
        "danceability": 0.735,
        "energy": 0.578,
        "instrumentalness": 0.0902,
        "liveness": 0.159,
        "speechiness": 0.0461,
        "valence": 0.624,
        "tempo": 98.002,
        "popularity": 55
      }
    }
  }
}
smadigan91 commented 4 years ago

Note: