Class: Barge::Resource::Image
- Inherits:
-
Object
- Object
- Barge::Resource::Image
- Includes:
- Base
- Defined in:
- lib/barge/resource/image.rb
Constant Summary
Constants included from Base
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
- #all(options = {}) ⇒ Object
- #destroy(image_id) ⇒ Object
- #show(image_id) ⇒ Object
- #show_action(image_id, action_id) ⇒ Object
- #transfer(image_id, options) ⇒ Object
- #update(image_id, options) ⇒ Object
Methods included from Base
Instance Method Details
#all(options = {}) ⇒ Object
6 7 8 |
# File 'lib/barge/resource/image.rb', line 6 def all( = {}) get('images', ) end |
#destroy(image_id) ⇒ Object
18 19 20 |
# File 'lib/barge/resource/image.rb', line 18 def destroy(image_id) delete("images/#{image_id}") end |
#show(image_id) ⇒ Object
10 11 12 |
# File 'lib/barge/resource/image.rb', line 10 def show(image_id) get("images/#{image_id}") end |
#show_action(image_id, action_id) ⇒ Object
26 27 28 |
# File 'lib/barge/resource/image.rb', line 26 def show_action(image_id, action_id) get("images/#{image_id}/actions/#{action_id}") end |
#transfer(image_id, options) ⇒ Object
22 23 24 |
# File 'lib/barge/resource/image.rb', line 22 def transfer(image_id, ) action(image_id, __method__, ) end |
#update(image_id, options) ⇒ Object
14 15 16 |
# File 'lib/barge/resource/image.rb', line 14 def update(image_id, ) put("images/#{image_id}", .to_json) end |