Skip to content

API Documentation

Sharon edited this page Apr 21, 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.

Games

  • Logged in users may access all the games in the database
  • GET api/games/
  • Logged in users may access a particular game
  • GET api/games/:game_id
  • Logged in users may access a list of a user's games
  • GET api/games/user/:user_id
  • Logged in users may create their own games
  • POST api/games/
  • Logged in users may edit their own game privacy
  • PUT api/games/:game_id

Comments

  • Logged in users may see all comments
  • GET api/comments/
  • Logged in users may access their own comment
  • GET api/comments/:comment_id
  • Logged in users may post a comment
  • POST api/comments/
  • Logged in users may edit their own comments
  • PUT api/comments/:comment_id
  • Logged in users may delete their own comments
  • DELETE api/comments/:comment_id
Clone this wiki locally