# crp-job-client

> CrowdProcess Job Client

Latest version **2.0.9** (published 2014-06-06) · 0 weekly downloads

## Install

```sh
npm install crp-job-client
pnpm add crp-job-client
yarn add crp-job-client
bun add crp-job-client
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.9 |
| Published | 2014-06-06 |
| First published | 2013-07-04 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | pgte, joaojeronimo, soarez |

## Links

- npm: https://www.npmjs.com/package/crp-job-client
- Repository: https://github.com/CrowdProcess/crp-job-client
- Issues: https://github.com/CrowdProcess/crp-job-client/issues
- npm.io page: https://npm.io/package/crp-job-client

## Dependencies (2)

- [hyperquest](https://npm.io/package/hyperquest.md) ~0.3.0
- [stream2buffer](https://npm.io/package/stream2buffer.md) ~0.0.4

## Recent versions

- 2.0.9 (latest) — 2014-06-06
- 2.0.8 — 2014-06-06
- 2.0.7 — 2014-05-27
- 2.0.6 — 2014-04-28
- 2.0.5 — 2014-04-28
- 2.0.4 — 2013-12-12
- 2.0.2 — 2013-12-11
- 2.0.1 — 2013-12-11
- 2.0.0 — 2013-12-11
- 0.0.1 — 2013-07-04

## README

# CrowdProcess Job Client

Basic CRUD for CrowdProcess Jobs

## Getting it

    $ # install it with
    $ npm install --save crp-job-client

```javascript
// require it
var Client = require('crp-account-client');

// initiallize it with a username and password
var jobs = Client({
  email: 'my@email.com',
  password: 'a safe password'
});

// Or with a token
var jobs = Client({
  token: 'bb74a721-1728-45fe-8394-2d3ef4e0ac82'
});
```

You can get your authentication tokens with the
[account client](https://github.com/CrowdProcess/crp-account-client#obtaining-a-token).

## Create a Job

```javascript
var job = {
  program: "function Run (d) { return 3*d; }"
};

var jobId; // we'll use this on the next code block
jobs.create(job, function (err, res) {
  if (err)
    return console.log('not found :(');

  jobId = res.id;
});
```

## View the job

```javascript
// remember jobId from the last code block ?
jobs(jobId).show(function (err, job) {
  if (err)
    return console.log('not found :(');

  console.log(job);
});
```

## List all the jobs

```javascript
jobs.list(function (err, jobList) {
  if (err)
    return console.log('Something went terribly wrong');

  console.log(jobList); // it's an array of objects just like the one you got on jobs(jobId).show()
});
```

## Delete a job

```javascript
jobs(jobId).destroy(function (err) {
  if (err)
    console.log('cannot find the job');
});
```

## Delete all your jobs

```javascript
jobs.purge(function (err) {
  if (err)
    console.log('something went terribly wrong');
});
```

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