Class: Ashby::Applications
Overview
Ashby::Applications provides access to job application-related operations via the Ashby API.
Supported functionality includes:
- Retrieving a paginated list of all applications
- Fetching a specific application by its ID
Example usage:
Ashby::Applications.all
Ashby::Applications.find_by_id(id: 'app_abc123')
Constant Summary
Constants inherited from Client
Class Method Summary collapse
-
.all(payload = {}) ⇒ Object
Fetches all openings with pagination support.
-
.find_by_id(id: nil, expand: '') ⇒ Object
Finds an opening by its Ashby ID.
Methods inherited from Client
build_url, headers, paginated_post, post
Class Method Details
.all(payload = {}) ⇒ Object
Fetches all openings with pagination support
16 17 18 |
# File 'lib/ashby/applications.rb', line 16 def self.all(payload = {}) paginated_post('application.list', payload) end |
.find_by_id(id: nil, expand: '') ⇒ Object
Finds an opening by its Ashby ID
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ashby/applications.rb', line 21 def self.find_by_id(id: nil, expand: '') raise ArgumentError, 'Application ID is required' if id.to_s.strip.empty? payload = { applicationId: id, expand: .strip.empty? ? [] : [] } response = post('application.info', payload) response['results'] end |