Basic implementation of the Eventfrog Events API:
- Load events, filter them by various parameters
- Location-based search for events as far as the API allows
- Automatically load location and group endpoints for events
- You cannot get all locations of an event (multiple are possible by the API). Only the first one is fetched.
- When not filtering events down to a small number, the amount of groups and locations being queried to later be matched
to events for more detailed display can easily overwhelm the Eventfrog APIs. They handle this case correctly but this
script does not! If you do not need groups and locations being matched to events, use the more granular methods
of
EventfrogService.
The package is available on npm's registry:
npm i eventfrog-apiSee eventfrog-api-example for an example implementation.
Load 10 events from a specific organization:
import {EventfrogService, EventfrogEventRequest} from 'eventfrog-api';
const Service = new EventfrogService('YOUR_API_KEY');
const request = new EventfrogEventRequest({
perPage: 10,
orgId: 'ORG_ID',
});
let result = null;
do {
result = await Service.loadEvents(request);
const events = result.datasets;
// do stuff with events
request.nextPage();
} while (result.hasNextPage());See Issues.
I am not affiliated with Eventfrog and this implementation is provided as-is.