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