justinmauldin7 / Play_BE

0 stars 1 forks source link

Get playlists endpoint #18

Closed danbriechle closed 5 years ago

danbriechle commented 5 years ago

As a user when I send a get request to /api/v1/playlists the response returns all the playlists in the database along with their associated favorited songs

If successful, this request will return a response in the following format:

[ { "id": 1, "playlist_name": "Favorite songs of all time", "favorites": [ { "id": 1, "name": "We Will Rock You", "artist_name": "Queen" "genre": "Rock", "rating": 88 }, { "id": 2, "name": "Careless Whisper", "artist_name": "George Michael" "genre": "Pop", "rating": 93 } ] }, { "id": 2, "name": "Other amazing songs", "favorites": [ { "id": 1, "name": "We Will Rock You", "artist_name": "Queen" "genre": "Rock", "rating": 88 }, { "id": 2, "name": "Careless Whisper", "artist_name": "George Michael" "genre": "Pop", "rating": 93 }, ] }, ]