Node wrapper for Trello's HTTP API.
npm install node-trello[View Trello’s API documentation online][apidocs].
[apidocs]: https://trello.com/docs/
[trellotrello]: https://trello.com/board/trello-public-api/4ed7e27fe6abb2517a21383d
npm install node-trello
`$3
* [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= replacing, of course, <PUBLIC_KEY> 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
$3
`javascript
var Trello = require("node-trello");
var t = new Trello("", "");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);
});
`$3
`javascript
var fs = require("fs");
var path = require("path");
var Trello = require("node-trello");
var t = new Trello("", "");var cardId = "";
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);
})
``Released under MIT.