groove-api

1.0.10 • Public • Published

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

Package Sidebar

Install

npm i groove-api

Weekly Downloads

1

Version

1.0.10

License

MIT

Last publish

Collaborators

  • silveridea