-
Notifications
You must be signed in to change notification settings - Fork 12
Methods: Labels
Fabian Beiner edited this page Jan 2, 2020
·
6 revisions
Labels are a Premium feature by Todoist.
Method:
getAllLabels()
Example:
var_dump($Todoist->getAllLabels());
array (size=2)
0 =>
array (size=3)
'id' => int 2148896065
'name' => string 'Tomorrow' (length=8)
'order' => int 1
1 =>
array (size=3)
'id' => int 2148896066
'name' => string 'Someday' (length=7)
'order' => int 2
Method:
createLabel(string $labelName, [array $optionalParameters])
Example:
var_dump($Todoist->createLabel('Another Label'));
array (size=3)
'id' => int 2153820097
'name' => string 'Another_Label' (length=13)
'order' => int 26
Method:
getLabel(int $labelId)
Example:
var_dump($Todoist->getLabel(2153820097));
array (size=3)
'id' => int 2153820097
'name' => string 'Another_Label' (length=13)
'order' => int 26
Method:
updateLabel(int $labelId, string $newLabelName)
Example:
var_dump($Todoist->updateLabel(2153820097, 'New Name Label'));
boolean
Method:
deleteLabel(int $labelId)
Example:
var_dump($Todoist->deleteLabel(2153820097));
boolean
👋