1.1.0 • Published 7 years ago

tickspotv2-api v1.1.0

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

tickspotv2-api

Installation

npm install tickspotv2-api

Usage

First, create a new Tickspot object (username and password are only required for getting roles).

var Tickspot = require('tickspotv2-api');

var tick = new Tickspot('User-Agent', subscriptionID, 'token', 'username', 'password');

This object can then be used for any of the Tickspot APIs endpoints.

tick.getProjects(function (error, projects) {
    if(!error) {
        console.log(projects);
    }
});

All the methods are promise-based, which means that you can also use them like:

tick.getProjects()
    .then(function (projects) {
        console.log(projects);
    })
    .catch(function (error) {
        console.log(error);
    });

Or, if you're using Node.js 7's async/await:

try {
    const projects = await tick.getProjects();
    console.log(projects);
} catch(error) {
    console.log(error);
}

Methods

For information about data formatting please refer to Tick V2 API.

Clients

Entries

Some of these methods takes a query parameter, which should have the following syntax:

var query = {
    start_date: '2016-01-01',
    end_date: '2016-02-01',
    billable: true,
    project_id: 20
}

Projects

A page query can be specified in the options as so:

var options = {
    page: 2 // Default is 1
}

Roles

NOTE: This requires username and password to be set

Tasks

Users

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago