/workable

Simple workable.com API wrapper

Primary LanguageRubyMIT LicenseMIT

Workable

Code Climate Build Status Coverage Status Gem Version Dependency Status

Dead-simple Ruby API client for workable.com. No extra runtime dependencies. Ruby >= 1.9.3.

Uses v2 API provided by workable.

Installation

Add this line to your application's Gemfile:

gem 'workable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install workable

Usage

Internal interface / api is in early stage, so far you can:

  • fetch jobs
  • fetch job details
  • fetch candidates for given job

Example:

client = Workable::Client.new(api_key: 'api_key', subdomain: 'your_subdomain')

# takes optional phase argument (string): 'published' (default), 'draft', 'closed' or 'archived'
client.jobs # => [#<Workable::Job>, #<Workable::Job>]

shortcode = 'job_shortcode'

# API queries are not cached (at all) - it's up to you to cache results one way or another

client.job_details(shortcode) # => #<Workable::Job>
client.job_candidates(shortcode) # => Array of hashes

# Possible errors (each one inherits from Workable::Errors::WorkableError)
Workable::Errors::InvalidConfiguration # missing api_key / subdomain
Workable::Errors::NotAuthorized # wrong api key
Workable::Errors::InvalidResponse # something when wrong during the request?
Workable::Errors::NotFound # 404 from workable

Missing/Todo

Pull requests are welcomed. So far this gem does not provide:

  • candidates import
  • some sane way for parsing candidates json response

(Personally I don't really need/use it)

Contributing

  1. Fork it ( https://github.com/emq/workable/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request