Skip to content

A little node lib for talking to v1 of the greenhouse.io API

Notifications You must be signed in to change notification settings

pkarl/greenhouseio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greenhouse.io API

This is a quick little module that provides basic support for the Greenhouse.io API. Some light error messages and configuration to help you along your way.

It's promise-based (uses request-promise), so .then away!

Installation

npm install greenhouseio

Usage

var GreenhouseIO = require('greenhouseio');

var gh = GreenhouseIO('your company name', 'your API key')

GET requests

gh.request('offices');
// returns `{"offices":[{"id":4322,"name":"Boston (HQ) ","departments":[{"id":7002...

gh.request('office', { id: params.id });

gh.request('departments').then(function(response) {
    res.send(response);
});

POST requests (applications)

// NOTE: if you're using express, you must configure it to process the form post body!
var bodyParser = require('body-parser');
var multer = require('multer');

var app = express();
app.use(bodyParser.urlencoded({ extended: false }));

// ...then create your gh instance
var gh = GreenhouseIO('your company name', 'your API key')

// then post away
gh.request('application', { postBody: req.body });

// NOTE: only active jobs can accept posted responses, log into your Greenhouse.io console to see your applications

Promises / thenables

// gh will always returns a thenable
var response = gh.request(...);
response.then(function(rsp) {
    // do a response thing
}).catch(function(err) {
    // do an error thing!
});

About

A little node lib for talking to v1 of the greenhouse.io API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published