Class: CiscoSpark::Webhooks
- Inherits:
-
Collection
- Object
- Collection
- CiscoSpark::Webhooks
- Defined in:
- lib/webhooks.rb
Instance Attribute Summary
Attributes inherited from Collection
Class Method Summary collapse
Methods inherited from Collection
#[], #each, #initialize, #length, #push, #to_s
Constructor Details
This class inherits a constructor from CiscoSpark::Collection
Class Method Details
.list(params = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/webhooks.rb', line 4 def list(params = {}) out = CiscoSpark::Webhooks.new res = CiscoSpark.rest('GET', '/webhooks', params: params) if res.ok data = JSON.parse(res.body) data['items'].each do |r| webhook = CiscoSpark::Webhook.new(r) out.push(webhook) end end out end |