-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Flow 1: New User Wants to Play a Single Song
Step 1: User Creation
Create a new user by calling the following POST request:
curl -X 'POST' \
'https://songstackify.onrender.com/users/create?password=password1234' \
-H 'accept: application/json' \
-d ''Response:
{
"user_id": 14
}Step 2: Play a Single Song
Now, play a specific song by calling the following GET request:
curl -X 'GET' \
'https://songstackify.onrender.com/song/22/play' \
-H 'accept: application/json' \
-H 'user-id: 14'Response:
"https://open.spotify.com/track/4iZ4pt7kvcaH6Yo8UoZ4s2?si=1f4d135964134b3a"Flow 2: Existing User Makes a Playlist, Adds Songs, and Plays It
Step 1: Create Playlist
Create a new playlist with the following POST request:
curl -X 'POST' \
'https://songstackify.onrender.com/playlist/create' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"playlist_name": "Sad :("
}'Response:
{
"playlist_id": 6
}Step 2: Add Songs to Playlist
Attempt to add songs to the playlist with the following POST requests:
curl -X 'POST' \
'https://songstackify.onrender.com/playlist/777/songs/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"song_id": 294
}'Response:
Internal Server Error
curl -X 'POST' \
'https://songstackify.onrender.com/playlist/777/songs/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"song_id": 983
}'Response:
Internal Server Error
Step 3: Play the Playlist
Now, play the created playlist:
curl -X 'GET' \
'https://songstackify.onrender.com/playlist/6/play' \
-H 'accept: application/json' \
-H 'user-id: 14'Response:
"https://open.spotify.com/track/4iZ4pt7kvcaH6Yo8UoZ4s2?si=1f4d135964134b3a"
"Added my own playlist and added the song"
Flow 3: Song Publisher Releases a Song then Faces Backlash
Step 1: Add a New Song
Add a new song using the following POST request:
curl -X 'POST' \
'https://songstackify.onrender.com/song/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Echos of Tomorrow",
"album": "The Deon Dreamscape",
"artist": "Luna Nova",
"link": "music.apple.com/neondreamscape/echoesoftomorrow"
}'Response:
{
"song_id": 23,
"authorization_key": "e69360f0857bcba4eb4e1e17"
}Step 2: Remove the Song
Remove the song using the following POST request:
curl -X 'POST' \
'https://songstackify.onrender.com/song/23/remove' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"authorization_key": "e69360f0857bcba4eb4e1e17"
}'Response:
"Song Removed"
New Flow 1: Friends on Different Platforms
Nicole, a Spotify fan, and Annie, an Apple Music fan, want to collaborate on playlists.
Step 1: User Creation for Nicole
curl -X 'POST' \
'https://songstackify.onrender.com/users/create?password=Nicole' \
-H 'accept: application/json' \
-d ''Response:
17
Step 2: User Creation for Annie
curl -X 'POST' \
'https://songstackify.onrender.com/users/create?password=Annie' \
-H 'accept: application/json' \
-d ''Response:
18
Step 3: Set Platform for Nicole
curl -X 'POST' \
'https://songstackify.onrender.com/users/platform?user_id=17&password=Nicole' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"platform": "Spotify",
"album": "BLOND",
"artist": "Frank Ocean",
"link": "Spotify"
}'Response:
Internal Server Error
Tried making the platform only for Spotify, got an error.
New Flow 2: Specific Song Only on a Certain Platform
Gib, a Nujabes fan, wants to add a specific version of "Aruarian Dance" from YouTube to his playlist.
Step 1: User Creation for Gib
curl -X 'POST' \
'https://songstackify.onrender.com/users/create?password=Gib' \
-H 'accept: application/json' \
-d ''Response:
20
Step 2: Add Song from YouTube
curl -X 'POST' \
'https://songstackify.onrender.com/song/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Aruarian Dance",
"album": "Samurai Champloo",
"artist": "Nujabes",
"link": "https://www.youtube.com/watch?v=HkZ8BitJhvc&ab_channel=DIVAZ"
}'Response:
Internal Server Error
This song is only on YouTube. If he can make a homework playlist with this song and still have other platforms, that would be great.
New Flow 3: Friend Left a Fire Playlist
Zac, a music enthusiast, created an amazing playlist that Josh wants to keep after Zac deleted his account.
Step 1: User Creation for Zac
curl -X 'POST' \
'https://songstackify.onrender.com/users/create?password=Zac' \
-H '
accept: application/json' \
-d ''Response:
21
Step 2: Add Songs to Zac's Playlist
curl -X 'POST' \
'https://songstackify.onrender.com/song/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "ROS",
"album": "GO:OD AM",
"artist": "Mac Miller",
"link": "https://open.spotify.com/track/388jD8ko9cvFM9cd9TYDrl?si=4bb63271f8d047f8"
}'Response:
{
"song_id": 28,
"authorization_key": "fd1aa3a1257716335dce020c"
}curl -X 'POST' \
'https://songstackify.onrender.com/song/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Snooze",
"album": "SOS",
"artist": "SZA",
"link": "https://open.spotify.com/track/4iZ4pt7kvcaH6Yo8UoZ4s2?si=b96294eb658842f8"
}'Response:
{
"song_id": 29,
"authorization_key": "e621b90670eed95140b4ddc5"
}Step 3: Create Playlist for Zac's Songs
curl -X 'POST' \
'https://songstackify.onrender.com/playlist/create' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"playlist_name": "Zac Fire Playlist"
}'Response:
{
"playlist_id": 9
}Step 4: Add Songs to Playlist
Attempt to add songs to the playlist:
curl -X 'POST' \
'https://songstackify.onrender.com/playlist/9/songs/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"song_id": 28
}'Response:
Null
curl -X 'POST' \
'https://songstackify.onrender.com/playlist/9/songs/add' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"song_id": 29
}'Response:
Null
Step 5: Play the Playlist
curl -X 'GET' \
'https://songstackify.onrender.com/playlist/9/play' \
-H 'accept: application/json' \
-H 'user-id: 21'Response:
"https://open.spotify.com/track/388jD8ko9cvFM9cd9TYDrl?si=4bb63271f8d047f8"
curl -X 'GET' \
'https://songstackify.onrender.com/playlist/9/play' \
-H 'accept: application/json' \
-H 'user-id: 21'Response:
"https://open.spotify.com/track/4iZ4pt7kvcaH6Yo8UoZ4s2?si=b96294eb658842f8"
Step 6: Delete User
curl -X 'POST' \
'https://songstackify.onrender.com/users/delete/21?password=Zac' \
-H 'accept: application/json' \
-d ''Response:
Null
curl -X 'GET' \
'https://songstackify.onrender.com/playlist/9/play' \
-H 'accept: application/json' \
-H 'user-id: 21'Response:
Internal Server Error
*Note: The responses are placeholders and may vary based on the actual server implementation.