Created
November 11, 2013 14:32
-
-
Save flrent/7414020 to your computer and use it in GitHub Desktop.
Post a ticket to uservoice with node
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
var UserVoice = require('uservoice'); | |
var uservoiceRequest = new UserVoice(CONSUMER_KEY, CONSUMER_SECRET, ACCOUNT_SUBDOMAIN); | |
var data = { | |
email: contact.email, | |
ticket: { | |
subject:'Subject', | |
message: "Message", | |
referrer: 'refferer' | |
} | |
}; | |
uservoiceRequest.post({ | |
url:"tickets.json", | |
data:data | |
}, function (err, ticketsResp) { | |
if (err) { | |
console.log(err); | |
} | |
return console.log(ticketsResp); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment