Class ClickUp4jImpl

java.lang.Object
pw.chew.clickup4j.internal.ClickUp4jImpl
All Implemented Interfaces:
ClickUp4j

public class ClickUp4jImpl extends Object implements ClickUp4j
  • Constructor Details

    • ClickUp4jImpl

      public ClickUp4jImpl(String token, okhttp3.OkHttpClient client, WebhookServer webhookServer, String webhookEndpoint)
  • Method Details

    • getToken

      public String getToken()
      Description copied from interface: ClickUp4j
      Gets the token currently being used for requests.
      Specified by:
      getToken in interface ClickUp4j
      Returns:
      the token
    • getHttpClient

      public okhttp3.OkHttpClient getHttpClient()
      Description copied from interface: ClickUp4j
      Returns the OkHttpClient used for requests.
      Specified by:
      getHttpClient in interface ClickUp4j
      Returns:
      the OkHttpClient
    • retrieveTasks

      public Requester<List<Task>> retrieveTasks(@NotNull @NotNull String listId)
      Description copied from interface: ClickUp4j
      Returns a list of tasks in a specified list ID.
      Specified by:
      retrieveTasks in interface ClickUp4j
      Parameters:
      listId - the list ID
      Returns:
      the list of tasks
    • retrieveTask

      public Requester<Task> retrieveTask(@NotNull @NotNull String taskId)
      Description copied from interface: ClickUp4j
      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.
      Specified by:
      retrieveTask in interface ClickUp4j
      Parameters:
      taskId - the task ID
      Returns:
      the task
    • retrieveSpace

      public Requester<Space> retrieveSpace(@NotNull @NotNull String spaceId)
      Description copied from interface: ClickUp4j
      Retrieves a space by ID. This can be from any workspace the user has access to.
      Specified by:
      retrieveSpace in interface ClickUp4j
      Parameters:
      spaceId - the space ID
      Returns:
      the space
    • retrieveWorkspaces

      public Requester<List<Workspace>> retrieveWorkspaces()
      Description copied from interface: ClickUp4j
      Retrieves a list of workspaces the currently authenticated user can access.
      Specified by:
      retrieveWorkspaces in interface ClickUp4j
      Returns:
      the list of workspaces
    • retrieveGoal

      public Requester<Goal> retrieveGoal(String goalId)
      Description copied from interface: ClickUp4j
      Retrieve a specific goal by ID.
      Specified by:
      retrieveGoal in interface ClickUp4j
      Parameters:
      goalId - the goal ID
      Returns:
      the goal
    • retrieveGoals

      public Requester<List<Goal>> retrieveGoals(String workspaceId)
      Description copied from interface: ClickUp4j
      Retrieves a list of goals for the specified workspace.
      Specified by:
      retrieveGoals in interface ClickUp4j
      Parameters:
      workspaceId - the workspace ID
      Returns:
      the list of goals
    • retrieveSelfUser

      public Requester<User> retrieveSelfUser()
      Description copied from interface: ClickUp4j
      Retrieves the currently logged-in User.
      The user is workspace agnostic.
      Specified by:
      retrieveSelfUser in interface ClickUp4j
      Returns:
      the user
    • retrieveWebhooks

      public Requester<List<Webhook>> retrieveWebhooks(String workspaceId)
      Description copied from interface: ClickUp4j
      Retrieves a list of webhooks for the specified workspace.
      Specified by:
      retrieveWebhooks in interface ClickUp4j
      Parameters:
      workspaceId - the workspace ID
      Returns:
      the list of webhooks
    • startWebhookServer

      public void startWebhookServer(String workspaceId)
      Description copied from interface: ClickUp4j
      Starts a webhook server with the settings provided from the ClickUp4jBuilder.
      This method will do the following:
      1. Retrieve existing webhooks
      2. If a webhook with the endpoint exists, do nothing.
      3. Otherwise, create a new webhook with the endpoint.

      Be sure to stop the server when you're done with ClickUp4j.stopWebhookServer().
      Specified by:
      startWebhookServer in interface ClickUp4j
      Parameters:
      workspaceId - the workspace ID
    • stopWebhookServer

      public void stopWebhookServer()
      Description copied from interface: ClickUp4j
      Shuts down the webhook server.
      This method will also delete the webhook from ClickUp.
      Specified by:
      stopWebhookServer in interface ClickUp4j