From 95f6a023e772f5727852d15e3f8b0402e9456893 Mon Sep 17 00:00:00 2001 From: Marius Lichtblau Date: Mon, 1 Apr 2019 16:17:56 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20Add=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f87db32 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# Unicorn Adapter + +Unicorn Adapter is a node library to help subscribe to events in the event processing platform [Unicorn](https://github.com/bptlab/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 + +* **Marius Lichtblau** - [mlichtblau](https://github.com/mlichtblau) - [lichtblau.io](https://lichtblau.io) - [@lichtblau](https://twitter.com/lichtblau) + +## License + +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details \ No newline at end of file