illinois / clickin

Open Source Polling App
University of Illinois/NCSA Open Source License
14 stars 44 forks source link

Create Specs for Flask API #44

Open tdog191 opened 4 years ago

tdog191 commented 4 years ago

To facilitate development of the Flask API, a consensus should be reached on how the frontend and backend will communicate through this API. Some design points to address:

  1. What are the API endpoints? (E.g. is the target polling session endpoint "join.click.in/xYz6" or "click.in/xYz6"?)
  2. What types of requests do these endpoints support? (e.g. HTTP requests: GET, PUT, POST, DELETE)
  3. What are the parameters to each endpoint? (e.g. three-character session hash)
  4. What functionality should each endpoint support? (e.g. "it should route user to target polling session page and authenticate if previously logged in.")
  5. What data should responses return, and in what format? (e.g. a JSON list of a student's/professor's courses)
  6. How should errors be handled? (e.g. 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 500 Internal Server Error)