The webhook API. The API allows plugins to register and unregister webhooks destinations, which allow for creating custom webhooks and removing/replacing webhooks that already exist.
| 14 | * already exist.</p> |
| 15 | */ |
| 16 | public interface WebhookAPI { |
| 17 | /** |
| 18 | * Registers a webhook handler. |
| 19 | * |
| 20 | * @param destination the webhook handler to register |
| 21 | * @return true if registration was successful, false if not |
| 22 | */ |
| 23 | boolean register(@NotNull WebhookDestination destination); |
| 24 | |
| 25 | /** |
| 26 | * Unregisters a webhook handler. |
| 27 | * |
| 28 | * @param destination the handler to unregister |
| 29 | * @return true if removal was successful, false if not |
| 30 | */ |
| 31 | boolean unregister(@NotNull WebhookDestination destination); |
| 32 | |
| 33 | /** |
| 34 | * Gets a list of currently-registered webhook handlers. |
| 35 | * |
| 36 | * @return a list of currently-registered webhook handlers |
| 37 | */ |
| 38 | @NotNull PVector<@NotNull WebhookDestination> destinations(); |
| 39 | } |
no outgoing calls
no test coverage detected