aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2018-07-19 12:05:50 +0300
committerIdan Amit <ia096e@intl.att.com>2018-07-19 13:30:34 +0300
commita2c544de543343ad4135f0419f1548ed1cf502cb (patch)
treea89bfc6b50a322a2411fd4941c3afe1f57474471 /README.md
parent5c580897a8a46398876dd40ae58758663eed52d9 (diff)
sdc-pubsub first commit
Committed sdc-pubsub code for the first time to LF repo Change-Id: I1e26f7fe8b2f1747169e3101e0705d1c89d3f56b Issue-ID: SDC-1537 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md70
1 files changed, 70 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5047828
--- /dev/null
+++ b/README.md
@@ -0,0 +1,70 @@
+## sdc-pubsub
+
+sdc-pubsub [npm](https://www.npmjs.com/package/sdc-pubsub) package.
+
+### Installation
+
+Installing using npm:
+
+```
+npm install sdc-pubsub
+```
+
+### Loading It Up
+#### ES6
+```javascript
+import {PluginPubSub} from 'sdc-pubsub'
+```
+#### ES5
+
+```javascript
+var pluginPubSub = require('PluginPubSub')
+```
+
+### Usage
+#### Initialize a pubsub client
+```javascript
+//eventsClientId=<received from query params>
+//parentUrl=<received from query params>
+//eventsToWaitFor = [ “CHECK_IN” ]
+
+var client = new PluginPubSub('eventsClientId, parentUrl, eventsToWaitFor')
+```
+
+#### Notify about events
+```javascript
+client.notify(“READY”)
+```
+
+#### Register for an event
+```javascript
+client.on((eventData,event) => {
+ if(eventData.type == ”WINDOW_OUT”) {
+ //do logic
+ }
+ }
+)
+```
+
+### Dependencies
+
+* None.
+
+### Tests
+
+None.
+
+### Authors
+
+* Idan Amit: [https://wiki.onap.org/display/~idanamit](hhttps://wiki.onap.org/display/~idanamit)
+
+
+### Links
+
+sdc onap wiki [https://wiki.onap.org/x/_TX0](https://wiki.onap.org/x/_TX0)
+
+### License
+
+Copyright 2018 AT&T, Inc.
+
+Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0