Skip to main content

ClickUpClient

Struct ClickUpClient 

Source
pub struct ClickUpClient { /* private fields */ }

Implementations§

Source§

impl ClickUpClient

Source

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.

Source

pub async fn task_comments( &self, task: &TaskRef, limit: Option<usize>, ) -> Result<Vec<Comment>>

Pages through comments until limit (or all when None).

Source

pub async fn add_comment( &self, task: &TaskRef, text: &str, assignee: Option<i64>, notify_all: bool, ) -> Result<Value>

POST /v2/task/{id}/comment

Source

pub async fn update_comment( &self, comment_id: &str, text: &str, resolved: Option<bool>, ) -> Result<()>

PUT /v2/comment/{id}

Source

pub async fn delete_comment(&self, comment_id: &str) -> Result<()>

DELETE /v2/comment/{id}

Source

pub async fn comment_replies(&self, comment_id: &str) -> Result<Vec<Comment>>

GET /v2/comment/{id}/reply

Source

pub async fn reply_comment( &self, comment_id: &str, text: &str, notify_all: bool, ) -> Result<Value>

POST /v2/comment/{id}/reply

Source§

impl ClickUpClient

Source

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).

Source

pub async fn get_doc(&self, doc_id: &str) -> Result<Value>

GET /v3/workspaces/{ws}/docs/{doc}

Source

pub async fn doc_page_listing(&self, doc_id: &str) -> Result<Value>

GET …/docs/{doc}/page_listing

Source

pub async fn doc_pages(&self, doc_id: &str) -> Result<Value>

GET …/docs/{doc}/pages (markdown content)

Source

pub async fn doc_page(&self, doc_id: &str, page_id: &str) -> Result<Value>

GET …/docs/{doc}/pages/{page} (markdown content)

Source

pub async fn create_doc( &self, name: &str, parent: Option<(&str, DocParent)>, ) -> Result<Value>

POST /v3/workspaces/{ws}/docs

Source

pub async fn create_doc_page( &self, doc_id: &str, name: &str, content: Option<&str>, parent_page_id: Option<&str>, ) -> Result<Value>

POST …/docs/{doc}/pages

Source

pub async fn edit_doc_page( &self, doc_id: &str, page_id: &str, content: Option<&str>, name: Option<&str>, mode: &str, ) -> Result<Value>

PUT …/docs/{doc}/pages/{page}; mode = replace | append | prepend.

Source§

impl ClickUpClient

Source

pub async fn list_fields(&self, list_id: &str) -> Result<Vec<CustomField>>

GET /v2/list/{id}/field

Source

pub async fn set_field( &self, task: &TaskRef, field_id: &str, value: &FieldValue, ) -> Result<()>

POST /v2/task/{id}/field/{field_id}

Source

pub async fn clear_field(&self, task: &TaskRef, field_id: &str) -> Result<()>

DELETE /v2/task/{id}/field/{field_id}

Source§

impl ClickUpClient

Source

pub async fn user(&self) -> Result<User>

GET /v2/user

Source

pub async fn workspaces(&self) -> Result<Vec<Workspace>>

GET /v2/team — authorized workspaces, including members.

Source

pub async fn find_workspace(&self, input: &str) -> Result<Workspace>

Find an authorized workspace by id or (case-insensitive) name.

Source

pub async fn workspace_members(&self) -> Result<Vec<User>>

Members of the current workspace (from GET /v2/team).

Source

pub async fn workspace_plan(&self) -> Result<Value>

GET /v2/team/{id}/plan

Source

pub async fn spaces(&self, archived: bool) -> Result<Vec<Space>>

GET /v2/team/{id}/space

Source

pub async fn space(&self, space_id: &str) -> Result<Space>

GET /v2/space/{id}

Source

pub async fn folders( &self, space_id: &str, archived: bool, ) -> Result<Vec<Folder>>

GET /v2/space/{id}/folder — each folder includes its lists.

Source

pub async fn folder_lists( &self, folder_id: &str, archived: bool, ) -> Result<Vec<List>>

GET /v2/folder/{id}/list

Source

pub async fn folderless_lists( &self, space_id: &str, archived: bool, ) -> Result<Vec<List>>

GET /v2/space/{id}/list

Source

pub async fn list(&self, list_id: &str) -> Result<List>

GET /v2/list/{id} — includes statuses.

Source

pub async fn list_members(&self, list_id: &str) -> Result<Vec<User>>

GET /v2/list/{id}/member

Source

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).

Source

pub async fn create_folder(&self, space_id: &str, name: &str) -> Result<Folder>

POST /v2/space/{id}/folder

Source

pub async fn custom_task_types(&self) -> Result<Vec<Value>>

GET /v2/team/{id}/custom_item — custom task types.

Source

pub async fn space_tags(&self, space_id: &str) -> Result<Vec<Tag>>

GET /v2/space/{id}/tag

Source§

impl ClickUpClient

Source

pub async fn add_tag(&self, task: &TaskRef, tag: &str) -> Result<()>

POST /v2/task/{id}/tag/{name} — the tag must exist in the space.

Source

pub async fn remove_tag(&self, task: &TaskRef, tag: &str) -> Result<()>

DELETE /v2/task/{id}/tag/{name}

POST /v2/task/{id}/link/{other}

DELETE /v2/task/{id}/link/{other}

Source

pub async fn add_dependency( &self, task: &TaskRef, other: &TaskRef, kind: Dependency, ) -> Result<()>

POST /v2/task/{id}/dependency body { depends_on | dependency_of }

Source

pub async fn remove_dependency( &self, task: &TaskRef, other: &TaskRef, kind: Dependency, ) -> Result<()>

DELETE /v2/task/{id}/dependency?depends_on=…|dependency_of=…

Source

pub async fn create_checklist( &self, task: &TaskRef, name: &str, items: &[String], ) -> Result<Checklist>

POST /v2/task/{id}/checklist, then one call per item.

Source

pub async fn add_checklist_item( &self, checklist_id: &str, name: &str, ) -> Result<Checklist>

POST /v2/checklist/{id}/checklist_item

Source

pub async fn update_checklist_item( &self, checklist_id: &str, item_id: &str, resolved: Option<bool>, name: Option<&str>, ) -> Result<Value>

PUT /v2/checklist/{id}/checklist_item/{item}

Source

pub async fn upload_attachment( &self, task: &TaskRef, path: &Path, ) -> Result<Value>

POST /v2/task/{id}/attachment (multipart field attachment).

Source§

impl ClickUpClient

Source

pub fn task_query(&self, task: &TaskRef) -> Result<Query>

custom_task_ids + team_id when the ref is a custom id.

Source

pub async fn get_task( &self, task: &TaskRef, include_subtasks: bool, include_markdown: bool, ) -> Result<Task>

GET /v2/task/{id}

Source

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).

Source

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.

Source

pub async fn create_task( &self, list_id: &str, task: &CreateTask, ) -> Result<Task>

POST /v2/list/{id}/task

Source

pub async fn update_task( &self, task: &TaskRef, update: &UpdateTask, ) -> Result<Task>

PUT /v2/task/{id} — custom fields are not updatable here.

Source

pub async fn set_status(&self, task: &TaskRef, status: &str) -> Result<Task>

Source

pub async fn delete_task(&self, task: &TaskRef) -> Result<()>

DELETE /v2/task/{id}

Source

pub async fn move_task( &self, task: &TaskRef, list_id: &str, opts: &MoveTask, ) -> Result<Value>

PUT /v3/workspaces/{ws}/tasks/{id}/home_list/{list}

Source

pub async fn add_task_to_list( &self, task: &TaskRef, list_id: &str, ) -> Result<()>

POST /v2/list/{list}/task/{id} (Tasks in Multiple Lists)

Source

pub async fn remove_task_from_list( &self, task: &TaskRef, list_id: &str, ) -> Result<()>

DELETE /v2/list/{list}/task/{id}

Source

pub async fn merge_tasks( &self, target: &TaskRef, sources: &[String], ) -> Result<Value>

POST /v2/task/{target}/merge

Source

pub async fn time_in_status(&self, task: &TaskRef) -> Result<Value>

GET /v2/task/{id}/time_in_status

Source

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

Source

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.

Source

pub async fn add_time_entry(&self, entry: &NewTimeEntry) -> Result<TimeEntry>

POST /v2/team/{id}/time_entries

Source

pub async fn start_timer( &self, task: Option<&TaskRef>, description: Option<&str>, ) -> Result<TimeEntry>

POST /v2/team/{id}/time_entries/start

Source

pub async fn stop_timer(&self) -> Result<TimeEntry>

POST /v2/team/{id}/time_entries/stop

Source

pub async fn current_timer(&self) -> Result<Option<TimeEntry>>

GET /v2/team/{id}/time_entries/current — None when no timer runs.

Source

pub async fn delete_time_entry(&self, entry_id: &str) -> Result<()>

DELETE /v2/team/{id}/time_entries/{entry}

Source§

impl ClickUpClient

Source

pub fn new(cfg: &ClickUpConfig) -> Result<Self>

Source

pub fn with_limiter(self, limiter: Arc<RateLimiter>) -> Self

Share one limiter across clients (e.g. per-profile in the MCP server).

Source

pub fn with_workspace(self, workspace_id: impl Into<String>) -> Self

Source

pub fn limiter(&self) -> &Arc<RateLimiter> ⓘ

Source

pub fn timezone(&self) -> Option<&str>

Source

pub fn workspace_id(&self) -> Result<&str>

Source

pub async fn raw( &self, method: &str, path: &str, body: Option<Value>, ) -> Result<Value>

Escape hatch for clickupc api / clickup_api_request. path may carry a query string; {workspace} is substituted.

Trait Implementations§

Source§

impl Clone for ClickUpClient

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ClickUpClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more