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
-
Method Summary
Modifier and TypeMethodDescriptiondelete()
Delete this webhook.@NotNull ClickUp4j
This ClickUp4j instance.@NotNull String
The client id of the webhook.@NotNull String
The endpoint ClickUp will send webhooks to.The events this webhook is listening for.int
Returns the number of times the webhook has failed.@Nullable String
Returns the folder ID of the folder this webhook is listening for.Returns the Health of the webhook.@NotNull String
getId()
The ID of the webhook.@Nullable String
Returns theTaskList
ID of the list this webhook is listening for.@NotNull String
Returns the secret of the webhook, to be used when verifying the webhook.@Nullable String
Returns theSpace
ID of the list this webhook is listening for.@Nullable String
Returns theTask
ID of the task this webhook is listening for.int
The user ID of the user who created the webhook.int
The 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 theTask
ID 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 theTaskList
ID 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 theSpace
ID 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
-