Skip to content

API Documentation

bstetzer32 edited this page May 21, 2021 · 6 revisions

API Routes

This single-page React app uses the following API routes within its React-Redux store to manage interactions with the backend to allow for dynamically updated content while still maintaining a refresh-less experience.

User Authorization

  • GET /api/auth - Authorize user
  • PUT /api/auth - Update user account info
  • POST /api/auth/login - Login to account
  • GET /api/auth/logout - Logout of account
  • POST /api/auth/signup - Sign up for account
  • GET /api/auth/unauthorized - Flask-login authentication failure

Regions

  • GET /api/regions - Load regions for menu display
  • GET /api/regions/:id - Load project feed for specific region

Projects

  • POST /api/projects - Create project
  • GET /api/projects/:id - View project
  • PUT /api/projects/:id - Update project
  • POST /api/projects/:id/donations - Donate to project
  • PUT /api/projects/:id/cancel - Cancel project
  • DELETE /api/projects/:id/donations/:id - Delete Donation if project cancelled

Search

  • POST /api/search/ - Submit search form

Clone this wiki locally