kg

1.0.0 • Public • Published

KG

Request-based wrapper around Google's Knowledge Graph HTTP API

Example

var kg = new KG('<YR API KEY>')
kg.search({
  query    : 'Crazy Town',
  types    : 'MusicGroup',
  limit    : 1,
  callback : function(error, result) {
    Assert.equal(error, null);
    var wikipediaUrl = result.itemListElement[0].result.detailedDescription.url;
    Assert.equal(wikipediaUrl, 'http://en.wikipedia.org/wiki/Crazy_Town')
  }
});

Readme

Keywords

none

Package Sidebar

Install

npm i kg

Weekly Downloads

7

Version

1.0.0

License

substanceware

Last publish

Collaborators

  • stephenhandley