grnhse / greenhouse_io

Ruby API wrapper for Greenhouse.io API
MIT License
44 stars 46 forks source link

not seeing job descriptions #25

Closed MaxPleaner closed 7 years ago

MaxPleaner commented 7 years ago

I am using client.jobs(status: 'true') but the status: 'true' part doesn't seem to change anything.

job.keys
=> [:id,
 :name,
 :requisition_id,
 :notes,
 :status,
 :created_at,
 :opened_at,
 :closed_at,
 :departments,
 :offices,
 :hiring_team,
 :custom_fields,
 :openings]

This is using Harvester by the way

capablemonkey commented 7 years ago

Hi @MaxPleaner,

The GET /v1/jobs doesn't support filtering jobs by their status. See the available querystring options here: https://developers.greenhouse.io/harvest.html#list-jobs

In any case, to pass options in, you'd want to do so like this:

client.jobs(nil, per_page: 3)

The first parameter is the Job ID which we set to nil since we want to list all jobs. In this example, we set per_page to 3 to get 3 jobs per call.

Hope that helps!

MaxPleaner commented 7 years ago

thanks for your response.

I figured this out.

I first use .jobs to get an array of job listings. Then I send each of those ids to job_post to get the full text of the job listing.