appuri-event-api-client
v0.2.0
Published
Client for the Appuri Event API
Downloads
4
Keywords
Readme
Appuri Event Sink Client
A NodeJS Promise-based client for sending a stream of events to Appuri's Events API
Usage
The following example uses through2 to convert a custom data format to Appuri's Event Format.
node
const eventAPI = require('appuri-event-api-client'),
through2 = require('through2')
function transform(chunk, enc, cb) {
// convert custom event type to appuri event
}
eventAPI(through2.obj(transform), 'your-event-write-key')
.then(() => console.log('Complete!'))
.catch(error => console.log('Failed to upload: ', error))