JSPM

groove-api

1.0.10
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q35816F
  • License MIT

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

Package Exports

  • groove-api

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (groove-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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