A set of extensible REST web services to discover and track book prices on differents platforms.
#APIs
##Data Store APIs
GET
-> retrieve the books matching query/uri (the whole dataset if not). Returns:
[{
"isbn": "the ISBN-13 code of the book",
"title": "the book title",
"author": "Author Name",
"refs": [{
"source": "Amazon",
"price": 12.34,
"date": "2013-06-03T21:14:59.742Z",
"uri": "http://ebayBooks.com/books/123455"
}]
},{
}]
POST
-> add a new book to the collection. Data passed to the body must be like this:
{
"isbn": "the ISBN-13 code of the book",
"title": "the book title",
"author": "Author Name",
"refs": [{
"source": "Ebay",
"price": 12.34,
"date": "2013-06-03T21:14:59.742Z",
"uri": "http://ebayBooks.com/books/123455"
}]
}
PUT
-> not supportedDELETE
-> not supported
specify one or none of the parameters below:
uri
-> the uri of the description inside one of the platformsquery
-> plain text to search in the books metadata
GET
-> retrieve the book with the specified isbn. Returns a single item (as opposed to the /isbn resource)POST
-> not supportedPUT
-> update the book with the specified isbn. PUT data shoud be an objectDELETE
-> removed the specified book
no parameters available
GET
-> retrieve the book refs arrayPOST
-> add elements to the refs array. POST data should be an array of the form
[{
"source": "Ebay",
"price": 12.34,
"date": "2013-06-03T21:14:59.742Z"
"uri": "http://ebayBooks.com/books/123455"
},{
"source": "Amazon",
"price": 11.99,
"date": "2013-06-03T21:14:59.742Z"
"uri": "http://amazon.com/books/123455"
}]
PUT
-> not supportedDELETE
-> not supported
no parameters available
##Manager APIs
GET
-> retrieve the book objects
uri
-> the uri of the book
GET
-> retrieve the updated objects of the books specified by the isbns parameter
isbns
-> array of isbn of books to be updaited
##Core APIs
GET
-> retrieve the book Object/theArray of book Objects
Key | Description | Output |
---|---|---|
uri |
uri of the book description inside one of the platforms | book Object |
query |
plain text to search in the books metadata | Array of book Objects |
GET
-> retrieve the book Object given its isbn
#Details ##Platforms considered
- half ebay
- amazon
- google books
- itunes (work in progress)
##Technologies Built on top of node.js and mongodb, uses express to expose RESTfull APIs