public interface WebhookClient
| Modifier and Type | Method and Description |
|---|---|
void |
create(java.lang.String name,
java.lang.String targetUrl,
java.lang.String resource,
java.lang.String event,
java.lang.String filter,
java.lang.String secret,
CompletionHandler<Webhook> handler)
Posts a webhook for the authenticated user.
|
void |
delete(java.lang.String webhookId,
CompletionHandler<java.lang.Void> handler)
Deletes a webhook by id.
|
void |
get(java.lang.String webhookId,
CompletionHandler<Webhook> handler)
Retrieves the details for a webhook by id.
|
void |
list(int max,
CompletionHandler<java.util.List<Webhook>> handler)
Lists all webhooks of the authenticated user.
|
void |
update(java.lang.String webhookId,
java.lang.String name,
java.lang.String targetUrl,
CompletionHandler<Webhook> handler)
Updates a webhook by id.
|
void |
update(java.lang.String webhookId,
java.lang.String name,
java.lang.String targetUrl,
java.lang.String secret,
java.lang.String status,
CompletionHandler<Webhook> handler)
Updates a webhook by id.
|
void list(int max,
@NonNull
CompletionHandler<java.util.List<Webhook>> handler)
max - The maximum number of webhooks in the response.handler - A closure to be executed once the request has finished.void create(@NonNull
java.lang.String name,
@NonNull
java.lang.String targetUrl,
@NonNull
java.lang.String resource,
@NonNull
java.lang.String event,
@Nullable
java.lang.String filter,
@Nullable
java.lang.String secret,
@NonNull
CompletionHandler<Webhook> handler)
name - A user-friendly name for this webhook.targetUrl - The URL that receives POST requests for each event.resource - The resource type for the webhook.event - The event type for the webhook.filter - The filter that defines the webhook scope.secret - Secret use to generate payload signiturehandler - A closure to be executed once the request has finished.void get(@NonNull
java.lang.String webhookId,
@NonNull
CompletionHandler<Webhook> handler)
webhookId - The identifier of the webhook.handler - A closure to be executed once the request has finished.void update(@NonNull
java.lang.String webhookId,
@NonNull
java.lang.String name,
@NonNull
java.lang.String targetUrl,
@NonNull
CompletionHandler<Webhook> handler)
webhookId - The identifier of the webhook.name - A user-friendly name for this webhook.targetUrl - The URL that receives POST requests for each event.handler - A closure to be executed once the request has finished.void update(@NonNull
java.lang.String webhookId,
@NonNull
java.lang.String name,
@NonNull
java.lang.String targetUrl,
@Nullable
java.lang.String secret,
@Nullable
java.lang.String status,
@NonNull
CompletionHandler<Webhook> handler)
webhookId - The identifier of the webhook.name - A user-friendly name for this webhook.targetUrl - The URL that receives POST requests for each event.secret - The Secret used to generate payload signature.status - The status of the webhook. Use "active" to reactivate a disabled webhook.handler - A closure to be executed once the request has finished.void delete(@NonNull
java.lang.String webhookId,
@NonNull
CompletionHandler<java.lang.Void> handler)
webhookId - The identifier of the webhook.handler - A closure to be executed once the request has finished.