Skip to main content

NotificationsListenerService

This service make it easy to listen to resources (LDP resource, LDP container or ActivityStreams collection) using the Solid Notifications Protocol. It uses the webhook channel.

Usage

const { NotificationsListenerService } = require('@semapps/solid');

module.exports = {
mixins: [NotificationsListenerService],
adapter: new TripleStoreAdapter({ type: 'WebhookChannelListener', dataset: 'settings' }),
settings: {
baseUrl: 'http://localhost:3000/'
}
};

Service settings

PropertyTypeDefaultDescription
baseUrlStringrequiredBase URL of the server

Actions

The following service actions are available:

register

Register a new webhook channel. Whenever the resource is updated, it will call the provided action with the notification.

Parameters
PropertyTypeDefaultDescription
resourceUriURIrequiredThe resource you want to listen to
actionNameStringrequiredThe action to call when the resource is being updated