TodoistWrapper

Struct TodoistWrapper 

Source
pub struct TodoistWrapper { /* private fields */ }
Expand description

A comprehensive wrapper around the Todoist REST API v2

Implementations§

Source§

impl TodoistWrapper

Source

pub fn new(api_token: String) -> Self

Create a new Todoist client

Source

pub async fn get_projects(&self) -> TodoistResult<Vec<Project>>

Get all projects

Source

pub async fn get_projects_filtered( &self, args: &ProjectFilterArgs, ) -> TodoistResult<Vec<Project>>

Get projects with filtering and pagination

Source

pub async fn get_project(&self, project_id: &str) -> TodoistResult<Project>

Get a specific project by ID

Source

pub async fn create_project( &self, args: &CreateProjectArgs, ) -> TodoistResult<Project>

Create a new project

Source

pub async fn update_project( &self, project_id: &str, args: &UpdateProjectArgs, ) -> TodoistResult<Project>

Update an existing project

Source

pub async fn delete_project(&self, project_id: &str) -> TodoistResult<()>

Delete a project

Source

pub async fn get_tasks(&self) -> TodoistResult<Vec<Task>>

Get all tasks

Source

pub async fn get_tasks_for_project( &self, project_id: &str, ) -> TodoistResult<Vec<Task>>

Get tasks for a specific project

Source

pub async fn get_task(&self, task_id: &str) -> TodoistResult<Task>

Get a specific task by ID

Source

pub async fn get_tasks_by_filter( &self, args: &TaskFilterArgs, ) -> TodoistResult<Vec<Task>>

Get tasks by filter query

Source

pub async fn create_task(&self, args: &CreateTaskArgs) -> TodoistResult<Task>

Create a new task

Source

pub async fn update_task( &self, task_id: &str, args: &UpdateTaskArgs, ) -> TodoistResult<Task>

Update an existing task

Source

pub async fn complete_task(&self, task_id: &str) -> TodoistResult<()>

Complete a task

Source

pub async fn reopen_task(&self, task_id: &str) -> TodoistResult<()>

Reopen a completed task

Source

pub async fn delete_task(&self, task_id: &str) -> TodoistResult<()>

Delete a task

Source

pub async fn get_labels(&self) -> TodoistResult<Vec<Label>>

Get all labels

Source

pub async fn get_labels_filtered( &self, args: &LabelFilterArgs, ) -> TodoistResult<Vec<Label>>

Get labels with filtering and pagination

Source

pub async fn get_label(&self, label_id: &str) -> TodoistResult<Label>

Get a specific label by ID

Source

pub async fn create_label(&self, args: &CreateLabelArgs) -> TodoistResult<Label>

Create a new label

Source

pub async fn update_label( &self, label_id: &str, args: &UpdateLabelArgs, ) -> TodoistResult<Label>

Update an existing label

Source

pub async fn delete_label(&self, label_id: &str) -> TodoistResult<()>

Delete a label

Source

pub async fn get_sections(&self) -> TodoistResult<Vec<Section>>

Get all sections

Source

pub async fn get_sections_filtered( &self, args: &SectionFilterArgs, ) -> TodoistResult<Vec<Section>>

Get sections with filtering and pagination

Source

pub async fn get_section(&self, section_id: &str) -> TodoistResult<Section>

Get a specific section by ID

Source

pub async fn create_section( &self, args: &CreateSectionArgs, ) -> TodoistResult<Section>

Create a new section

Source

pub async fn update_section( &self, section_id: &str, args: &UpdateSectionArgs, ) -> TodoistResult<Section>

Update an existing section

Source

pub async fn delete_section(&self, section_id: &str) -> TodoistResult<()>

Delete a section

Source

pub async fn get_comments(&self) -> TodoistResult<Vec<Comment>>

Get all comments

Source

pub async fn get_comments_filtered( &self, args: &CommentFilterArgs, ) -> TodoistResult<Vec<Comment>>

Get comments with filtering and pagination

Source

pub async fn get_comment(&self, comment_id: &str) -> TodoistResult<Comment>

Get a specific comment by ID

Source

pub async fn create_comment( &self, args: &CreateCommentArgs, ) -> TodoistResult<Comment>

Create a new comment

Source

pub async fn update_comment( &self, comment_id: &str, args: &UpdateCommentArgs, ) -> TodoistResult<Comment>

Update an existing comment

Source

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

Delete a comment

Trait Implementations§

Source§

impl Clone for TodoistWrapper

Source§

fn clone(&self) -> TodoistWrapper

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,