jcheruvelil / MusicRecsAPI

1 stars 0 forks source link

Test Results, Vaughn Rostermundt #5

Open vrosterm opened 4 months ago

vrosterm commented 4 months ago

New Test Cases

  1. A user gets a recommendation and doesn't like it at the moment. Later on, they change their mind, and want to go back to their recommendation history, find the song, and add it to a playlist.
  2. A user inputs nothing into the search bar, instead wanting to see all available songs in the database.
  3. A user wants to edit an existing playlist into a new jazz playlist, based on their previous search history. They look through their old search history, collect all jazz songs, and add it to the playlist manually. Then, they remove any non-jazz songs from the playlist.

Testing Results

Flow 1

NOTE: I went a little off script here and got an actual music ID, not just a placeholder.

  1. curl -X 'GET' \ 'https://musicrecs.onrender.com/search/?track=change&artist=deftones' \ -H 'accept: application/json' \ -H 'access_token: musicrecs'

  2. Response: { "results": [ { "track_id": "51c94ac31swyDQj9B3Lzs3", "track": "Change (In the House of Flies)", "album": "White Pony", "artist": "Deftones" } ] }

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

  4. Response: { "recommendations": [ { "id": "0Pie5DFAHHxpkONFUsAI6s", "track": "Aneurysm", "album": "Incesticide", "artist": "Nirvana" }, { "id": "2EoOZnxNgtmZaD8uUmz2nD", "track": "Black Hole Sun", "album": "Superunknown (Deluxe Edition)", "artist": "Soundgarden" }, { "id": "0kYMwaQWABTkFff8AZjmYI", "track": "Hayloft II", "album": "Inside (Deluxe)", "artist": "Mother Mother" }, { "id": "2DlHlPMa4M17kufBvI2lEN", "track": "Chop Suey!", "album": "Toxicity", "artist": "System Of A Down" }, { "id": "3lPn81PFyKvXiyHhlkwkQ4", "track": "Doomed", "album": "That's The Spirit", "artist": "Bring Me The Horizon" }, { "id": "0sTlGEld0h8kIPZaKDYUf4", "track": "Notion", "album": "Notion", "artist": "The Rare Occasions" }, { "id": "4sjLcE0GQ6urc4iUXsUPe9", "track": "Kings And Queens", "album": "This Is War", "artist": "Thirty Seconds To Mars" }, { "id": "6oO7WMjD6kEvCITLbVj0mu", "track": "Hypnotize", "album": "Hypnotize", "artist": "System Of A Down" }, { "id": "3BzrV9GCvaCr4m7N2FvNvK", "track": "Suffocate", "album": "Lost in the Waves (The Complete Edition)", "artist": "LANDMVRKS;Chunk! No, Captain Chunk!" }, { "id": "1RTYixE1DD3g3upEpmCJpa", "track": "In The End", "album": "Wretched and Divine: The Story Of The Wild Ones", "artist": "Black Veil Brides" } ] }

  5. curl -X 'POST' \ 'https://musicrecs.onrender.com/rating/8/51c94ac31swyDQj9B3Lzs3' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' \ -H 'Content-Type: application/json' \ -d '{ "value": 9 }'

  6. Response: "OK"

Flow 2

Flow 2 does something similar to flow 1 in that it gives recs, so I'm not going to repeat it here. I will say, however, that there is no GENRE option for recommendations. Just the track ID.

Flow 3

  1. curl -X 'GET' \ 'https://musicrecs.onrender.com/user/8/library' \ -H 'accept: application/json' \ -H 'access_token: musicrecs'

  2. [ { "playlist_id": 9, "playlist_title": "tester" } ] NOTE: I made the "tester" playlist on my own.

  3. curl -X 'POST' \ 'https://musicrecs.onrender.com/playlist/9/add/51c94ac31swyDQj9B3Lzs3' \ -H 'accept: application/json' \ -H 'access_token: musicrecs' \ -d ''

  4. Response: "OK"

NOTE: There is no endpoint that allows me to see what is on the playlist.