You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.
I'm not sure if this is an issue with the API itself or if I just have a wrong understanding, however, I found out that I can send invalid data to the server using api.sync() and that those data are accepted by the server and additionally saved and fetched on the next synchronisation.
To make it easier to understand I wrote a code snippet explaining what I mean:
api=todoist.TodoistAPI(token)
api.sync()
foriteminapi.state["items"]:
ifitem["content"] =="test #issue65"andisinstance(item["due"], dict): # makes sure that we only modify an item that the content "test #issue65" and a due-dateprint(item["due"])
item["due"] = ["i can put here", "whatever i want"]
print(item["due"])
api.sync()
print(item["due"])
The result I get is the following:
{'date': '2019-10-29', 'timezone': None, 'is_recurring': False, 'string': 'Okt 29', 'lang': 'de'}
['i can put here', 'whatever i want']
['i can put here', 'whatever i want']
Creating a new Todoist-API-instance doesn't change anything:
defrun_through():
print("running through ...")
token="token"api=todoist.TodoistAPI(token)
api.sync()
foriteminapi.state["items"]:
ifitem["content"] =="test #issue47":
print(item["due"])
ifisinstance(item["due"], dict): # makes sure that we only modify an item that the content "test #issue47" and a due-dateitem["due"] = ["i can put here", "whatever i want"]
print(item["due"])
api.sync()
print(item["due"])
run_through()
run_through()
running through ...
{'date': '2019-10-29', 'timezone': None, 'is_recurring': False, 'string': '29 Okt', 'lang': 'de'}
['i can put here', 'whatever i want']
['i can put here', 'whatever i want']
running through ...
['i can put here', 'whatever i want']
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm not sure if this is an issue with the API itself or if I just have a wrong understanding, however, I found out that I can send invalid data to the server using
api.sync()
and that those data are accepted by the server and additionally saved and fetched on the next synchronisation.To make it easier to understand I wrote a code snippet explaining what I mean:
The result I get is the following:
Creating a new
Todoist-API
-instance doesn't change anything:The text was updated successfully, but these errors were encountered: