# workamajig

> Node Request-based API wrapper for the Workamajig API

Latest version **0.0.1** (published 2016-12-15) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install workamajig
pnpm add workamajig
yarn add workamajig
bun add workamajig
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-12-15 |
| First published | 2016-12-15 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= v0.10.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+5 in 2 direct dependencies) |
| Install scripts | no |
| Author | Asymmetrik Ltd. |
| Maintainers | byoung-asymmetrik |
| Keywords | workamajig, project management, rest, api |

## Links

- npm: https://www.npmjs.com/package/workamajig
- Repository: https://github.com/Asymmetrik/workamajig-node
- Homepage: https://github.com/Asymmetrik/workamajig-node#readme
- Issues: https://github.com/Asymmetrik/workamajig-node/issues
- npm.io page: https://npm.io/package/workamajig

## Dependencies (5)

- [qs](https://npm.io/package/qs.md) ^2.4.2
- [request](https://npm.io/package/request.md) ^2.79.0
- [bluebird](https://npm.io/package/bluebird.md) ^2.10.2
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.0
- [lodash.isplainobject](https://npm.io/package/lodash.isplainobject.md) ^4.0.6

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2016-12-15

## README

##A Node Request-based API wrapper for the Workamajig API

*Props to [stripe.js](https://github.com/stripe/stripe-node) for the general structure of this module.*

###Installation
```
npm install workamajig --save
```

###Documentation

See http://help.workamajig.com/api-overview for API documentation.

###Configuration

Pass in a config object with the required params:
```
var workamajig = require('workamajig')({
  host        : WORKAMAJIG_CLIENT_URL,
  version     : WORKAMAJIG_API_VERSION,
  accessToken : WORKAMAJIG_ACCESS_TOKEN,
  userToken   : WORKAMAJIG_USER_TOKEN,
});
```

###API Overview

Every resource is accessed via your workamajig instance:
```
// workamajig.{ RESOURCE_NAME }.{ METHOD_NAME }
```

Every resource method accepts an optional callback as the last argument:
```
workamajig.projects.create(
  { someFoo: 'bar' },
  function(err, project) {
      err; // null if no error occurred
      project; // the created project object
  }
);
```

Additionally, every resource method returns a promise, so you don't have to use the regular callback, E.g.
```
// Create a new project and then a new task for that project:
workamajig.projects.create({
  someFoo: 'bar'
  }).then(function(project) {
    workamajig.task.create(project.id, {
      someTask: 'taskFoo'
    });
  }).then(function(task) {
    // Task created on the project
  }).catch(function(err){
    // Handle some error
  });
```

###Available resources & methods

Params are passed as plain JavaScript object, e.g. ```{ someFoo: 'bar' }```

- activities
- contacts
- opportunities
- projects
- services
- tasks
- timesheets
- todos
- users

###Development

Run all tests:
```
$ npm install
$ npm test
```

Run a single test suite:
```
$ npm run mocha -- test/Error.spec.js
```

### Example project

There is a simple example project under ```/example```. To run the project,
from the root directory, copy ```config.env.example``` to ```config.env``` and
edit the file to add your host, version, access and user tokens. Then, run:
```
$ node ./example/index.js
```

---
_Source: https://npm.io/package/workamajig · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
