interface ProvisionsWebhooks

An optional add-on to {HandlesWebhooks} for drivers whose provider exposes an API to register the webhook, so an admin never has to configure it manually in the provider's dashboard.

Methods

void
registerWebhook( SettingsRepositoryInterface $settings, string $url)

Register (or update) the delivery-event webhook with the provider, pointing it at the given Flarum webhook URL. Must be idempotent, and must keep any URLs other applications registered with the provider.

void
unregisterWebhook( SettingsRepositoryInterface $settings, string $url)

Remove the given Flarum webhook URL from the provider, leaving any other URLs in place. Should not throw if it is not registered.

Details

void registerWebhook( SettingsRepositoryInterface $settings, string $url)

Register (or update) the delivery-event webhook with the provider, pointing it at the given Flarum webhook URL. Must be idempotent, and must keep any URLs other applications registered with the provider.

Parameters

SettingsRepositoryInterface $settings
string $url

Return Value

void

Exceptions

Exception

void unregisterWebhook( SettingsRepositoryInterface $settings, string $url)

Remove the given Flarum webhook URL from the provider, leaving any other URLs in place. Should not throw if it is not registered.

Parameters

SettingsRepositoryInterface $settings
string $url

Return Value

void