ryanlecompte / letsfreckle-client

Ruby client for the Let's Freckle API (http://www.letsfreckle.com)
MIT License
16 stars 10 forks source link

implemented find project by ID #5

Closed spikegrobstein closed 11 years ago

spikegrobstein commented 11 years ago

Added Project#find function which, given a project_id, returns that project.

Included test for the new function.

Dependent on this feature was the ability to specify that the ClientResource#get a single item as opposed to a collection. I wasn't able to figure out how to get it to detect it, so I added a :single flag to the #get function. Given this flag, it creates a single object (eg: LetsFreckle::Project when calling LetsFreckle::Project#find. If you know of a better, way, I'm down with that as this method feels a little heavy.

ryanlecompte commented 11 years ago

This looks great. Thanks, @spikegrobstein !