Skip to content

API Documentation

cch41 edited this page Apr 28, 2021 · 1 revision

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.

Questions

  • A logged in user may select and edit the content of a previously posted question, but may not leave the content blank. The edit(s) will not cause the page to refresh/redirect.

    • PATCH /api/questions/:id
  • A logged in user may select and edit the tags on a previously posted question. The user must select one or more tags from suggested and / or custom tags. The edit(s) will not cause the page to refresh/redirect.

    • PATCH /api/questions/:id/tags

Answers

  • A logged in user may post one of their own answers to a question, adding it to the list of visible answers and without causing the page to refresh.

    • POST /api/answers/:id
  • A logged in user may edit one of their own previously posted answers without causing the page to refresh/redirect.

    • PATCH /api/answers/:id/
  • A logged in user may delete one of their own answers, removing it from the list of visible answers without causing a refresh/redirect.

    • DELETE /api/answers/:id

Upvotes

  • A logged in user can upvote a question or answer with visible confirmation without causing a refresh/redirect.

    • POST /api/questions/:id/upvotes
    • POST /api/answers/:id/upvotes
    • DELETE /api/questions/:id/upvotes
    • DELETE /api/answers/:id/upvotes

Clone this wiki locally