2.2.3 • Published 1 year ago

eventfrog-api v2.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Javascript implementation of the Eventfrog API

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

Known limitations

  • You cannot get all locations of an event (multiple are possible by the API). Only the first one is fetched.

Known issues

  • 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.

Installation

The package is available on npm's registry:

npm i eventfrog-api

Usage

See eventfrog-api-example for an example implementation.

Using jQuery

Load the bundled jQuery plugin:

<script src="dist/jquery.eventfrog.min.js"></script>

Load 10 events from a specific organization:

const Service = $.EventfrogService('YOUR_API_KEY');

const request = $.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());

Using commonJS

Load 10 events from a specific organization:

const EventfrogService = require('eventfrog-api/service/EventfrogService');
const EventfrogEventRequest = require('eventfrog-api/request/EventfrogEventRequest');

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());

ToDo

See Issues.

Disclaimer

I am not affiliated with Eventfrog and this implementation is provided as-is.

2.2.1

1 year ago

2.2.0

1 year ago

2.2.3

1 year ago

2.2.2

1 year ago

2.1.0

1 year ago

2.0.0

2 years ago

2.0.0-alpha.1

2 years ago

2.0.0-beta.5

2 years ago

2.0.0-beta.4

2 years ago

2.0.0-beta.3

2 years ago

2.0.0-beta.2

2 years ago

2.0.0-beta.1

2 years ago

2.0.0-rc.2

2 years ago

2.0.0-rc.1

2 years ago

1.4.0

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago