Skip to content

API Documentation

jmthorn edited this page Apr 5, 2021 · 31 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.

Users

  • A logged in user may edit their own account information.

    Edit:

    • PUT /users/:id

Bookshelves

  • A logged in user can add a Book to their Bookshelf by using a dropdown of existing Bookshelves.

    Edit:

    • PUT /bookshelves/:id

Reviews

  • A logged in user may create, edit or delete one of their own reviews. This would add, alter or remove it from the list of visible reviews without causing a refresh/redirect.

    Create:

    • POST /books/:id/reviews

    Edit:

    • PUT /books/:id/reviews/:id

    Delete:

    • DELETE /books/:id/reviews/:id

ReadStatus

  • A logged in user can add a status to indicate whether they are "Read", "Currently Reading" or "Want to Read". Changing the status would not cause a refresh/redirect for the user.

    Create:

    • POST /books/:id/users/:id/readstatus

    Edit:

    • PUT /books/:id/users/:id/readstatus

Tags

  • A logged in user may add or remove a tag from a book without causing a refresh/redirect.

    Create:

    • POST /books/:id/tags

    Delete:

    • DELETE /books/:id/tags/:id

Clone this wiki locally