Test Results (Ananya Thapar)
Opened this issue · 0 comments
Workflow 1:
Bob wants to create a new account on the new platform SongStackify! He inputs his super secret password to sign up. Bob now has his unique user id.
He calls /users/create
curl -X 'POST' \
'https://songstackify.onrender.com/users/create?password=supersecret' \
-H 'accept: application/json' \
-d ''
Response:
15
Then to set his preferred platform to Spotify, he calls /users/platform
curl -X 'POST' \
'https://songstackify.onrender.com/users/platform?user_id=15&password=supersecret' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"platform": "Spotify",
"album": "string",
"artist": "string",
"link": "string"
}'
Response:
Internal Server Error
Since that didn’t work, Bob would like to delete his account, he calls /users/delete/{user_id}
curl -X 'POST' \
'https://songstackify.onrender.com/users/delete/15?password=supersecret' \
-H 'accept: application/json' \
-d ''
Response:
null
Workflow 2:
Justin, the acapella king already has an account on SongStackify! He wants to create a new playlist for his upcoming acapella concert. He calls /playlist/create to create a new playlist
curl -X 'POST' \
'https://songstackify.onrender.com/playlist/create' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"playlist_name": "Concert Fall 23"
}'
Response:
{
"playlist_id": 8
}
Now he knows his playlist_id, so he can add songs to it. He calls /playlists/{playlist_id}/songs/add
curl -X 'POST' \
'https://songstackify.onrender.com/playlist/7/songs/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"song_id": 1
}'
Response:
null
Now he wants to play his playlist. He calls /playlists/{playlist_id}/play
curl -X 'GET' \
'https://songstackify.onrender.com/playlist/8/play' \
-H 'accept: application/json' \
-H 'user-id: 16'
Response:
null
Workflow 3
Teddy, a lover of R&B music already has an account on SongStackify but would like to add a new song. His user id is 19.
He calls /song/add
curl -X 'POST' \
'https://songstackify.onrender.com/song/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Jet Black (feat. Brandy)",
"album": "Ventura",
"artist": "Anderson .Paak",
"link": "https://open.spotify.com/track/70pZIQqQ37SrNCADx0FiPN?autoplay=true"
}'
Response:
{
"song_id": 24,
"authorization_key": "00c933d8e2b72b8ff495306d"
}
Teddy changed his mind and now wants to remove the song he just added:
/song/{song_id}/remove
curl -X 'POST' \
'https://songstackify.onrender.com/song/24/remove' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"authorization_key": "00c933d8e2b72b8ff495306d"
}'
Response:
"Song Removed"
Teddy is super indecisive and went back and added that song again. He now wants to play it. He calls
/song/{song_id}/play
curl -X 'GET' \
'https://songstackify.onrender.com/song/25/play' \
-H 'accept: application/json' \
-H 'user-id: 19'
Response:
"https://open.spotify.com/track/70pZIQqQ37SrNCADx0FiPN?autoplay=true"