springload/node-forecast-api

Name: node-forecast-api

Owner: Springload

Description: null

Forked from: inlight-media/node-forecast-api

Created: 2016-03-14 02:54:08.0

Updated: 2016-03-14 02:54:10.0

Pushed: 2014-08-20 02:44:46.0

Homepage: null

Size: 188

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Node Forecast API

A Forecast (https://forecastapp.com) API wrapper for Node.js.

Installation

Via npm:

m install forecast-api

Getting started

You will need a Forecast account, accountId and authorization token.

The easiest way to determine your accountId and authorization token is by logging in to Forecast from Google Chrome and using the web inspector > Network tab to see one of the request(s) being made.

Observe a request and note the accoundId and authorization from the request header.

Usage

Forecast = require('forecast-api');
forecast = new Forecast({
accountId: '12345',
authorization: 'Bearer 9876.-EXAMPLETOKEN'

People
cast.people(function(err, people) {
if (err) {
    throw err;
}
console.log(people);

Clients
cast.clients(function(err, clients) {
if (err) {
    throw err;
}
console.log(clients);

Projects
cast.projects(function(err, projects) {
if (err) {
    throw err;
}
console.log(projects);

Assignments

Assignments supports the following options (see below for more details):

options = {
startDate: new Date(),
endDate: new Date(2014, 11, 25)

cast.assignments(options, function(err, assignments) {
if (err) {
    throw err;
}
console.log(assignments);

Assignments can also be called without options and will use a default start and end date.

cast.assignments(function(err, assignments) {
if (err) {
    throw err;
}
console.log(assignments);

Milestones

Milestones supports the following options (see below for more details):

cast.milestones({ startDate: moment(), endDate: moment().add(5, 'days') }, function(err, milestones) {
if (err) {
    throw err;
}
console.log(milestones);

Milestones can also be called without options.

cast.milestones(function(err, milestones) {
if (err) {
    throw err;
}
console.log(milestones);

Options

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.