-
Notifications
You must be signed in to change notification settings - Fork 1
Home
The Tic-Tac Mobile Software Development Kit for JavaScript designed to provide an easy interface to communicate with Tic-Tac Mobile REST API in order to develop integrations with Tic-Tac Mobile. SDK relies on Promises to simplify handling of the asynchronous requests to the API endpoints.
- Make http requests from node.js
- Supports the Promise API
- Automatic converts response data from XML to JSON
- Descriptive error messages with status codes
To use Tic-Tac Mobile JavaScript SDK, you need Node.js v6.4.0 or above.
npm install tic-tac-js-sdk
To authorize the API calls, create the instance of APIConsumer. Pass you Tic-Tac Mobile API access token as parameter. You can use token saved as environment variable or pass it as argument on npm start :
const token = process.env.API_TOKEN || args
const consumer = new APIConsumer(token)
Then use any of available methods to call the API endpoints. SDK are Promise-based, so, it is easy to handle successful and failed requests:
consumer.getUsers().then( // Handle data).catch( // Expose error)
List of 27 methods available, grouped by endpoints they making calls to:
- getUsers()
- getUser()
- addUser()
- getProjects()
- getProjectsWithBudget()
- getProjectsWithMembers()
- getProjectsWithBudgetAndMembers()
- addProject()
- getUtilizations()
- getPriceLists()
- getInvoices()
- getInvoicesForProject()
- getNormalTimes()
- getNormalTime()
- getUsersReports()
- getOneUserReports()
- getProjectReports()
- getTimePlans()
- getTimePlansForProject()
- getUserTimePlans()
- getUserTimePlansForProject()
- getTimePlansSelected()
- getEntries()
- getEntriesWithBudget()
- getProjectEntries()
- getProjectEntriesWithBudget()
- addEntry()