Giter Site home page Giter Site logo

forecast-promise's Introduction

Node Forecast promise API

CircleCI codecov npm version

A Forecast (https://forecastapp.com) API wrapper for Node.js. Forked from inlight-media/node-forecast-api.

Installation

Via npm:

$ npm install --save forecast-promise

Getting started

You will need a Forecast account, accountId and personal access token.

To find your accountId and generate the token, log into Forecast and go to Developers, then click Create New Personal Access Token.

Usage

const Forecast = require('forecast-promise');
const forecast = new Forecast({
	accountId: '12345',
	token: '54321.abc.1-EXAMPLETOKEN',
});

WhoAmI

forecast.whoAmI().then(user => {
	console.log(user);
});

People

forecast.people().then(people => {
	console.log(people);
});

Clients

forecast.clients().then(clients => {
	console.log(clients);
});

Projects

forecast.projects().then(projects => {
	console.log(projects);
});

Roles

forecast.roles().then(roles => {
	console.log(roles);
});

Assignments

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

  • startDate
  • endDate
var options = {
	startDate: new Date(),
	endDate: new Date(2018, 11, 25),
};
forecast.assignments(options).then(assignments => {
	console.log(assignments);
});

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

forecast.assignments().then(assignments => {
	console.log(assignments);
});

Milestones

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

  • startDate
  • endDate
var options = {
	startDate: new Date(),
	endDate: new Date(2018, 11, 25),
};
forecast.milestones(options).then(milestones => {
	console.log(milestones);
});

Milestones can also be called without options.

forecast.milestones().then(milestones => {
	console.log(milestones);
});

Options

  • startDate - a native date object, a moment.js date object or an ISO-8601 compatible date string.
  • endDate - a native date object, a moment.js date object or an ISO-8601 compatible date string.

forecast-promise's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.