Class: Cloudmine::Object
- Inherits:
-
Base
- Object
- Base
- Cloudmine::Object
show all
- Defined in:
- lib/cloudmine/object.rb
Instance Attribute Summary
Attributes inherited from Base
#api_key, #app_id
Instance Method Summary
collapse
Methods inherited from Base
#initialize, method_missing
Instance Method Details
#create(key, value) ⇒ Object
11
12
13
|
# File 'lib/cloudmine/object.rb', line 11
def create(key, value)
api_call(:put, 'text', :body => { key => value })
end
|
#destroy(*keys) ⇒ Object
15
16
17
|
# File 'lib/cloudmine/object.rb', line 15
def destroy(*keys)
api_call(:delete, 'data', :query => { :keys => keys.flatten.join(',') })
end
|
#fetch(*keys) ⇒ Object
3
4
5
|
# File 'lib/cloudmine/object.rb', line 3
def fetch(*keys)
api_call(:get, 'text', :query => { :keys => keys.flatten.join(',') })["success"]
end
|
#update(key, value, options = {}) ⇒ Object
7
8
9
|
# File 'lib/cloudmine/object.rb', line 7
def update(key, value, options = {})
api_call(:post, 'text', :body => { key => value })
end
|