Personal Library
Delete all books
Kill all
User Stories:
-
Nothing from my website will be cached in my client as a security measure.
-
I will see that the site is powered by 'PHP 4.2.0' even though it isn't as a security measure.
-
I can
post a
title
to /library/v1/books/ to add a book and returned will be the object with the
title
and a unique
_id
.
-
I can
get /library/v1/books/ to retrieve a list of all books containing
title
,
_id
,
commentcount
.
-
I can
get /library/v1/books//{_id} to retrieve a single object of a book containing
title
,
_id
, and
comments
(empty array if no comments present).
-
I can
post a
comment
to /library/v1/books//{_id} to add a comment to a book and returned will be the books object similar to
get /library/v1/books//{_id}.
-
I can
delete /library/v1/books//{_id} to delete a book from the collection. Returned will be 'delete successful' if
successful.
-
If I try to request a book that doesn't exist I will get a 'no book exists' message.
-
I can send
delete request to /library/v1/books/ to delete all books in the database. Returned will be 'complete delete successful'
if successful. For practical reasons the first book can't be deleted
Example Usage: