So, I recently changed over my todo list usage to use Todoist. However, now I had a chunky amount of my phone screen chewed up with both a display of that and my existing Beeminder list, and I wondered if I could somehow merge the two. Also, because my Beeminder emergency days are one of the significant sources of things I need to on a day to day basis, having a single view of things is really quite useful.
Enter Docket (yes, I know that sounds a lot like another tool you may be familiar with…), which will go through and create tasks in Todoist corresponding to Beeminder emergency days. I’d used the Beeminder API before, and was familiar with it, and it uses fairly standard REST-ish methods covering at most of the things people want access to.
The Todoist API is somewhat less user-friendly. Part of this wasn’t helped by their official Python library (which is their only API library AFAIK), which appears to be still part way through a conversion to the latest version of their API, and various items like the “resource_types” argument in their example code doesn’t work any more.
Here’s a list of things I ran into along the way, and this is all with their official HTTP API:
- Pretty much everything needs a POST, even reading data.
- All of the different sections about various different items talk about adding, updating and deleting, but *not* about how to actually read said data to start with, because that’s all done by one great big “sync” method that gets all of your data in one go.
- Changing the project id of a task needs you to call a separate “move” method (which also needs to be told explicitly where a task came from), when everything else can just be set in one consistent way
- All of these requests get sent to the *same* URL, just with different variants of the “commands” argument listing all the things you want to do.
- Oh, and their output datetime formats are different from their input datetime formats…
Overall, I get the impression that what they actually built this for was low data-rate syncing, with rare calls to the “sync” command and any changes batched locally as the command structures before being occasionally sent off, but it makes for a very unfriendly experience for anyone coming from outside. I suspect it makes a lot of sense to their internal developers, but this was not designed with external users in mind.
Despite all that, much complaining and head scratching later I was able to build Docket, and the code is available as per always.