springload/node-harvest

Name: node-harvest

Owner: Springload

Description: Node.js Client API for the Harvest time tracking service

Forked from: simplyspoke/node-harvest

Created: 2015-11-19 20:54:33.0

Updated: 2017-07-03 00:04:24.0

Pushed: 2016-06-11 21:48:18.0

Homepage: null

Size: 106

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Coverage Status npm version

Harvest is a tool that enables businesses to track time, track projects, manage clients, and invoice. This is a full client API built using node.js.

Install

npm install harvest

Usage

var Harvest = require('harvest'),
    harvest = new Harvest({
        subdomain: config.harvest.subdomain,
        email: config.harvest.email,
        password: config.harvest.password
    }),
    TimeTracking = harvest.TimeTracking;

TimeTracking.daily({}, function(err, tasks) {
    if (err) throw new Error(err);

// work with tasks
});

Testing

In order to test you will need to create a config file that uses your credentials inside config/default.json

{
  "harvest": {
    "subdomain": "...",
    "email": "...",
    "password": "...",
    "identifier": "...",
    "secret": "...",
    "user_agent": "node-harvest test runner"
  }
}

This API is designed to work either using HTTP Basic authentication, or OAuth so either set of credentials will work. Subdomain is always required.

Running the tests
npm test

# or

mocha
Projects using this library

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.