JSPM

unicorn-adapter

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q28687F
  • License MIT

Easily connect to Unicorn, the event processing engine

Package Exports

  • unicorn-adapter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (unicorn-adapter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Unicorn Adapter

Unicorn Adapter is a node library to help subscribe to events in the event processing platform Unicorn.

Getting started

npm install unicorn-adapter to install the package

const UnicornAdapter = require('unicorn-adapter');

let unicornAdapter = new UnicornAdapter("Your Unicorn Url", "Your callback Url", options);
let uuid;

unicornAdapter.subscribeToEvent('EventType').then(subscriptionId => {
    uuid = subscriptionUuid;
    console.log(`Subscription UUID: ${ subscriptionId }`);
});

unicornAdapter.unsubscribeFromEvent(uuid);

Available options:

  • maxTries - Number of retries

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details