Package pw.chew.clickup4j.api.entities
Interface Webhook
- All Known Implementing Classes:
WebhookImpl
public interface Webhook
Webhook
A webhook is a URL that is called when a certain event happens.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondelete()Delete this webhook.@NotNull ClickUp4jThis ClickUp4j instance.@NotNull StringThe client id of the webhook.@NotNull StringThe endpoint ClickUp will send webhooks to.The events this webhook is listening for.intReturns the number of times the webhook has failed.@Nullable StringReturns the folder ID of the folder this webhook is listening for.Returns the Health of the webhook.@NotNull StringgetId()The ID of the webhook.@Nullable StringReturns theTaskListID of the list this webhook is listening for.@NotNull StringReturns the secret of the webhook, to be used when verifying the webhook.@Nullable StringReturns theSpaceID of the list this webhook is listening for.@Nullable StringReturns theTaskID of the task this webhook is listening for.intThe user ID of the user who created the webhook.intThe workspace this webhook belongs to.
-
Method Details
-
getId
The ID of the webhook.- Returns:
- never-null webhook ID
-
getUserId
int getUserId()The user ID of the user who created the webhook.- Returns:
- user ID
-
getWorkspaceId
int getWorkspaceId()The workspace this webhook belongs to.- Returns:
- workspace ID
-
getEndpoint
The endpoint ClickUp will send webhooks to.- Returns:
- endpoint URL
-
getClientId
The client id of the webhook.- Returns:
- client ID
-
getEvents
The events this webhook is listening for.- Returns:
- never-null, but potentially empty, list of events
-
getTaskId
Returns theTaskID of the task this webhook is listening for.
This may be null, meaning the webhook is either listening elsewhere, or globally.- Returns:
- task ID, or null
-
getListId
Returns theTaskListID of the list this webhook is listening for.
This may be null, meaning the webhook is either listening elsewhere, or globally.- Returns:
- list ID, or null
-
getFolderId
Returns the folder ID of the folder this webhook is listening for.
This may be null, meaning the webhook is either listening elsewhere, or globally.- Returns:
- folder ID, or null
-
getSpaceId
Returns theSpaceID of the list this webhook is listening for.
This may be null, meaning the webhook is either listening elsewhere, or globally.- Returns:
- space ID, or null
-
getHealth
Webhook.Health getHealth()Returns the Health of the webhook.
This is one of the enum constants:active,failing, orsuspended.
If the webhook isfailing, you can see the fail count withgetFailCount().- Returns:
- never-null health
-
getFailCount
int getFailCount()- Returns:
- fail count
-
getSecret
Returns the secret of the webhook, to be used when verifying the webhook.- Returns:
- never-null secret
-
delete
Delete this webhook.- Returns:
- nothing
-
getClickUp4j
This ClickUp4j instance.- Returns:
- never-null instance
-