Closed OlegKlimenko closed 6 years ago
When user clicks on the book from home (which he is reading) system must ping this api to retrieve last readed page: <host>/api/v1/read-book/
<host>/api/v1/read-book/
Request:
{"user_token": "751c234b-ca87-4eb8-9e27-f667e7d346f3", "book_id": <book_id>}
Error response (user with token not exists; book with id not exists; added book with pair user/book_id don't exists):
{"status": 404, "details": "not exists"}
Successful response:
{ "data": { "last_page": 500 }, "detail": "successful", "status": 200 }
Where the last page is the last readed page. By default this value is 1 which created when you started reading book.
All other responses are connection lost/unhandled errors. Also will be discussed and tested
Implement loading last page API interaction
When user clicks on the book from home (which he is reading) system must ping this api to retrieve last readed page:
<host>/api/v1/read-book/
Request:
Error response (user with token not exists; book with id not exists; added book with pair user/book_id don't exists):
Successful response:
Where the last page is the last readed page. By default this value is 1 which created when you started reading book.
All other responses are connection lost/unhandled errors. Also will be discussed and tested