...
For example, if you are only interested in handling update
events for ScenarioSession
resources, you probably want to structure your listener like to the following psuedocodeas follows:
Code Block | ||
---|---|---|
| ||
#!/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 |
...