Backend Routes - mstephan520/coinplace GitHub Wiki
Backend Routes
HTML
GET / StaticPagesController#root
API Endpoints
users
POST /api/users - sign up
session
POST /api/session - log in
DELETE /api/session - log out
trades
GET /api/trades - returns user's trades
GET /api/trades/:id - returns single trade
POST /api/trades - creates a new trade
coins
GET /api/coins - returns all coins
GET /api/coins/:id - returns single coin
POST /api/coins - adds a coin to database
portfolio_coins
GET /api/portfolio_coins - returns all portfolio coins for user_id // does this need to be nested under user_id?
GET /api/portfolio_coins/:id - returns single portfolio coin
POST /api/portfolio_coins - adds coin to a portfolio
PATCH /api/portfolio_coins/:id - edits a portfolio coin
DELETE /api/portfolio_coins/:id - removes a portfolio coin
followed_coins
GET /api/following - returns all followed coins for user_id // does this need to be nested under user_id?
GET /api/following/:id - returns single followed coin
POST /api/following - adds coin to followed
DELETE /api/following/:id - removes a portfolio coin