-
Notifications
You must be signed in to change notification settings - Fork 12
Methods: Projects
Fabian Beiner edited this page Jan 2, 2020
·
5 revisions
Method:
getAllProjects();
Example:
var_dump($Todoist->getAllProjects());
array (size=7)
0 =>
array (size=3)
'id' => int 2168427835
'name' => string 'Inbox' (length=5)
'comment_count' => int 0
1 =>
array (size=4)
'id' => int 2168427836
'order' => int 1
'name' => string 'Personal' (length=8)
'comment_count' => int 0
2 =>
array (size=4)
'id' => int 2168427838
'order' => int 2
'name' => string 'Work' (length=4)
'comment_count' => int 0
Method:
createProject(string $projectName, [array $optionalParameters])
Example:
var_dump($Todoist->createProject('Example Project'));
array (size=4)
'id' => int 2225813386
'order' => int 5
'name' => string 'Example Project' (length=15)
'comment_count' => int 0
var_dump($Todoist->createProject('Child Project', ['parent' => 2225813386]));
array (size=5)
'id' => int 2225813402
'parent' => int 2225813386
'order' => int 1
'name' => string 'Child Project' (length=13)
'comment_count' => int 0
Method:
getProject(int $projectId)
Example:
var_dump($Todoist->getProject(2225813386));
array (size=4)
'id' => int 2225813386
'order' => int 5
'name' => string 'Example Project' (length=15)
'comment_count' => int 0
Method:
updateProject(int $projectId, string $newProjectName)
Example:
var_dump($Todoist->updateProject(2225813386, 'Example Project Renamed'));
boolean true
Method:
deleteProject(int $projectId)
Example:
var_dump($Todoist->deleteProject(2225813386));
boolean true
👋