Package pw.chew.clickup4j.api
Interface ClickUp4j
- All Known Implementing Classes:
ClickUp4jImpl
public interface ClickUp4j
The core of ClickUp4j. All parts of the API can be accessed starting from this class
-
Method Summary
Modifier and TypeMethodDescriptionokhttp3.OkHttpClient
Returns the OkHttpClient used for requests.getToken()
Gets the token currently being used for requests.retrieveGoal
(String goalId) Retrieve a specificgoal
by ID.retrieveGoals
(String workspaceId) Retrieves the currently logged-in User.retrieveSpace
(@NotNull String spaceId) Retrieves a space by ID.retrieveTask
(@NotNull String taskId) Retrieves a single task by ID.retrieveTasks
(@NotNull String listId) Returns a list of tasks in a specified list ID.retrieveWebhooks
(String workspaceId) Retrieves a list of workspaces the currently authenticated user can access.void
startWebhookServer
(String workspaceId) Starts a webhook server with the settings provided from theClickUp4jBuilder
.void
Shuts down the webhook server.
-
Method Details
-
getToken
String getToken()Gets the token currently being used for requests.- Returns:
- the token
-
getHttpClient
okhttp3.OkHttpClient getHttpClient()Returns the OkHttpClient used for requests.- Returns:
- the OkHttpClient
-
retrieveTasks
Returns a list of tasks in a specified list ID.- Parameters:
listId
- the list ID- Returns:
- the list of tasks
-
retrieveTask
Retrieves a single task by ID. This can be from any workspace the user has access to.
This will NOT return values for the custom fields.
Custom IDs are not supported with this method.- Parameters:
taskId
- the task ID- Returns:
- the task
-
retrieveSpace
Retrieves a space by ID. This can be from any workspace the user has access to.- Parameters:
spaceId
- the space ID- Returns:
- the space
-
retrieveWorkspaces
Retrieves a list of workspaces the currently authenticated user can access.- Returns:
- the list of workspaces
-
retrieveGoal
Retrieve a specificgoal
by ID.- Parameters:
goalId
- the goal ID- Returns:
- the goal
-
retrieveGoals
- Parameters:
workspaceId
- the workspace ID- Returns:
- the list of goals
-
retrieveSelfUser
Retrieves the currently logged-in User.
The user is workspace agnostic.- Returns:
- the user
-
retrieveWebhooks
- Parameters:
workspaceId
- the workspace ID- Returns:
- the list of webhooks
-
startWebhookServer
Starts a webhook server with the settings provided from theClickUp4jBuilder
.
This method will do the following:- Retrieve existing webhooks
- If a webhook with the endpoint exists, do nothing.
- Otherwise, create a new webhook with the endpoint.
Be sure to stop the server when you're done withstopWebhookServer()
.- Parameters:
workspaceId
- the workspace ID
-
stopWebhookServer
void stopWebhookServer()Shuts down the webhook server.
This method will also delete the webhook from ClickUp.
-