Skip to content

Commit

Permalink
📚 Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mlichtblau committed Apr 1, 2019
1 parent 4f7f41a commit 95f6a02
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
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

0 comments on commit 95f6a02

Please # to comment.