Skip to content

Test results (Robin Tun) #37

@robintun

Description

@robintun

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=random123' \
  -H 'accept: application/json' \
  -d ''

Response:

Internal Server Error 

Note: It was working when you guys showed me, but it's not working now. Did you guys change something?

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/14/play' \
  -H 'accept: application/json' \
  -H 'user-id: 5'

Response:

"Invalid user ID"

Note: I couldn't get my user_id because the Create User endpoint above wasn't working

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": "the_rockers"
}'

Response:

{
  "playlist_id": 12
}

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/12/songs/add' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "song_id": 6
}'

Response:

null
curl -X 'POST' \
  'https://songstackify.onrender.com/playlist/12/songs/add' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "song_id": 1
}'

Response:

null

Step 3: Play the Playlist

Now, play the created playlist:

curl -X 'GET' \
  'https://songstackify.onrender.com/playlist/12/play' \
  -H 'accept: application/json' \
  -H 'user-id: 5'

Response:

Internal Server Error

Note: This is probably because creating the user endpoint was not working

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:

Internal Server Error

Step 2: Remove the Song

Remove the song using the following POST request:

curl -X 'POST' \
  'https://songstackify.onrender.com/song/9/remove' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "authorization_key": "e69360f0857bcba4eb4e1e17"
}'

Response:

"Invalid song ID"

Note: This is probably because I wasn't able to successfully add a song

My Example Flow 1:

James has just heard from his friends about an amazing cross-platform music player called SongStackify. He quickly downloads the app and creates a new account. He starts by creating a new user.

He calls /users/create

curl -X 'POST' \
  'https://songstackify.onrender.com/users/create?password=thisisatest123' \
  -H 'accept: application/json' \
  -d ''

Response:

Internal Server Error

Sadly, because of some issue with the service, James couldn't create his account. Since he couldn't create his account, he was unable to Set Platform.

My Example Flow 2:

Justin, who is soon going on a road trip with his family to Yosemite, wants to create a new playlist to listen on the road. He already has a SongStackify account.

He calls /playlist/create

curl -X 'POST' \
  'https://songstackify.onrender.com/playlist/create' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "playlist_name": "Yosemite_Road_Trip"
}'

Response:

{
  "playlist_id": 13
}

With the newly created playlist called Yosemite Road Trip, he is ready to add songs to it.
He calls /playlists/{playlist_id}/songs/add

curl -X 'POST' \
  'https://songstackify.onrender.com/playlist/13/songs/add' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "song_id": 6
}'

Response:

null
curl -X 'POST' \
  'https://songstackify.onrender.com/playlist/13/songs/add' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "song_id": 1
}'

Response:

null
curl -X 'POST' \
  'https://songstackify.onrender.com/playlist/13/songs/add' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "song_id": 2
}'

Response:

null

Two days later, Justin and his family set off to Yosemite. On the way, Justin starts to play his amazing playlist he created.

He calls /playlists/{playlist_id}/play

curl -X 'GET' \
  'https://songstackify.onrender.com/playlist/13/play' \
  -H 'accept: application/json' \
  -H 'user-id: 14'

Response:

Internal Server Error

Unfortunately, SongStackify was having some internal server errors that day, so Justin couldn't play the playlist.

My Example Flow 3:

Abby loves K-Pop and a new song by BTS just came out today and she wants to add it to her music library on SongStackify.

She calls /song/add

curl -X 'POST' \
  'https://songstackify.onrender.com/song/add' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Butter",
  "album": "Butter",
  "artist": "BTS",
  "link": "https://open.spotify.com/album/2BDhPi2XCYujYxU6VM0QaD"
}'

Response:

Internal Server Error

Unfortunately, SongStackify servers were down that day, so Abby was not able to add her new song or play it because she doesn't have the song_id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions