Open easen-amp opened 1 year ago
Unable to get an Event by its id, the only option is to list the events and try and find the event.
id
const hub = await dcClient.hubs.get(process.env.DC_HUB_ID); const event = await hub.related.events.get(EVENT_ID);
Current work around
const hub = await dcClient.hubs.get(process.env.DC_HUB_ID); let events: Page<Event>; let page = 0; let event; do { events = await hub.related.events.list({ page, size: 100 }); event = events.getItems().find((event) => event.id == EVENT_ID); page++; } while (!event && events._links["next"]); if (event) { // do something }
It's just:
dcClient.events.get(eventId);
Description
Unable to get an Event by its
id
, the only option is to list the events and try and find the event.Steps to Reproduce
Expected Results
Actual Results
Current work around
Affected browsers/environments
Versions
Other information