Closed aadilayub closed 4 years ago
Hi @aadilayub! It is really nice to see this small project being used by other people.
As for the question, unfortunately there are none yet, but I've already started to look into it, it might take some time (from 2 weeks to a month) because life is keeping me very busy for now, but I already know where to start.
However, there is a temporary fix. You can directly access the Tick class and use the "private" method _getAllUncompleted()
, so after login it would be something like TickTick.Task._getAllUncompleted()
. From there you can use your favorite date filter method to get only tasks due today or other things like that.
There will be better ways though, including adding a properly documented method to retrieve all todo tasks (not just in a specific list).
Edit: I've hijacked this issue to remind me of finishing this later ;)
Thanks! I'll try that
So I tried to get this working again and I'm getting this error:
ticktick.Task._getAllUncompleted is not a function
The ticktick
class is coming from
const ticktick = require('./index');
Thank you, it has been fixed on v0.2.0
You can now use ticktick.tasks.getUncompleted()
.
The method to get all lists has also been renamed to ticktick.lists.getAll()
I couldn't find anything on TickTick's API that would allow we to properly filter by date. It seems that date filtering only work for requests for completed tasks, which I suppose are for syncing the local database, not the current goal of this library atm (having a local db).
It seems the viable solution is to request all uncompleted tasks and filter yourself via the attributes. I won't put specific dates into the library, like "getToday" because I don't really have the time these days, sorry for that!
I am happy to accept any contributions though.
thanks for fixing that method! I'll try to make a PR once I've figured out a reliable way to filter tasks due today.
Is there any method to list the tasks due for the day? I tried to use the
getListByName()
function but there's no list corresponding toToday