-
-
Notifications
You must be signed in to change notification settings - Fork 24
Checklists JavaScript
BL edited this page Dec 9, 2017
·
1 revision
export TRELLO_API_KEY=KEY
export TRELLO_OAUTH_TOKEN=TOKENSet your Trello Api Key and Trello Auth Token.
var Trello = require('trello-node-api')(TRELLO_API_KEY, TRELLO_OAUTH_TOKEN); var data = {
idCard: 'CARD_ID', // REQUIRED
name: 'CHECKLIST_NAME',
pos: 1
};
Trello.checklist.create(data).then(function (response) {
console.log('response ', response);
}).catch(function (error) {
console.log('error', error);
}); Trello.checklist.search('CHECKLIST_ID').then(function (response) {
console.log('response ', response);
}).catch(function (error) {
console.log('error', error);
}); Trello.checklist.searchField('CHECKLIST_ID', 'FIELD_NAME').then(function (response) {
console.log('response ', response);
}).catch(function (error) {
console.log('error', error);
}); var id = 'CHECKLIST_ID'; // REQUIRED
var data = {
name: 'CHECKLIST_NAME',
pos: 'top'
};
Trello.checklist.update(id, data).then(function (response) {
console.log('response ', response);
}).catch(function (error) {
console.log('error', error);
}); Trello.checklist.del('CHECKLIST_ID').then(function (response) {
console.log('response ', response);
}).catch(function (error) {
console.log('error', error);
});