This is a simple wrapper around the Workable API v3.
npm install @efounders/workable-client --save
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));
});
});
git clone https://github.com/eFounders/efounders-workable-client.git
cd efounders-workable-client/example
npm install
WORKABLE_ACCESS_TOKEN=YOUR_TOKEN npm start
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.
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 © eFounders MIT License; see LICENSE for further details.