1.0.1 • Published 7 years ago

snrest v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

sn-rest

NodeJS Rest-Client for Service-Now

Sample Usage

var snRest = require('sn-rest');
var $sn = snRest({
  'host': 'demo01.service-now.com',
  'user': 'admin',
  'pass': 'admin'
});
$sn('incident').getRecord('216930c737bf5600dce1c2f954990eb6', function(error, result) {
  if(error) {
    console.log(error);
    return;
  }
  //result is always an array of objects
  console.log('result-length: ' + result.length);
  console.log('caller_id: ' + result[0].caller_id);

  //Simple dotWalking
  result[0].caller_id.dotWalk('sys_user', function(err, result) {
    console.log('caller_name: ' + result[0].name);
  });
});
1.0.1

7 years ago

1.0.0

7 years ago