@efounders/workable-client
Workable API node client
Last updated 3 years ago by efounders .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @efounders/workable-client 
SYNC missed versions from official npm registry.

Workable API Client

Motivation

This is a simple wrapper around the Workable API v3.

Installation

npm install @efounders/workable-client --save

Quick start

import Workable from '@efounders/workable-client';

// provide your workable access token to instantiate a workable client
const workable = Workable.client(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));
  });
});

Not using ES2015?

Import the module this way instead:

var Workable = require('@efounders/workable-client').default;

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.

Current Tags

  • 1.0.0-beta.3                                ...           latest (3 years ago)

4 Versions

  • 1.0.0-beta.3                                ...           3 years ago
  • 1.0.0-beta.2                                ...           4 years ago
  • 1.0.0-beta.1                                ...           4 years ago
  • 1.0.0-beta.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 4
This Month 4
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |