Method: NgrokAPI::Services::EventSourcesClient#create
- Defined in:
- lib/ngrokapi/services/event_sources_client.rb
#create(subscription_id: "", type: "", filter: "", fields: []) ⇒ NgrokAPI::Models::EventSource
Add an additional type for which this event subscription will trigger
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ngrokapi/services/event_sources_client.rb', line 27 def create(subscription_id: "", type: "", filter: "", fields: []) path = '/event_subscriptions/%{subscription_id}/sources' replacements = { subscription_id: subscription_id, } data = {} data[:type] = type if type result = @client.post(path % replacements, data: data) NgrokAPI::Models::EventSource.new(client: self, attrs: result) end |