JavaScript Api Library

A Javascript module for communication with the CommonSense API.

Architecture

The senseapi.js uses the module pattern to create a SenseApi object that handles communication with the CommonSense API, much the same way jquery creates a jquery object just by including jquery.js.

  • It stores session information in its internal state.
  • It offers a function call for every API call.
  • It allows access to the raw response status, headers and body received from CommonSense. As the CommonSense API uses json as its default data format, converting this to JavaScript objects is trivial.

Getting Started

To get started just:

Further reading

For more information, see the documentation. Also, see the test_senseapi.js file for example code.