pub struct ClickUpClient { /* private fields */ }Implementations§
Source§impl ClickUpClient
impl ClickUpClient
Sourcepub async fn task_comments_page(
&self,
task: &TaskRef,
before: Option<&Comment>,
) -> Result<Vec<Comment>>
pub async fn task_comments_page( &self, task: &TaskRef, before: Option<&Comment>, ) -> Result<Vec<Comment>>
GET /v2/task/{id}/comment — newest first, 25 per page. Pass the
previous page’s last comment as before to get the next page.
Sourcepub async fn task_comments(
&self,
task: &TaskRef,
limit: Option<usize>,
) -> Result<Vec<Comment>>
pub async fn task_comments( &self, task: &TaskRef, limit: Option<usize>, ) -> Result<Vec<Comment>>
Pages through comments until limit (or all when None).
Sourcepub async fn add_comment(
&self,
task: &TaskRef,
text: &str,
assignee: Option<i64>,
notify_all: bool,
) -> Result<Value>
pub async fn add_comment( &self, task: &TaskRef, text: &str, assignee: Option<i64>, notify_all: bool, ) -> Result<Value>
POST /v2/task/{id}/comment
Sourcepub async fn update_comment(
&self,
comment_id: &str,
text: &str,
resolved: Option<bool>,
) -> Result<()>
pub async fn update_comment( &self, comment_id: &str, text: &str, resolved: Option<bool>, ) -> Result<()>
PUT /v2/comment/{id}
Sourcepub async fn delete_comment(&self, comment_id: &str) -> Result<()>
pub async fn delete_comment(&self, comment_id: &str) -> Result<()>
DELETE /v2/comment/{id}
Source§impl ClickUpClient
impl ClickUpClient
Sourcepub async fn search_docs(
&self,
name_filter: Option<&str>,
limit: usize,
) -> Result<Vec<Value>>
pub async fn search_docs( &self, name_filter: Option<&str>, limit: usize, ) -> Result<Vec<Value>>
GET /v3/workspaces/{ws}/docs, following next_cursor, optionally
keeping only docs whose name contains name_filter (case-insensitive).
Sourcepub async fn doc_page_listing(&self, doc_id: &str) -> Result<Value>
pub async fn doc_page_listing(&self, doc_id: &str) -> Result<Value>
GET …/docs/{doc}/page_listing
Sourcepub async fn doc_pages(&self, doc_id: &str) -> Result<Value>
pub async fn doc_pages(&self, doc_id: &str) -> Result<Value>
GET …/docs/{doc}/pages (markdown content)
Sourcepub async fn doc_page(&self, doc_id: &str, page_id: &str) -> Result<Value>
pub async fn doc_page(&self, doc_id: &str, page_id: &str) -> Result<Value>
GET …/docs/{doc}/pages/{page} (markdown content)
Sourcepub async fn create_doc(
&self,
name: &str,
parent: Option<(&str, DocParent)>,
) -> Result<Value>
pub async fn create_doc( &self, name: &str, parent: Option<(&str, DocParent)>, ) -> Result<Value>
POST /v3/workspaces/{ws}/docs
Source§impl ClickUpClient
impl ClickUpClient
Sourcepub async fn list_fields(&self, list_id: &str) -> Result<Vec<CustomField>>
pub async fn list_fields(&self, list_id: &str) -> Result<Vec<CustomField>>
GET /v2/list/{id}/field
Source§impl ClickUpClient
impl ClickUpClient
Sourcepub async fn workspaces(&self) -> Result<Vec<Workspace>>
pub async fn workspaces(&self) -> Result<Vec<Workspace>>
GET /v2/team — authorized workspaces, including members.
Sourcepub async fn workspace_members(&self) -> Result<Vec<User>>
pub async fn workspace_members(&self) -> Result<Vec<User>>
Members of the current workspace (from GET /v2/team).
Sourcepub async fn workspace_plan(&self) -> Result<Value>
pub async fn workspace_plan(&self) -> Result<Value>
GET /v2/team/{id}/plan
Sourcepub async fn folders(
&self,
space_id: &str,
archived: bool,
) -> Result<Vec<Folder>>
pub async fn folders( &self, space_id: &str, archived: bool, ) -> Result<Vec<Folder>>
GET /v2/space/{id}/folder — each folder includes its lists.
Sourcepub async fn folder_lists(
&self,
folder_id: &str,
archived: bool,
) -> Result<Vec<List>>
pub async fn folder_lists( &self, folder_id: &str, archived: bool, ) -> Result<Vec<List>>
GET /v2/folder/{id}/list
Sourcepub async fn folderless_lists(
&self,
space_id: &str,
archived: bool,
) -> Result<Vec<List>>
pub async fn folderless_lists( &self, space_id: &str, archived: bool, ) -> Result<Vec<List>>
GET /v2/space/{id}/list
Sourcepub async fn create_list(
&self,
folder_id: Option<&str>,
space_id: Option<&str>,
name: &str,
content: Option<&str>,
) -> Result<List>
pub async fn create_list( &self, folder_id: Option<&str>, space_id: Option<&str>, name: &str, content: Option<&str>, ) -> Result<List>
POST /v2/folder/{id}/list or POST /v2/space/{id}/list (folderless).
Sourcepub async fn create_folder(&self, space_id: &str, name: &str) -> Result<Folder>
pub async fn create_folder(&self, space_id: &str, name: &str) -> Result<Folder>
POST /v2/space/{id}/folder
Sourcepub async fn custom_task_types(&self) -> Result<Vec<Value>>
pub async fn custom_task_types(&self) -> Result<Vec<Value>>
GET /v2/team/{id}/custom_item — custom task types.
GET /v2/space/{id}/tag
Source§impl ClickUpClient
impl ClickUpClient
Sourcepub async fn add_tag(&self, task: &TaskRef, tag: &str) -> Result<()>
pub async fn add_tag(&self, task: &TaskRef, tag: &str) -> Result<()>
POST /v2/task/{id}/tag/{name} — the tag must exist in the space.
Sourcepub async fn remove_tag(&self, task: &TaskRef, tag: &str) -> Result<()>
pub async fn remove_tag(&self, task: &TaskRef, tag: &str) -> Result<()>
DELETE /v2/task/{id}/tag/{name}
Sourcepub async fn add_link(&self, task: &TaskRef, other: &TaskRef) -> Result<()>
pub async fn add_link(&self, task: &TaskRef, other: &TaskRef) -> Result<()>
POST /v2/task/{id}/link/{other}
Sourcepub async fn remove_link(&self, task: &TaskRef, other: &TaskRef) -> Result<()>
pub async fn remove_link(&self, task: &TaskRef, other: &TaskRef) -> Result<()>
DELETE /v2/task/{id}/link/{other}
Sourcepub async fn add_dependency(
&self,
task: &TaskRef,
other: &TaskRef,
kind: Dependency,
) -> Result<()>
pub async fn add_dependency( &self, task: &TaskRef, other: &TaskRef, kind: Dependency, ) -> Result<()>
POST /v2/task/{id}/dependency body { depends_on | dependency_of }
Sourcepub async fn remove_dependency(
&self,
task: &TaskRef,
other: &TaskRef,
kind: Dependency,
) -> Result<()>
pub async fn remove_dependency( &self, task: &TaskRef, other: &TaskRef, kind: Dependency, ) -> Result<()>
DELETE /v2/task/{id}/dependency?depends_on=…|dependency_of=…
Sourcepub async fn create_checklist(
&self,
task: &TaskRef,
name: &str,
items: &[String],
) -> Result<Checklist>
pub async fn create_checklist( &self, task: &TaskRef, name: &str, items: &[String], ) -> Result<Checklist>
POST /v2/task/{id}/checklist, then one call per item.
Sourcepub async fn add_checklist_item(
&self,
checklist_id: &str,
name: &str,
) -> Result<Checklist>
pub async fn add_checklist_item( &self, checklist_id: &str, name: &str, ) -> Result<Checklist>
POST /v2/checklist/{id}/checklist_item
Source§impl ClickUpClient
impl ClickUpClient
Sourcepub fn task_query(&self, task: &TaskRef) -> Result<Query>
pub fn task_query(&self, task: &TaskRef) -> Result<Query>
custom_task_ids + team_id when the ref is a custom id.
Sourcepub async fn get_task(
&self,
task: &TaskRef,
include_subtasks: bool,
include_markdown: bool,
) -> Result<Task>
pub async fn get_task( &self, task: &TaskRef, include_subtasks: bool, include_markdown: bool, ) -> Result<Task>
GET /v2/task/{id}
Sourcepub async fn task_id(&self, task: &TaskRef) -> Result<String>
pub async fn task_id(&self, task: &TaskRef) -> Result<String>
Resolve a ref to the real task id (v3 endpoints don’t take custom ids).
Sourcepub async fn search_tasks(&self, filter: &TaskFilter) -> Result<Vec<Task>>
pub async fn search_tasks(&self, filter: &TaskFilter) -> Result<Vec<Task>>
Picks GET /v2/list/{id}/task (exactly one list) or
GET /v2/team/{id}/task, then pages until last_page, a short page,
limit, or the 500-page cap.
Sourcepub async fn create_task(
&self,
list_id: &str,
task: &CreateTask,
) -> Result<Task>
pub async fn create_task( &self, list_id: &str, task: &CreateTask, ) -> Result<Task>
POST /v2/list/{id}/task
Sourcepub async fn update_task(
&self,
task: &TaskRef,
update: &UpdateTask,
) -> Result<Task>
pub async fn update_task( &self, task: &TaskRef, update: &UpdateTask, ) -> Result<Task>
PUT /v2/task/{id} — custom fields are not updatable here.
pub async fn set_status(&self, task: &TaskRef, status: &str) -> Result<Task>
Sourcepub async fn delete_task(&self, task: &TaskRef) -> Result<()>
pub async fn delete_task(&self, task: &TaskRef) -> Result<()>
DELETE /v2/task/{id}
Sourcepub async fn move_task(
&self,
task: &TaskRef,
list_id: &str,
opts: &MoveTask,
) -> Result<Value>
pub async fn move_task( &self, task: &TaskRef, list_id: &str, opts: &MoveTask, ) -> Result<Value>
PUT /v3/workspaces/{ws}/tasks/{id}/home_list/{list}
Sourcepub async fn add_task_to_list(
&self,
task: &TaskRef,
list_id: &str,
) -> Result<()>
pub async fn add_task_to_list( &self, task: &TaskRef, list_id: &str, ) -> Result<()>
POST /v2/list/{list}/task/{id} (Tasks in Multiple Lists)
Sourcepub async fn remove_task_from_list(
&self,
task: &TaskRef,
list_id: &str,
) -> Result<()>
pub async fn remove_task_from_list( &self, task: &TaskRef, list_id: &str, ) -> Result<()>
DELETE /v2/list/{list}/task/{id}
Sourcepub async fn merge_tasks(
&self,
target: &TaskRef,
sources: &[String],
) -> Result<Value>
pub async fn merge_tasks( &self, target: &TaskRef, sources: &[String], ) -> Result<Value>
POST /v2/task/{target}/merge
Sourcepub async fn time_in_status(&self, task: &TaskRef) -> Result<Value>
pub async fn time_in_status(&self, task: &TaskRef) -> Result<Value>
GET /v2/task/{id}/time_in_status
Sourcepub async fn bulk_time_in_status(&self, task_ids: &[String]) -> Result<Value>
pub async fn bulk_time_in_status(&self, task_ids: &[String]) -> Result<Value>
GET /v2/task/bulk_time_in_status/task_ids?task_ids=… (plain ids).
Source§impl ClickUpClient
impl ClickUpClient
Sourcepub async fn time_entries(&self, query: &TimeQuery) -> Result<Vec<TimeEntry>>
pub async fn time_entries(&self, query: &TimeQuery) -> Result<Vec<TimeEntry>>
GET /v2/team/{id}/time_entries — defaults to the last 30 days for
the authenticated user.
Sourcepub async fn add_time_entry(&self, entry: &NewTimeEntry) -> Result<TimeEntry>
pub async fn add_time_entry(&self, entry: &NewTimeEntry) -> Result<TimeEntry>
POST /v2/team/{id}/time_entries
Sourcepub async fn start_timer(
&self,
task: Option<&TaskRef>,
description: Option<&str>,
) -> Result<TimeEntry>
pub async fn start_timer( &self, task: Option<&TaskRef>, description: Option<&str>, ) -> Result<TimeEntry>
POST /v2/team/{id}/time_entries/start
Sourcepub async fn stop_timer(&self) -> Result<TimeEntry>
pub async fn stop_timer(&self) -> Result<TimeEntry>
POST /v2/team/{id}/time_entries/stop
Sourcepub async fn current_timer(&self) -> Result<Option<TimeEntry>>
pub async fn current_timer(&self) -> Result<Option<TimeEntry>>
GET /v2/team/{id}/time_entries/current — None when no timer runs.
Sourcepub async fn delete_time_entry(&self, entry_id: &str) -> Result<()>
pub async fn delete_time_entry(&self, entry_id: &str) -> Result<()>
DELETE /v2/team/{id}/time_entries/{entry}
Source§impl ClickUpClient
impl ClickUpClient
pub fn new(cfg: &ClickUpConfig) -> Result<Self>
Sourcepub fn with_limiter(self, limiter: Arc<RateLimiter>) -> Self
pub fn with_limiter(self, limiter: Arc<RateLimiter>) -> Self
Share one limiter across clients (e.g. per-profile in the MCP server).