careerbuilder / ruby-cb-api

Ruby wrapper around the CareerBuilder.com APIs
Apache License 2.0
14 stars 18 forks source link

Job Api Call To Return a Hash Instead of Obj #263

Closed MajinFro closed 7 years ago

MajinFro commented 7 years ago

We much rather consume a hash than object for job.

ghost commented 7 years ago

If your going to make a breaking change you might as well follow the way we do all the other new style api calls and get rid of the criteria and models associated with the old one https://github.com/careerbuilder/ruby-cb-api/blob/master/lib/cb/clients/user_profile.rb https://github.com/careerbuilder/ruby-cb-api/blob/master/lib/cb/clients/job_insights.rb https://github.com/careerbuilder/ruby-cb-api/blob/master/lib/cb/clients/resume_insights.rb

Casao commented 7 years ago

https://github.com/careerbuilder/ruby-cb-api/blob/delasanga-jdp/lib/cb/models/implementations/job.rb https://github.com/careerbuilder/ruby-cb-api/blob/delasanga-jdp/lib/cb/responses/job/singular.rb

MajinFro commented 7 years ago

job is still being used by recommendations but i went ahead and deleted singular and added some tests to bump code coverage back up over the threshold.

Casao commented 7 years ago

The big change here is that Job Branding is no longer done implicitly by pulling job details -- when this gets integrated, you'll need to update job recommendations too if they use this model.

MajinFro commented 7 years ago

It should still be making it's own branding call since that is in the model. The rec service is using the model and branding call is made in the model.

https://github.com/careerbuilder/ruby-cb-api/blob/master/lib/cb/clients/recommendation.rb#L103

https://github.com/careerbuilder/ruby-cb-api/blob/master/lib/cb/models/implementations/job.rb#L112