Created
June 27, 2016 23:02
-
-
Save easherma/7f8f2121a187803c7acc77065ebac16b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//npm install knackhq-client | |
var knack = require('knackhq-client'); | |
knack.authenticate({ apikey: 'edc09ff0-3cb5-11e6-a5db-e797893261f8', appid: '5771a671b3a24ed73cac0a5a' }, function(error) { | |
if (error) { | |
// failed to log in! | |
} | |
}); | |
knack.create_record({ object_key: 'object_1', body: { | |
field_1: 'api_test', | |
field_2: '32', | |
field_3: 'this probably wont work' | |
} }, function(error, data) { | |
console.log(data) | |
// should have an error here if there was a problem, or the record data in the data object if the add was successful | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment