Updated wiki

Fabio Manganiello 2021-09-17 00:29:26 +02:00
parent 60b6996928
commit 9383bb5623
2 changed files with 58 additions and 3 deletions

@ -32,4 +32,31 @@ class VoicemailBackend(Backend)
while True:
msg = self.voicemail.poll()
self.on_message(msg)
```
```
8. Add a `manifest.yaml` file to the same folder. Example template:
```yaml
manifest:
type: backend
package: platypush.backend.voicemail
# Events launched by the extension
events:
platypush.message.event.voicemail.OnVoicemailMessage: When a message is received
# Installation requirements
install:
# List of system-wide requirements on Debian/Ubuntu and derived
apt:
- sudo
# List of system-wide requirements on Arch Linux and derived
pacman:
- sudo
# List of pip dependencies
pip:
- requests
# Extra commands to run after the dependencies are installed
exec:
- sudo systemctl enable my-service
```

@ -52,9 +52,37 @@ class LightBatsignalPlugin(LightPlugin):
```
6. Rebuild and reinstall `platypush` if required and relaunch it.
6. Create a `manifest.yaml` file in the same directory that defines your plugin. Template:
7. Test your new plugin by sending some requests to it:
```yaml
manifest:
type: plugin
package: platypush.plugins.light.batsignal
# Events launched by the extension
events:
platypush.message.event.batsignal.SignalOnEvent: When the signal goes on
platypush.message.event.batsignal.SignalOffEvent: When the signal goes off
# Installation requirements
install:
# List of system-wide requirements on Debian/Ubuntu and derived
apt:
- sudo
# List of system-wide requirements on Arch Linux and derived
pacman:
- sudo
# List of pip dependencies
pip:
- requests
# Extra commands to run after the dependencies are installed
exec:
- sudo systemctl enable my-service
```
8. Rebuild and reinstall `platypush` if required and relaunch it.
9. Test your new plugin by sending some requests to it:
* Via cURL: