# node-trello

> Node wrapper for Trello's HTTP API.

Latest version **1.3.0** (published 2017-08-22) · 0 weekly downloads

## Install

```sh
npm install node-trello
pnpm add node-trello
yarn add node-trello
bun add node-trello
```

## 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 | 1.3.0 |
| Published | 2017-08-22 |
| First published | 2012-01-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10 |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 434 |
| Author | Luca Matteis |
| Maintainers | adunkman |
| Keywords | http, trello, api, web-service |

## Links

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

## Dependencies (2)

- [oauth](https://npm.io/package/oauth.md) ^0.9.15
- [request](https://npm.io/package/request.md) ^2.81.0

## 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

- 1.3.0 (latest) — 2017-08-22
- 1.2.1 — 2017-05-22
- 1.1.3 — 2017-05-22
- 1.1.2 — 2015-05-26
- 1.1.1 — 2015-03-29
- 1.1.0 — 2015-03-21
- 1.0.1 — 2014-11-02
- 1.0.0 — 2014-09-27
- 0.1.5 — 2014-04-26
- 0.1.4 — 2013-05-05
- 0.1.3 — 2012-12-15
- 0.1.2 — 2012-07-12
- 0.1.1 — 2012-06-28
- 0.1.0 — 2012-06-17
- 0.0.4 — 2012-06-10
- … 3 more at https://npm.io/package/node-trello/versions

## README

# Node wrapper for Trello’s HTTP API.
[![Build Status](https://travis-ci.org/adunkman/node-trello.png?branch=master)](https://travis-ci.org/adunkman/node-trello)

[View Trello’s API documentation online][apidocs].

[apidocs]: https://trello.com/docs/
[trellotrello]: https://trello.com/board/trello-public-api/4ed7e27fe6abb2517a21383d

## Install
```
npm install node-trello
```

### Getting your key and token
* [Generate your developer key][devkey] and supply it as the first constructor parameter.
* To read a user’s private information, get a token by directing them to `https://trello.com/1/connect?key=<PUBLIC_KEY>&name=MyApp&response_type=token` replacing, of course, &lt;PUBLIC_KEY&gt; with the public key obtained in the first step.
* If you never want the token to expire, include `&expiration=never` in the url from the previous step.
* If you need write access as well as read, `&scope=read,write` to the request for your user token.

[devkey]: https://trello.com/1/appKey/generate

## Example Code
### Fetching card data
```javascript
var Trello = require("node-trello");
var t = new Trello("<your key>", "<token>");

t.get("/1/members/me", function(err, data) {
  if (err) throw err;
  console.log(data);
});

// URL arguments are passed in as an object.
t.get("/1/members/me", { cards: "open" }, function(err, data) {
  if (err) throw err;
  console.log(data);
});
```

### Uploading attachments to a card
```javascript
var fs = require("fs");
var path = require("path");
var Trello = require("node-trello");
var t = new Trello("<your key>", "<token>");

var cardId = "<the card id>";
var pathToFile = path.resolve(__dirname, "/path/to/file.doc");

t.post("/1/cards/" + cardId + "/attachments", { attachment: fs.createReadStream(pathToFile) }, function (err, attachments) {
  if (err) throw err;
  console.log(attachments);
})
```

## License

Released under [MIT](https://github.com/adunkman/node-trello/blob/master/LICENSE.md).

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