Node.js wrapper for Groove API (https://www.groovehq.com/docs)
npm install groove-api --save
var grooveClass = require('groove-api');
var groove = new grooveClass(YOUR_GROOVEHQ_ACCESS_TOKEN_HERE);
//Get all tickets for a specific customer
groove.getTickets(null, "[email protected]")
.then(function (ticketsresult) {
//success
...
},
function(err)
{
//error
...
});
//Get all messages for a specific ticket (page 1, 50 messages per page)
groove.getMessages(someTicketId, 1, 50, function(err, messagesresult) {
if (err) {
//error
..
}
//success
...
});
groove.createTicket(ticketBodyText, "[email protected]", "[email protected]")
.then(function (result) {
//success
..
},function(err){
//error
..
});
- GetTickets
- GetTicket
- GetMessages
- CreateTicket
- CreateMessage
See https://www.groovehq.com/docs for more info about each method.
- Add all available API methods