Class: Spark::Webhooks
- Inherits:
-
Collection
- Object
- Collection
- Spark::Webhooks
- Defined in:
- lib/webhooks.rb
Instance Attribute Summary
Attributes inherited from Collection
Class Method Summary collapse
Methods inherited from Collection
#[], #each, #initialize, #push, #to_s
Constructor Details
This class inherits a constructor from Spark::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 = Spark::Webhooks.new() res = Spark::rest('GET','/webhooks',{:params => params}) if res.ok data = JSON.parse(res.body) data['items'].each do |r| webhook = Spark::Webhook.new(r) out.push(webhook) end end out end |