New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

greenhouseio

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

greenhouseio

A little library for talking to the Greenhouse.io API

latest
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

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!
});

Keywords

greenhouse

FAQs

Package last updated on 11 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts