Closed beauraines closed 2 years ago
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.
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.
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.
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.