Class: MotionOcean::Resource::Key
- Inherits:
-
Object
- Object
- MotionOcean::Resource::Key
- Includes:
- Base
- Defined in:
- lib/motion_ocean/resource/key.rb
Constant Summary
Constants included from Base
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
- #all(&block) ⇒ Object
- #create(options, &block) ⇒ Object
- #destroy(key_id, &block) ⇒ Object
- #show(key_id, &block) ⇒ Object
- #update(key_id, options, &block) ⇒ Object
Methods included from Base
Instance Method Details
#all(&block) ⇒ Object
10 11 12 |
# File 'lib/motion_ocean/resource/key.rb', line 10 def all(&block) get('account/keys', &block) end |
#create(options, &block) ⇒ Object
6 7 8 |
# File 'lib/motion_ocean/resource/key.rb', line 6 def create(, &block) post('account/keys', .to_json) end |
#destroy(key_id, &block) ⇒ Object
22 23 24 |
# File 'lib/motion_ocean/resource/key.rb', line 22 def destroy(key_id, &block) delete("account/keys/#{key_id}", &block) end |
#show(key_id, &block) ⇒ Object
14 15 16 |
# File 'lib/motion_ocean/resource/key.rb', line 14 def show(key_id, &block) get("account/keys/#{key_id}", &block) end |
#update(key_id, options, &block) ⇒ Object
18 19 20 |
# File 'lib/motion_ocean/resource/key.rb', line 18 def update(key_id, , &block) put("account/keys/#{key_id}", .to_json, &block) end |