Skip to content

About

Rails API for managing reading lists

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Book.next API

API for lists used in Book.next.

Breaking Changes

Implementation of Readings changes the top level key of the books#lists action from books to readings

API Endpoints

Verb URI Pattern Controller#Action
POST /sign-up users#signup
POST /sign-in users#signin
DELETE /sign-out/:id users#signout
PATCH /change-password/:id users#changepw
GET /books books#index
GET /books/:id books#show
GET /lists books#lists
POST /books books#create
POST /readings readings#create
PATCH /readings/:id readings#update
DELETE /readings/:id readings#destroy

User actions

Summary

Request Response
Verb URI body Status body
POST `/sign-up` credentials 201, Created user
400 Bad Request empty
POST `/sign-in` credentials 200 OK user w/token
401 Unauthorized empty
DELETE `/sign-out/:id` empty 201 Created empty
401 Unauthorized empty
PATCH `/change-password/:id` passwords 204 No Content user w/token
400 Bad Request empty

Book actions

Summary

Request Response
Verb URI body Status body
GET `/books[?title=title&author=author]` empty 200, OK books found
The optional `search` parameters restrict the response to games with a matching `title`, `author` or both, depending on the query sent. 200, OK empty books
The default is to retrieve all books stored in the database. 401 Unauthorized empty
GET `/books/:id` empty 200 OK book
401 Unauthorized empty
GET `/lists` empty 200, OK user readings
401, Unauthorized empty
POST `/books` book 201 Created empty
400 Bad Request empty

Readings actions

Summary

Request Response
Verb URI body Status body
POST `/readings` reading 201, Created empty
If the user already has a reading associated with the book, a new reading will not be created 409 Conflict empty
401 Unauthorized empty
DELETE `/readings/:id` empty 201 Created empty
401 Unauthorized empty
PATCH `/readings/:id` reading 204 No Content empty
400 Bad Request empty
401 Unauthorized empty

About

Rails API for managing reading lists

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages