Last active
January 4, 2016 18:48
-
-
Save jakeleboeuf/b7b414e00b756447ac9e to your computer and use it in GitHub Desktop.
Wartermarks Lab REST API call
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
watermarkslab.create({ | |
firstName: 'Jake', | |
lastName: 'LeBoeuf', | |
email: 'bob@example.com', | |
address: '123 Howle ave', | |
city: 'Charleson', | |
state: 'SC', | |
zip: '12345', | |
cust_id: '124j9jlkj12l4kj1lkjf', | |
websiteauth: 'iirowjfijweijwoefkjlsdkjf', | |
password: '1234pass', | |
}, function(err, account) { | |
// asynchronously called | |
if(!err) { | |
console.log(account.firstName); | |
} | |
}); | |
// Error message should look like this | |
error = { | |
status: 500, | |
message: 'Please provide a first name' | |
} | |
// Account Object should look like this | |
account = { | |
firstName: 'Jake', | |
lastName: 'LeBoeuf', | |
email: 'bob@example.com', | |
address: '123 Howle ave', | |
city: 'Charleson', | |
state: 'SC', | |
zip: '12345', | |
cust_id: '124j9jlkj12l4kj1lkjf', | |
websiteauth: 'iirowjfijweijwoefkjlsdkjf' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment