Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For example, if you are only interested in handling update events for ScenarioSession resources, you probably want to structure your listener as follows (see Webhook format for more info):

Code Block
languageruby
#!/usr/bin/ruby

# @payload: hash
def handleWebook(payload)
  return unless payload['event'] == 'update' &&
    payload['type'] == 'resource' &&
    payload['data']['resource-type'] == 'ScenarioSession'
    
  # process logic goes here...
end

...