jcheruvelil / MusicRecsAPI

1 stars 0 forks source link

Test Results Xia Webster #7

Open iemxia opened 5 months ago

iemxia commented 5 months ago

CREATE USER Workflow curl -X 'POST' \ 'https://musicrecs.onrender.com/user/' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' \ -H 'Content-Type: application/json' \ -d '{ "username": "xmw2003" }' Reponse body { "user_id": 9 } The return response is different from what your testing says it should? I'm guessing you just havent updated the test_results.

iemxia commented 5 months ago

LOGIN USER curl -X 'POST' \ 'https://musicrecs.onrender.com/user/login/' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' \ -H 'Content-Type: application/json' \ -d '{ "username": "xmw2003" }' Response body { "message": "Login successful" } The return response is different from what your testing says it should? I'm guessing you just havent updated the test_results.

iemxia commented 5 months ago

CREATE PLAYLIST curl -X 'POST' \ 'https://musicrecs.onrender.com/playlist/9' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' \ -H 'Content-Type: application/json' \ -d '{ "playlist_name": "PUSHEEEN" }' Response { "playlist_id": 10 }

iemxia commented 5 months ago

Tested /search/ with no parameters, ran a different time with just the artist, and it seems to infinitely run and never returned anything? I did this because I wanted to see what tracks there were so that I could know the id to then add to my playlist that I created.

curl -X 'GET' \ 'https://musicrecs.onrender.com/search/?track=3cfOd4CMv2snFaKAnMdnvK' \ -H 'accept: application/json' \ -H 'access_token: musicrecs'

response: { "results": [] }

Shouldn't this return the one song I looked up? I know it exists in your database since I was able to add the song with this track_id to my playlist and remove it as well. It is also used in your /recs/ test in v2.

iemxia commented 5 months ago

ADD SONG TO PLAYLIST curl -X 'POST' \ 'https://musicrecs.onrender.com/playlist/10/add/0' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' \ -d '' Response { "detail": "Track does not exist" }

I tried a bunch of random song names, and numbers as well, and I couldn't get this to add any song to my playlist.

Edit: tried the track_id that was used in your get recommendation test, and returned OK

iemxia commented 5 months ago

REMOVE SONG FROM PLAYLIST curl -X 'POST' \ 'https://musicrecs.onrender.com/playlist/10/remove/-1' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' \ -d '' Response "OK" Considering I didn't have any songs added (from previous test), I think it would make more sense to have a message sent to the user that says that track can't be removed from my playlist since it wasn't there to begin with.

Edit: tried the track_id that was used in your get recommendation test, and returned OK

iemxia commented 5 months ago

GET user Library curl -X 'GET' \ 'https://musicrecs.onrender.com/user/9/library' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' Response [ { "playlist_id": 10, "playlist_title": "PUSHEEEN" } ]

Returned correctly

iemxia commented 5 months ago

SET RATING curl -X 'POST' \ 'https://musicrecs.onrender.com/rating/9/pusheen' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' \ -H 'Content-Type: application/json' \ -d '{ "value": 9 }' Response { "detail": "Track with id pusheen does not exist" }

Same problem as with add song to playlist, I had no idea what the track ids existed and I tried guessing a few times, but they all say the track does not exist.

Edit: tried the track_id that was used in your get recommendation test, and returned OK

iemxia commented 5 months ago

GET RECOMMENDATION curl -X 'GET' \ 'https://musicrecs.onrender.com/recs/?track_id=3cfOd4CMv2snFaKAnMdnvK' \ -H 'accept: application/json' \ -H 'access_token: musicrecs'

Response { "recommendations": [ { "id": "1FvDJ9KGxcqwv1utyPL3JZ", "track": "This Charming Man - 2011 Remaster", "album": "The Smiths", "artist": "The Smiths" }, { "id": "7CQhZA3qNDZBoTKWqjD7gR", "track": "Give Me Your TMI", "album": "MAXIDENT", "artist": "Stray Kids" }, { "id": "2LxdNADWier3MKTei8FbOY", "track": "I Was Made For Lovin' You (feat. Nile Rodgers & House Gospel Choir)", "album": "I Was Made For Lovin' You (feat. Nile Rodgers & House Gospel Choir)", "artist": "Oliver Heldens;Nile Rodgers;House Gospel Choir" }, { "id": "2Cd9iWfcOpGDHLz6tVA3G4", "track": "Waka Waka (This Time for Africa) [The Official 2010 FIFA World Cup (TM) Song] (feat. Freshlyground)", "album": "Waka Waka (This Time for Africa) [The Official 2010 FIFA World Cup (TM) Song] (feat. Freshlyground)", "artist": "Shakira;Freshlyground" }, { "id": "0Be7sopyKMv8Y8npsUkax2", "track": "Tacones Rojos", "album": "Tacones Rojos", "artist": "Sebastian Yatra" }, { "id": "0Gbp9aWNohZ4Kwdi75ntzT", "track": "Love You Better", "album": "Made For You", "artist": "John De Sohn;Rasmus Hagen" }, { "id": "21aOLk12MksET8AsbU0SI6", "track": "LO$ER=LO♡ER", "album": "The Chaos Chapter: FIGHT OR ESCAPE", "artist": "TOMORROW X TOGETHER" }, { "id": "2kWowW0k4oFymhkr7LmvzO", "track": "Come with Me Now", "album": "Lunatic", "artist": "KONGOS" }, { "id": "6ylDpki1VpIsc525KC1ojF", "track": "Tacones Rojos", "album": "Dharma", "artist": "Sebastian Yatra" }, { "id": "4UuGBDjt8gLXsANZqZxMBz", "track": "Love You Better", "album": "Love You Better", "artist": "John De Sohn;Rasmus Hagen" } ] }

iemxia commented 5 months ago

Adding multiple playlists and viewing them in library: repeated curl -X 'POST' \ 'https://musicrecs.onrender.com/playlist/9' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' \ -H 'Content-Type: application/json' \ -d '{ "playlist_name": "hoohhh" }' with different playlist names. Each returned with the playlist-id as expected.

curl -X 'GET' \ 'https://musicrecs.onrender.com/user/9/library' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' Response [ { "playlist_id": 10, "playlist_title": "PUSHEEEN" }, { "playlist_id": 11, "playlist_title": "blobabsb" }, { "playlist_id": 12, "playlist_title": "hoohhh" } ]

iemxia commented 5 months ago

Testing get search history curl -X 'GET' \ 'https://musicrecs.onrender.com/history/search?user_id=9' \ -H 'accept: application/json' \ -H 'access_token: musicrecs'

Resposne { "detail": "Search history not found" } I have searched, but it is not returning any history. Can't test clear search history if I do not have any history to clear.

iemxia commented 5 months ago

Testing get recommendation history I passed in my user_id = 9 and it did not return anyhting even though I have requested a recommendation before. It also took a long time? Not sure why? Can't test clear recommendation history if I do not have any recommendations to clear.