Skip to content

cb-talent-development/cb-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cb-client

CB-Client is a light-weight Ruby wrapper for CareerBuilder APIs built according to PLA. Requests are parsed into hashes with native keys.

For a ruby client with greater API coverage and more pre/post processing niceties see ruby-cb-api.

Configuration

The library may be configured globally or on a per-instance basis.

# Configure global defaults for all client instances
CB.configure do |config|
  config.developer_key = 'WDAAAAAAAAAAAAAAAAAA'
  config.debug = true
end

# Construct a new client with the abovementioned defaults
default_client = CB::Client.new

# Construct a new client with a different developer key
client = CB::Client.new(developer_key: 'WDBBBBBBBBBBBBBBBBBB')

Configuration Options

  • developer_key (Required) - CareerBuilder developer key for API access
  • client - Which Faraday adapter to use
  • api_host - API Base URL
  • debug - Whether to pass Test = true to the API

Additionally, several environmental variables may be used to override all configuration:

CB_DEBUG, CB_API_HOST

Response Object

All requests return a CB::Client::Response instance

  • raw Original Faraday response object
  • success? Whether the request was a success or contained errors
  • body Parsed response body

Jobs

# V1 jobs search
client.jobs.search(criteria)

Resumes

# V2 resume creation
client.resumes.create(criteria)

# V2 resume parsing
client.resumes.parse(file_path)

Users

# V2 Existence check
client.users.check_existing(email, password)

# V1 Generate temporary password
client.users.temporary_password(external_id)

# V2 Retrieve user information
client.users.retrieve(external_id)

# V2 Change password
client.users.change_password(external_id, old_password, new_password)

# V2 Delete
client.users.delete(external_id)

Applications

# V2 Registered Application
client.applications.registered({JobDID:           'WDCCCCCCCCCCCCCCCCCC',
                                ExternalUserID:   'WDDDDDDDDDDDDDDDDDDD',
                                ExternalResumeID: 'WDEEEEEEEEEEEEEEEEEE'})

Future

  • Rebuild with middleware pattern (Q4 2014 - Q1 2015)

About

A Ruby Wrapper for CareerBuilder APIs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages