Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Remove reference to non-implented notify() function #1796

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 1 addition & 47 deletions docs/src/develop/plugins/server_plugin_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ app.resourcesApi.setResource(
'waypoints',
'ac3a3b2d-07e8-4f25-92bc-98e7c92f7f1a',
{
"position": {"longitude": 138.5, "latitude": -38.6},
"name": "My Waypoint",
"feature": {
tkurki marked this conversation as resolved.
Show resolved Hide resolved
"type":"Feature",
"geometry": {
Expand Down Expand Up @@ -652,52 +652,6 @@ in the specified direction and starting at the specified point.

---

### Notifications API _(proposed)_

#### `app.notify(path, value, pluginId)`

Notifications API interface method for raising, updating and clearing notifications.

- `path`: Signal K path of the notification

- `value`: A valid `Notification` object or `null` if clearing a notification.

- `pluginId` The plugin identifier.


To raise or update a for a specified path, call the method with a valid `Notification` object as the `value`.

- returns: `string` value containing the `id` of the new / updated notification.

_Example:_
```javascript
const alarmId = app.notify(
'myalarm',
{
message: 'My cutom alarm text',
state: 'alert'
},
'myAlarmPlugin'
)

// alarmId = "ac3a3b2d-07e8-4f25-92bc-98e7c92f7f1a"
```

To clear (cancel) a notification call the method with `null` as the `value`.

- returns: `void`.

_Example: Clear notification_
```javascript
const alarmId = app.notify(
'myalarm',
null,
'myAlarmPlugin'
)
```

---

### PropertyValues

The _PropertyValues_ mechanism provides a means for passing configuration type values between different components running in the server process such as plugins and input connections.
Expand Down
Loading