-
Notifications
You must be signed in to change notification settings - Fork 0
Routes
Andres Alfaro edited this page Sep 18, 2017
·
3 revisions
-
GET /api/users/:userID
- retrieves user info and playlists authored and followed by the user associated with the provided userID. -
POST /api/users
- sign up.
-
GET /api/playlist/
- returns all the playlists information associated with the current user (there will always be a logged user, otherwise the site will alway return an error). -
GET /api/playlist/:playlistID
- returns the playlist information (name and author). -
POST /api/playlist/
- create a new playlist. -
PATCH /api/playlist/
- update playlist title. -
DELETE /api/playlist/:playlistID
- delete the playlist associated with the provided id.
-
GET /api/song/?term=<term_to_search>
- returns playlists all the songs like the search term. -
GET /api/song/:songID
- returns the song associated with the ID.
-
GET /api/friendship
- get current user's friends. -
GET /api/friendship/:userID
- get friends of the provided userID. -
POST /api/friendship
- current user will follow another user. -
DELETE /api/friendship
- current user will stop following another user.
-
GET /api/playlist_followship
- retrieve current user's playlists. -
GET /api/playlist_followship/:userID
- retrieve playlists of the provided userID. -
POST /api/playlist_followship
- current user will follow a playlist. -
DELETE /api/playlist_followship
- current user fill stop following a playlist.
-
GET /api/search/?term=<term_to_search>
- perform search with the provided term on our initial tables (playlist/song/user).
-
POST /api/session/
- Log user in. -
DELETE /api/session/
- Log user out.
/login
/signup
-
/collection/playlists
- homepage, collection of user playlists. -
/users/:userId
- user profile -
/user/:userID/playlists/:playlistID
- show a specific playlist. -
/user/:userID/playlists/
- show all playlists for specific user. -
/playlist/new
- create new playlist. -
/playlist/:playlistID/edit
- edit a playlist. -
/search/
- search for a specific user, song or playlist. -
/search/results
- display the results of a search.