RESTful API
achoi1225 edited this page Nov 20, 2020
·
9 revisions
Path | HTTP Verb | Meaning |
---|---|---|
/api/users/ | POST | Create a new user |
/api/users/token/ | POST | Upon successful login create a token, attach user token to cookie, redirect to the home page |
/api/artists/:userId/ | GET | Get data for one artist |
/api/fans/:userId/ | GET | Get data for one fan (BONUS) |
/api/albums | GET | Get ALL albums |
/api/albums/:albumId | GET | Get contents of album page |
/api/albums/:albumId | POST | Create an album |
/api/albums/:albumId | PATCH | Edit album |
/api/albums/:albumId/tracks/ | GET | Get ALL tracks for album |
/api/albums/:albumId/tracks/:trackId | GET | Get one track for an album |
/api/albums/:albumId/tracks/:trackId | POST | Add track for an album |
/api/albums/:albumsId/tracks/trackId/delete | DELETE | Delete track from an album |
/api/album/:albumId | DELETE | Delete album |
/api/follows/following | GET | Get list of artist a fan is following |
/api/follows/followers | GET | Get list of fans following artist |