Sing me a song allows you to recommend songs by sharing the song's youtube link
git clone https://github.com/patricia270/API-sing-me-a-song.git
cd API-sing-me-a-song
npm i
npm run start:dev
-
POST /recommendations
- body:
{ "name": "Título do vídeo da música", "youtubeLink": "link da música", }
- response: status code 201
-
POST /recommendations/:id/upvote
- parameter: id (recommendation id)
- response: status code 200
-
POST /recommendations/:id/downvote
- parameter: id (recommendation id)
- response: status code 200
-
GET /recommendations/random
- response: :
{ "id": 1, "name": "Título do vídeo da música", "youtubeLink": "link da música", "score": 245 },
-
GET /recommendations/top/:amount
- parameter: amount (recommendation limit)
- response: :
[ { "id": 150, "name": "Título do vídeo da música", "youtubeLink": "link da música", "score": 245 }, { "id": 12, "name": "Título do vídeo da música", "youtubeLink": "link da música", "score": 112 }, ... ]
npm run test:watch