adding small changes, adding example and readme for xmpp

main
HerrHase 4 weeks ago
parent e689be1b42
commit 664ffa6134

@ -1,7 +1,7 @@
# Signpost / Xmpp # Signpost / Xmpp
Using Signpost to send you messages for Debugging, as Warning, status of Deploy or Critical Errors from Using Signpost to send messages for Debugging, as Warning, status of Deploy or Critical Errors from
Services or Server. Services or Server to an Xmpp-Server.
## Messages ## Messages
@ -21,3 +21,6 @@ curl -X POST https://<domain>/api/flow/v1/<uuid>
-H 'Authorization: Bearer <token>' -H 'Authorization: Bearer <token>'
-d '{"message":"<text>"}' -d '{"message":"<text>"}'
``` ```
### PHP
### Nodejs

@ -10,14 +10,17 @@ class Action {
/** /**
* *
* @param flow object
* @param data object
* *
*/ */
constructor(flow, data) { constructor(flow, data) {
this.flow = flow this.flow = flow
this.data = data this.data = data
if (!this.run()) { // check if class has a run method
throw new Error('run method needed') if (typeof this.run !== 'function') {
throw new Error('missing run method')
} }
} }
} }

Loading…
Cancel
Save