Write, Bureaucrats, Administrators
4,332
edits
mNo edit summary |
mNo edit summary |
||
Line 354: | Line 354: | ||
var commands='[{"uuid":"' + guid() + '","temp_id":"' + guid() + | var commands='[{"uuid":"' + guid() + '","temp_id":"' + guid() + | ||
'","type":"item_add","args":{"content":"' + entry().field("Task") + '"}}]' | '","type":"item_add","args":{"content":"' + entry().field("Task") + '"}}]' | ||
// Execute the HTTP request. An attribute called '''token''' is used for authorization in Todoist. | // Execute the HTTP request. An attribute called '''token''' is used for authorization in Todoist. | ||
// It is available in the Todoist Account setting. Since the text of the task can include symbols | // It is available in the Todoist Account setting. Since the text of the task can include symbols | ||
Line 359: | Line 360: | ||
result = http().get("https://todoist.com/API/v7/sync?token=15281e8e4d499dаff817af0b14112eac3176f9dc&commands=" + | result = http().get("https://todoist.com/API/v7/sync?token=15281e8e4d499dаff817af0b14112eac3176f9dc&commands=" + | ||
encodeURIComponent(commands)) | encodeURIComponent(commands)) | ||
// Show the user a message indicating successful creation of the task. | // Show the user a message indicating successful creation of the task. | ||
if (result.code == 200) message('Task has been successfully created") | if (result.code == 200) message('Task has been successfully created") |