API Documentation - martinson-r/Tabletopr GitHub Wiki

The ChoreScore API is organized around REST. Our API has predictable resource oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes and verbs.

API routes are not user-facing and should only be used by developers.

Resources:

USERS

Endpoints for the Users resource:

  • Log In - POST /api/session
  • Sign Up - POST /api/users
  • Log Out - DELETE /api/session
  • Retrieve Single User - GET /api/users/:id
  • Delete User - DELETE /api/users/:id
  • Edit User = PUT /api/users/:id

TABLES

Endpoints for the Tables resource:

  • Retrieve All Tables - GET /api/tables
  • Retrieve Single Table - GET /api/tables/:id
  • Retrieve All Tables A Single Player Is In or Hosting - GET /api/tables/players/:playerId
  • Delete Table - DELETE /api/tables/:id
  • Edit Table = PUT /api/tables/:id
  • Retrieve All Table Reviews - GET /api/tables/:tableId/reviews
  • Retrieve Single Table Review - GET /api/tables/:tableId/reviews/:reviewId
  • Retrieve All Table Messages - GET /api/tables/:tableId/messages
  • View All Applications to a Table - GET /api/tables/:tableId/applications
  • View a Specific Player's Application to a Table - GET api/tables/:tableId/:playerId/application

PLAYERS

Endpoints for the Players resource:

  • Retrieve All Player Reviews - GET /api/players/reviews
  • Retrieve All Reviews for a Single Player - GET /api/players/:playerid
  • Retrieve Single Review for a Single Player - GET /api/players/reviews/:reviewId
  • Delete Player Review - DELETE /api/reviews/players/reviews/:reviewId
  • Edit Player Review = PUT /api/reviews/players/reviews/:reviewId
  • Retrieve All Player Messages - GET /api/players/:playerId/messages
  • Send a Message to a Specific Player = POST /api/players/:playerId/:recipientId/messages