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.
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
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
# V1 jobs search
client.jobs.search(criteria)
# V2 resume creation
client.resumes.create(criteria)
# V2 resume parsing
client.resumes.parse(file_path)
# 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)
# V2 Registered Application
client.applications.registered({JobDID: 'WDCCCCCCCCCCCCCCCCCC',
ExternalUserID: 'WDDDDDDDDDDDDDDDDDDD',
ExternalResumeID: 'WDEEEEEEEEEEEEEEEEEE'})
- Rebuild with middleware pattern (Q4 2014 - Q1 2015)