Instance methods
TriggerClient: getEvent() instance method
The getEvent()
method gets the event details for a given eventId.
Parameters
eventIdrequired
string
The event ID to get the details for. This is returned when calling either client.sendEvent() or io.sendEvent().
Returns
id
string | undefined
The event ID.
name
string | undefined
The event name.
createdAt
Date | undefined
When the event was created
updatedAt
Date | undefined
When the event was last updated
runs
Run[] | undefined
const event = await client.getEvent(anEventId);
if (event.runs.length === 0) {
throw new Error("No runs");
}
Was this page helpful?
const event = await client.getEvent(anEventId);
if (event.runs.length === 0) {
throw new Error("No runs");
}