API Routes - ZaviarBrown/spaceXchange GitHub Wiki
API-Routes
This web app uses the following API routes to dynamically update the page to create a single-page-app-like feel for the user for specific features.
Planet
-
A logged in user may view all listings of planets and buy/sell a currently selected asset
GET api/planets
-
User can see individual asset with all of its details/description
GET api/planets/:id
Assets
-
User can make initial purchase
POST api/assets
POST api/transactions
-
User can buy more shares or sell less than their max shares
PATCH api/assets/:id
POST api/transactions
-
User can sell all of their shares
DELETE api/assets/:id
Transactions
-
User can view their previous transactions
GET api/transactions/