Method: NgrokAPI::Services::EventSourcesClient#get!

Defined in:
lib/ngrokapi/services/event_sources_client.rb

#get!(subscription_id: "", type: "") ⇒ NgrokAPI::Models::EventSource

Get the details for a given type that triggers for the given event subscription Throws an exception if API error.

https://ngrok.com/docs/api#api-event-sources-get

Parameters:

  • subscription_id (string) (defaults to: "")

    The unique identifier for the Event Subscription that this Event Source is attached to.

  • type (string) (defaults to: "")

    Type of event for which an event subscription will trigger

Returns:



121
122
123
124
125
126
127
128
129
130
# File 'lib/ngrokapi/services/event_sources_client.rb', line 121

def get!(subscription_id: "", type: "")
  path = '/event_subscriptions/%{subscription_id}/sources/%{type}'
  replacements = {
    subscription_id: subscription_id,
    type: type,
  }
  data = {}
  result = @client.get(path % replacements, data: data, danger: true)
  NgrokAPI::Models::EventSource.new(client: self, attrs: result)
end