Closed OlegKlimenko closed 6 years ago
When user is changing book page there must be send request with changing page. URL: <host>/api/v1/set-current-page/
<host>/api/v1/set-current-page/
Request:
{"user_token": "751c234b-ca87-4eb8-9e27-f667e7d346f3", "book_id": 22, "current_page": 155}
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"}
Error response (current page sent not as a number):
{ "status": 400, "detail": "current page not a number", "data": {} }
Successful response:
{ "status": 200, "detail": "successful", "data": {} }
All other responses are connection lost/unhandled errors. Also will be discussed and tested
Implement setting current readed page API interaction
When user is changing book page there must be send request with changing page. URL:
<host>/api/v1/set-current-page/
Request:
Error response (user with token not exists; book with id not exists; added book with pair user/book_id don't exists):
Error response (current page sent not as a number):
Successful response:
All other responses are connection lost/unhandled errors. Also will be discussed and tested