Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 887 Bytes

readme.md

File metadata and controls

29 lines (25 loc) · 887 Bytes

JSONAPI Parser

var parser = require('jsonapi-parserinator'),
  options = {
    endpoint: '/api/bikes',
    includes: ['item', 'list']
  },
  data;

parser
  .setHost({
    api_root: 'yourapi.com',
    api_version: 'v0.1'
  })
  .get(options, function (apiData) {
    data = apiData;
    var parsedData = parser.parse(data);
    console.log(parsedData);
  });

Parserinator

At NYPL we have been adding the -inator suffix to our applications. Check out

This JSONAPI parser is based on an AngularJS JSONAPI parser which was used for the Staffinator, except that this is a node module with the intent to use it for many different Javascript frameworks and not just AngularJS.