Skip to content

eFounders/efounders-workable-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workable API Client

Motivation

This is a simple wrapper around the Workable API v3.

Installation

npm install @efounders/workable-client --save

Quick start

const Workable = require('@efounders/workable-client');

// provide your workable access token to instantiate a workable client
const workable = new Workable(process.env.WORKABLE_ACCESS_TOKEN);
// lists all the accounts you have access to
workable.accounts().list().then(({ accounts }) => {
  const [{ subdomain }] = accounts;
  const account = workable.accounts(subdomain);
  // lists every members of the first account
  account.members().list().then(({ members }) => {
    members.forEach((member) => console.log(member.name));
  });
});

Running the example

git clone https://github.com/eFounders/efounders-workable-client.git
cd efounders-workable-client/example
npm install
WORKABLE_ACCESS_TOKEN=YOUR_TOKEN npm start

Usage overview

Every API endpoint maps to a method on the workable client. Each method returns a Promise that resolves to the JSON parsed from the returned response. For paginated responses such as jobs listing or candidates listing, there's also an additional helper method to handle pagination and return all results in a single call.

Methods list

workable.accounts().list()

workable.accounts(subdomain).members().list()

workable.accounts(subdomain).recruiters().list()

workable.accounts(subdomain).stages().list()

workable.accounts(subdomain).jobs().list()

workable.accounts(subdomain).jobs().listAll()

workable.accounts(subdomain).jobs(shortcode).info()

workable.accounts(subdomain).jobs(shortcode).questions().list()

workable.accounts(subdomain).jobs(shortcode).members().list()

workable.accounts(subdomain).jobs(shortcode).recruiters().list()

workable.accounts(subdomain).jobs(shortcode).candidates().list()

workable.accounts(subdomain).jobs(shortcode).candidates().listAll()

workable.accounts(subdomain).jobs(shortcode).candidates(id).info()

workable.accounts(subdomain).jobs(shortcode).candidates().create()

workable.accounts(subdomain).jobs(shortcode).applicationForm().info()

Copyright

Copyright © eFounders MIT License; see LICENSE for further details.

Releases

No releases published

Packages

No packages published