Class: Wowzer::Notification
- Defined in:
- lib/wowzer/notification.rb
Instance Attribute Summary
Attributes inherited from Resource
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
all, client, find, #initialize, #method_missing
Constructor Details
This class inherits a constructor from Wowzer::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Wowzer::Resource
Class Method Details
.create(options = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/wowzer/notification.rb', line 4 def self.create(={}) response = client.links['wowzer:notifications'].post() resource = ::Hyperclient::Resource.new(response.body, self.client) new(resource) end |
Instance Method Details
#delete ⇒ Object
15 16 17 18 |
# File 'lib/wowzer/notification.rb', line 15 def delete response = resource.links['self'].delete response.status == 204 end |
#update(params = {}) ⇒ Object
11 12 13 |
# File 'lib/wowzer/notification.rb', line 11 def update(params = {}) response = resource.links['self'].put(params) end |