Skip to content

API Documentation

Luke-Yamasaki edited this page Jan 14, 2022 · 3 revisions

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.

Comments/Answers

  • A logged in user may edit one of their comments without causing a refresh/redirect. They may also delete one of their own Comments, removing it from the list of visible Comments without causing a refresh/redirect.

    • POST /api/comments/:id
    • PUT /api/comments/:id
    • DELETE /api/comments/:id

Likes (Bonus)

  • A logged in user can Like or Unlike a Question or Comment with visible confirmation without causing a refresh/redirect.

    • POST /api/questions/:id/likes
    • POST /api/comments/:id/likes
    • DELETE /api/questions/:id/likes
    • DELETE /api/comments/:id/likes

Search

  • A user can type in a search bar and see a list of questions or topics from a menu based on what they typed.

    • GET /api/questions/
    • GET /api/topics/

Clone this wiki locally