rtm-cli icon indicating copy to clipboard operation
rtm-cli copied to clipboard

Surgically gets Task Series for use in the url command

Open beauraines opened this issue 3 years ago • 2 comments

Uses the local task index to build a more surgical request for getting task series with tasks

Fixes #21 where the url command would hang because it was requesting a HUGE number of tasks.

beauraines avatar Feb 26 '22 06:02 beauraines

After sleeping on this, I'm not proud of this PR. There is more I can do to make this reusable and more clear in what it's doing.

While the idea is still sound (get a task or task series by it's index) the implementation can be cleaned up..

I'll close this and make a new one when its ready.

beauraines avatar Feb 26 '22 17:02 beauraines

Reopening. I realized that this is good as it is. The code needs to be written this way as it is leveraging the callback functions. I'm not quite good enough to abstract the get tasks by index because it would need to use promises rather than callbacks and I think that would cascade down into rtm-api too.

beauraines avatar Aug 28 '22 18:08 beauraines

Similarly to #25, I updated the url command to use the hasUrl:true filter in the user.tasks.getTask function to reduce the number of tasks fetched from the API when trying to get the requested task.

dwaring87 avatar Sep 24 '22 19:09 dwaring87