2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-23 20:52:13 +00:00

98_todoist: API v8 - not perfect but better

git-svn-id: https://svn.fhem.de/fhem/trunk@20139 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
marvin78 2019-09-09 18:39:41 +00:00
parent 38618adb1b
commit fc40d64a70

View File

@ -17,7 +17,7 @@ eval "use Date::Parse;1" or $missingModule .= "Date::Parse ";
#######################
# Global variables
my $version = "1.2.0.8";
my $version = "1.2.1";
my $srandUsed;
@ -443,7 +443,7 @@ sub todoist_UpdateTask($$$) {
Log3 $name,4, "todoist ($name): JSON sent to todoist API: ".Dumper($data);
$param = {
url => "https://todoist.com/api/v7/sync",
url => "https://todoist.com/sync/v8/sync",
data => $data,
tTitle => $title,
method => $method,
@ -567,7 +567,7 @@ sub todoist_CreateTask($$) {
$param = {
url => "https://todoist.com/api/v7/items/add",
url => "https://todoist.com/sync/v8/items/add",
data => $data,
tTitle => $title,
method => "POST",
@ -734,10 +734,10 @@ sub todoist_GetTasks($;$) {
};
# set url for API access
my $url = "https://todoist.com/api/v7/projects/get_data";
my $url = "https://todoist.com/sync/v8/projects/get_data";
## check if we get also the completed Tasks
if ($completed == 1) {
$url = "https://todoist.com/api/v7/completed/get_all";
$url = "https://todoist.com/sync/v8/completed/get_all";
$data->{'limit'}=50;
}
@ -1038,7 +1038,7 @@ sub todoist_GetUsers($) {
Log3 $name,5, "$name: hash: ".Dumper($hash);
$param = {
url => "https://todoist.com/api/v7/sync",
url => "https://todoist.com/sync/v8/sync",
data => $data,
timeout => 7,
method => "POST",
@ -1177,7 +1177,7 @@ sub todoist_GetProjects($) {
Log3 $name,5, "$name: hash: ".Dumper($hash);
$param = {
url => "https://todoist.com/api/v7/sync",
url => "https://todoist.com/sync/v8/sync",
data => $data,
timeout => 7,
method => "POST",