-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f7f41a
commit 95f6a02
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |