Javascript API Wrapper for Validic. It includes the following functionality:
Install it yourself as:
$ npm install validic
First, instantiate the client.
varvalidic=require('validic');varapi_url: ='https://api.validic.com',varapi_version: ='v1',varaccess_token: ='ORGANIZATION_ACCESS_TOKEN',varorganization_id: ='ORGANIZATION_ID'varclient=newvalidic(api_url,api_version,access_token,organization_id).client;Now you can use the wrapper's helper methods to interface with the Validic API.
# Getcurrentorganizationmetadataclient.organizations.get_organization(options,callback);When your requests return an object they are returned as a Validic Response object. The Validic Response typically includes summary metadata and an array of record objects. All resonse objects are retreived in the response parameter of the callback.
client.routine.get_routine({},function(response){});You can pass a hash of options to calls that fetch data.
client.routine.get_routine({start_date: '2015-01-01T00:00:00+00:00'},callback);