O'Reilly logo

Node.js 8 the Right Way by Jim Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 creating the search APIs because they require more back-and-forth between your Node.js service and the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required