lazeroffmichael / ticktick-py

Unofficial TickTick API

Home Page:https://lazeroffmichael.github.io/ticktick-py/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need of sync call in CLI application

GirishPatel opened this issue · comments

I am trying to create CLI application using this library. Since CLI applications are adhoc and short lived, there is not point in maintaining session and doing sync call. Hence no requirement of passing username/password and initiating session.

So we can support oauth_only flag in TickTickClient and skip sync for all API calls.

@lazeroffmichael suggestions ?

Hey @GirishPatel - sorry for the super late response, but you are perfectly correct. The issue is that not all functionality works directly through OAuth - only tasks as far as I am aware. I would need to investigate further to see if other endpoints will work using only OAuth to consider removing the logging in/sessionizing entirely. An issue with the library right now is that it's very heavy in that I rely on the sync call to perform checks to catch errors earlier for users. I am heavily considering removing the automatic sync call needed for these checks in favor of just clearer documentation on known behaviors. In an ideal world, TickTick would implement and provide a more robust OpenAPI, but sadly it is not the case :(