Skip to content

Instantly share code, notes, and snippets.

@stephendeyoung
Last active May 22, 2017 10:05
Show Gist options
  • Save stephendeyoung/4e7eb00c211de7e4c47a7a8e5809a2e9 to your computer and use it in GitHub Desktop.
Save stephendeyoung/4e7eb00c211de7e4c47a7a8e5809a2e9 to your computer and use it in GitHub Desktop.
/*
(c) Copyright Reserved EVRYTHNG Limited 2016. All rights reserved.
Use of this material is subject to license.
Copying and unauthorised use of this material strictly prohibited.
*/
const evtClient = new EVT.TrustedApp(apiKey);
function onThngPropertiesChanged(event) {
console.log('Running onThngPropertiesChanged');
evtClient.thng('UDhdsNDnAYNC52aBEQM2rrWm').action('_custom').create({
customFields: {
test2: true
}
}).catch(err => console.log('got error from rule script: ', err));
}
exports.onThngPropertiesChanged = onThngPropertiesChanged;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment