Giter Club home page Giter Club logo

node-helpscout's Introduction

Help Scout API

A simple interface to the published Help Scout RESTful API

Installation

npm install node-helpscout

Example Usage

// one-liner
var HelpScout = new require('node-helpscout')([api_key]);
// or, the same, with a mailbox id
var HelpScout = new require('node-helpscout')([api_key], [mailbox_id]);
// or, reusable based upon needs
var HelpScout = require('node-helpscout');
var helpscout1 = new HelpScout([api_key]);
var helpscout2 = new HelpScout([api_key], [mailbox_id]);

API Key

See the Help Scout API documentation, specifically the section "Generating an API Key" to generate a proper api key for your user.

Mailbox ID

This is a numeral that represents the mailbox id in the Help Scout backend.

Multiple mailbox ID types

Be aware this is not the hex-based id you may see on their website, in URLs such as this: https://secure.helpscout.net/mailbox/fbb9cbecb6643fc1/

Correct mailbox ID discovery

If you cannot find the numeral-only id, click the gear icon within the mailbox, and choose "Edit Mailbox" to reach a URL similar to this: https://secure.helpscout.net/settings/mailbox/149162/

This shows the true numeral ID in this instance to be 149162.

Examples

Testing Framework Usage

var expect = require('expect.js'),
	HelpScout = require('..');

describe('helpscout', function() {

	var apiKey = Config.api_key,
		mailboxId = Config.mailbox_id;

	describe('list mailboxes', function() {

		it('should get a list of mailboxes', function(done) {

			var helpscout = new HelpScout(apiKey);

			helpscout.mailboxes.list(function(err, response) {

				if (err) return done(err);
				var res = JSON.parse(response);

				expect(res).to.be.ok();
				expect(res.items).to.be.an('array');

				done();

			});

		});

	});

});

Tests

npm test

node-helpscout's People

Contributors

supremetechnopriest avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-helpscout's Issues

Develop and Test support analytic endpoints

this may require getting on IRC with the helpscout guys. Not sure how far along they are. They said all they had to do was document the rest endpoints about 2 months ago...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.