Method: Camper::Client::TodosAPI#todo
- Defined in:
- lib/camper/api/todos.rb
#todo(parent, id) ⇒ Resource
Get a todo with a given id using a particular parent resource.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/camper/api/todos.rb', line 48 def todo(parent, id) bucket_id = parent if parent.is_a? Camper::Project bucket_id = parent.id elsif parent.respond_to?(:type) bucket_id = parent.bucket.id end get("/buckets/#{bucket_id}/todos/#{id}") end |