Manipulating Documents RESTfully

In the first half of this chapter, you developed APIs for discovering and returning books based on a variety of search criteria. In this second half, you’ll be creating APIs for manipulating book bundles. Recall that a book bundle has a name and maintains a collection of related books.

Here’s an example of a book bundle:

​ {
​  ​"name"​: ​"light reading"​,
​  ​"books"​: [{
​  ​"id"​: ​"pg132"​,
​  ​"title"​: ​"The Art of War"​
​  },{
​  ​"id"​: ​"pg2680"​,
​  ​"title"​: ​"Meditations"​,
​  },{
​  ​"id"​: ​"pg6456"​,
​  ​"title"​: ​"Public Opinion"​
​  }]
​ }

Creating these APIs will be programmatically more intensive than ...

Get Node.js 8 the Right Way now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.