unanet-client

Unanet client.

npm install unanet-client
1 downloads in the last week
4 downloads in the last month

A Unanet time sheet client

var unanet = require('unanet-client');

var opts = {
  userName: 'username',
  password: 'password',
  url: 'url to timesheet'
};

return unanet.getActiveTimesheets(opts, function(err, timesheets) {
  if (err) {
    return console.error('could not get timesheets', err);
  }
  console.log(timesheets);

  return unanet.getTimesheet(timesheets[0].id, opts, function(err, timesheet) {
    if (err) {
      return console.error('could not get timesheet', err);
    }
    return console.log(JSON.stringify(timesheet, null, 2));
  });
});
npm loves you