-
-
Notifications
You must be signed in to change notification settings - Fork 25
Notifications JavaScript
BL edited this page Dec 9, 2017
·
1 revision
export TRELLO_API_KEY=KEY
export TRELLO_OAUTH_TOKEN=TOKEN
Set your Trello Api Key and Trello Auth Token.
var Trello = require('trello-node-api')(TRELLO_API_KEY, TRELLO_OAUTH_TOKEN);
Trello.notification.search('NOTIFICATION_ID').then(function (response) {
console.log('response ', response);
}).catch(function (error) {
console.log('error', error);
});
Trello.notification.searchField('NOTIFICATION_ID', 'FIELD_NAME').then(function (response) {
console.log('response ', response);
}).catch(function (error) {
console.log('error', error);
});
var id = 'NOTIFICATION_ID'; // REQUIRED
var data = {
unread: false
};
Trello.notification.update(id, data).then(function (response) {
console.log('response ', response);
}).catch(function (error) {
console.log('error', error);
});