Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Methods: Comments

Fabian Beiner edited this pageNov 15, 2017 ·2 revisions

“Comments” methods and examples

Get all comments

Method:

getAllComments($type,$typeId);// $type has to be "project" or "task"// Alternatives:getAllCommentsByTask($taskId);getAllCommentsByProject($projectId);

Example:

$allComments =$Todoist->getAllComments('project','2168427837');print_r($allComments);Array(    [0] =>stdClass Object        (            [id] =>2214937295            [project_id] =>2168427837            [posted] =>2017-11-15T18:51:13Z            [content] => Remember the budget!  :-o         ))

Create a new comment

Method:

createComment($type,$typeId,$comment);// $type has to be "project" or "task"// Alternatives:createCommentForTask($taskId,$comment);createCommentForProject($projectId,$comment);

Example:

$comment =$Todoist->createComment('project','2168427837','But I got money!');print_r($comment);stdClass Object(    [id] =>2214942717    [project_id] =>2168427837    [posted] =>2017-11-15T19:17:50Z    [content] => But I got money!)

Get a comment

Method:

getComment($commentId);

Example:

$comment =$Todoist->getComment('2214942717');print_r($comment);stdClass Object(    [id] =>2214942717    [project_id] =>2168427837    [posted] =>2017-11-15T19:17:50Z    [content] => But I got money!)

Update a comment

Method:

updateComment($commentId,$content);

Example:

$success =$Todoist->updateComment('2214942717','OK OK. I got _some_ money.');print_r($success);1

Delete a comment

Method:

deleteComment($commentId);

Example:

$success =$Todoist->deleteComment('2214942717');print_r($success);1

👋

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp