Skip to content

Commit 5b2e432

Browse files
Daniel HochleitnerDaniel Hochleitner
authored andcommitted
readme changes
1 parent 3ca2d9d commit 5b2e432

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ Sending messages and notifications to users which are connected over the websock
234234
- **Websocket-Interface**
235235

236236
Connecting and authenticating users against the node server and still more to receive live messages on client browser from server part.
237+
There exists 2 rooms/namespaces which users can subscribe to:
238+
239+
- **private** - For single user messages to all instances of one user (e.g. one user is logged in with 3 browsers)
240+
- **public** - For single user messages to all instances of one user *AND* broadcasting messages to all connected clients
237241

238242
- **Helper pages**
239243

@@ -243,10 +247,34 @@ Helper pages to get informations about services, status of server and a test cli
243247
- **Server Status Page:** http://[host-ip-of-server]:8080/status
244248
- **Websocket Test Client:** http://[host-ip-of-server]:8080/testclient
245249

246-
250+
General settings of the node server like IP, port, authentication, SSL support and active websocket rooms can be configured with [../node/node-notify-server/prefs.json](https://github.com/Dani3lSun/apex-websocket-notify-bundle/blob/master/node/node-notify-server/prefs.json) file as mentioned above.
247251

248252
### REST-Service
249253

254+
The REST-Service is designed to send messages to connected websocket users. Base-URL scheme with looks like this:
255+
256+
```
257+
Type: GET
258+
http://[host-ip-of-server]:[port]/notifyuser
259+
```
260+
261+
- **URL-Parameter**
262+
- userid (required) - User-ID of connected user, **in APEX APP_USER is used**
263+
- room (required) - Websocket room - valid values: private,public
264+
- type (required) - Notification type - valid values: info,success,warn,error
265+
- optparam (optional) - Optional Parameter string to send any kind of information tp the websocket client
266+
267+
- **HTTP Header-Variables**
268+
- notify-title (required) - Title of notification
269+
- notify-message (required) - Message content of notification
270+
271+
A demo call using curl could look like this:
272+
273+
```
274+
curl -H "notify-title: Test Title Text" -H "notify-message: Test Message Text" "http://[host-ip-of-server]:[port]/notifyuser?userid=daniel&room=private&type=info&optparam=myoptionalinfo123"
275+
```
276+
277+
250278
### APEX
251279

252280
## License

0 commit comments

Comments
 (0)