Skip to content

rwojsznis/workable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.stages # => Array of hashes
client.job_details(shortcode)   # => #<Workable::Job>
client.job_questions(shortcode) # => Array of hashes
client.job_candidates(shortcode, stage_slug) # => Array of hashes (skip stage_slug for all stages)

# 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
Workable::Errors::RequestToLong   # When the requested result takes to long to calculate, try limiting your query

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

About

Simple workable.com API wrapper

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages