backend routes - sirivatd/robinhoops GitHub Wiki
HTML
GET / StaticPagesController#root
API Endpoints
users
GET /api/users
- return the user and account information for the User Search feature
POST /api/users
- sign up
session
POST /api/session
- log in
DELETE /api/session
- log out
athletes
GET /api/athletes
- returns relevant athletes (filtered by data/params
)
GET /api/athletes/:id
- returns an athlete
stocks
GET /api/users/id/shares
- return all current users shares
POST /api/stocks
- user buys shares of an athlete (that they currently don't own)
GET /api/stocks/:id
- get specific stock information
PATCH /api/stocks/:id
- user updates quantity of shares holding
DELETE /api/stocks/:id
- user sells shares of an athlete
watchlist
POST /api/watchlist
- user adds stock to watchlist
DELETE /api/watchlist/:id
- user removes athlete from watchlist