Backend - Neminem1203/Me-Cube GitHub Wiki
Backend Routes
HTML
GET / StaticPagesController#root
- Root Page (will be overwritten in frontend)
API Endpoints
users
GET /api/users/
- Get a list of user info (requires params[:user_list] to be an array of integers to return all the user information)POST /api/users
- Create UserGET /api/users/:user_id
- Shows info from the user with the :user_idPATCH /api/users/:user_id
- Edit User Information (Authorized User Only)DELETE /api/users/:user_id
- Delete Account (Authorized User Only)
session
POST /api/session
- Sign InDELETE /api/session
- Sign Out
videos
GET /api/videos
- All VideosPOST /api/videos
- Upload VideoGET /api/videos/:video_id
- Watch VideosPATCH /api/videos/:video_id
- Edit Video (Authorized Users Only)DELETE /api/videos/:video_id
- Remove Video (Authorized Users Only)
comments
GET /api/videos/comments/
- Get Comments for VideoPOST /api/comments/
- Create New CommentPATCH /api/comments/:comment_id
- Edit Comment (Authorized Users Only)DELETE /api/comments/:comment_id
- Delete Comment (Authorized Users Only)
likes
GET /api/videos/:video_id/likes
- Get all the likes for a video_idGET /api/comments/:comment_id/likes
- Get all the likes for a comment_idPOST /api/likes
- Create a Like/Dislike on a likeable itemDELETE /api/likes/:like_id
- Remove Like/Dislike