careerbuilder / ruby-cb-api

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

Recommendations client #266

Closed Casao closed 7 years ago

Casao commented 7 years ago

Adds new client to return User and Job recommendations in a hash with the recid (and other metadata). We need this RecID field to start doing NDCG on recs calls.

Done side by side with existing code (which is in the poorly name Recommendation class) for a transition and to avoid the major version bump.

Casao commented 7 years ago

CC is for identical code (this started as a copy paste code). The old code will eventually be removed, so I don't see any point in changing this code to appease the CC gods, and I don't see any value in refactoring to make these private methods available to both.

tkling commented 7 years ago

:thumbsup: LGTM. I dig the side-by-siding to avoid the major bump for now!

Casao commented 7 years ago

@tkling updated with Map, and added spec for single hash result (since i didn't get what the stupid [].flatten was doing at first and nearly removed it)

tkling commented 7 years ago

@Casao :thumbsup: :thumbsup: mergin'