flowfact - a node.js interface to the Flowfact API
About
Connect to the Flowfact REST API with node.js
Table of contents
Usage
Installation
$ npm install flowfact
In order to authenticate, set the following environment variable
FLOWFACT_URL=flowfact://username:password@contractId
IMPORTANT: Docs are outdated, will soon update
Example
var flowfact = ; flowfact
API
All methods return promises, handle them accordingly.
User methods
getUsers()
Fetch a list of availible users.
flowfact
getUser(userId)
Fetch the user with id userId.
flowfact
getUserContacts(userId)
Fetch a list of contacts for user with id userId.
flowfact
getUserActivities(userId)
Fetch a list of activities for user with id userId.
flowfact
Company methods
getCompany()
Fetch company details.
flowfact
getCompanyQuota()
Fetch company quota information.
flowfact
Estate methods
getEstates(userId)
Fetch a list of estates by userId.
flowfact
getEstate(userId, estateId)
Fetch details of estate.
flowfact
Tests
Tests are run by mocha. They assume environment variable FLOWFACT_URL
to be availible.
$ make test
Contribute
Feel free to fork and pullrequest the hell out of this project :) Make sure all tests pass, or else...
License
The MIT License (MIT)
Copyright (c) 2015 Christian Taepper
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.