1.0.10 • Published 7 years ago

groove-api v1.0.10

Weekly downloads
37
License
MIT
Repository
github
Last release
7 years ago

GrooveHQ API (groove-api)

Node.js wrapper for Groove API (https://www.groovehq.com/docs)

Installation

npm install groove-api --save

Usage

var grooveClass = require('groove-api');
var groove = new grooveClass(YOUR_GROOVEHQ_ACCESS_TOKEN_HERE);

Supports promises

//Get all tickets for a specific customer
groove.getTickets(null, "customer_email@somedomain.com")
            .then(function (ticketsresult) {
                //success
                ...
            },
            function(err)
            {
              //error
              ...
            });

Also supports callbacks

//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
                ...
                });

Create a ticket example

groove.createTicket(ticketBodyText, "customer_email@somedomain.com", "our_admin_email@ourdomain.com")
                    .then(function (result) {
                        //success
                        ..
                    },function(err){
                        //error
                        ..
                    });

Currently the following methods are supported

  • GetTickets
  • GetTicket
  • GetMessages
  • CreateTicket
  • CreateMessage

See https://www.groovehq.com/docs for more info about each method.

Future work

  • Add all available API methods

by silveridea