Module: Brocktail::Behavior::Crud
- Included in:
- API::Acts, API::Events
- Defined in:
- lib/brocktail/behavior/crud.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
5 6 7 8 |
# File 'lib/brocktail/behavior/crud.rb', line 5 def all response = request(:get, credentials, api_model.api_path) api_model.parse(response.body) end |
#find(id) ⇒ Object
10 11 12 13 |
# File 'lib/brocktail/behavior/crud.rb', line 10 def find(id) response = request(:get, credentials, "#{api_model.api_path}/#{id}") api_model.parse(response.body, :singular => true) end |