Backend Routes - B-Salinas/SoundTrack GitHub Wiki
API Endpoints
SoundTrack uses the following API routes to dynamically update the page to create a single-page app-like feel for the user for specific features.
users
GET /api/users/:id- returns the users profile informationPOST /api/users/- user sign up
songs
-
GET /api/users/:id/albums/:id/songs- returns all songs from an album owned by a user -
POST /api/users/:id/albums/:id/songs- adds a song to an album owned by the user -
GET /api/users/:id/albums/:id/songs:id- return a song's information -
PATCH /api/users/:id/albums/:id/songs:id- edit a song's information -
DELETE /api/users/:id/albums/:id/songs:id- delete a song
albums
-
GET /api/users/:id/albums/- returns all albums owned by a user -
POST /api/users/:id/albums/:id/- adds an album owned by the user -
GET /api/users/:id/albums/:id/- return an album's information (song list, user who created album) -
PATCH /api/users/:id/albums/:id/- edit an album's information -
DELETE /api/users/:id/albums/:id/- delete an album
session
POST /api/session- log inDELETE /api/session- log out