Class: Barge::Resource::Image

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/barge/resource/image.rb

Constant Summary

Constants included from Base

Base::PER_PAGE

Instance Attribute Summary

Attributes included from Base

#faraday

Instance Method Summary collapse

Methods included from Base

#initialize

Instance Method Details

#all(options = {}) ⇒ Object



6
7
8
# File 'lib/barge/resource/image.rb', line 6

def all(options = {})
  get('images', options)
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, options)
  action(image_id, __method__, options)
end

#update(image_id, options) ⇒ Object



14
15
16
# File 'lib/barge/resource/image.rb', line 14

def update(image_id, options)
  put("images/#{image_id}", options.to_json)
end