You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Service will use the Spotify API Search endpoint to look for the requested Song using the original request's params.title. Returning an array of songs in tracks.items
The Service will first query the Database for records matching spotify_id = tracks.items[0..5].id.
If a record is returned from one of the spotify_ids. The Service will return that object in JSON. Which will end the Service's workflow.
If no record is returned. The Service will find the requested song by comparing tracks.items[0..5].name to params.title. Then use the first element it matches with.
The Service will store the name, id, and url of the matched element to be used in the next step.
Spotify API Audio Analysis Endpoint - User Story #37
The Service will request Audio Analysis data at GET https://api.spotify.com/v1/audio-analysis/<spotify_id> using the spotify_id from the Song Search response.
The Service will create a record in the Songs table using the title, spotify_id, url from the Song Search response. Along with the delay, avg_bar_duration, duration, tempo, and time_signature from the Audio Analysis response.
The Service returns the formatted JSON object indicated below.
As a developer,
When I request a Song's information using
GET api/v1/songs?title=<title>
The Service will first query the Database for a record in the Songs table with the requested title.
The Service will return the matching Song record in JSON format, example below.
If no record is found
Spotify API Song Search Endpoint - User Story #32
The Service will have a valid Access Token ready to use (Token Generator - User Story User Story - Spotify API Token Generator #29)
The Service will use the Spotify API Search endpoint to look for the requested Song using the original request's
params.title
. Returning an array of songs intracks.items
The Service will first query the Database for records matching
spotify_id = tracks.items[0..5].id
.If a record is returned from one of the
spotify_id
s. The Service will return that object in JSON. Which will end the Service's workflow.If no record is returned. The Service will find the requested song by comparing
tracks.items[0..5].name
toparams.title
. Then use the first element it matches with.The Service will store the
name
,id
, andurl
of the matched element to be used in the next step.Spotify API Song Search - User Story User Story - Spotify API Song Search #32 Complete
.
Spotify API Audio Analysis Endpoint - User Story #37
The Service will request Audio Analysis data at
GET https://api.spotify.com/v1/audio-analysis/<spotify_id>
using thespotify_id
from the Song Search response.The Service will create a record in the Songs table using the
title
,spotify_id
,url
from the Song Search response. Along with thedelay
,avg_bar_duration
,duration
,tempo
, andtime_signature
from the Audio Analysis response.The Service returns the formatted JSON object indicated below.
Spotify API Audio Analysis - User Story User Story - Spotify API Audio Analysis #37 complete
Service
GET api/v1/songs
Endpoint - User Story User Story - Get Song Data Endpoint #8 completeThe text was updated successfully, but these errors were encountered: