Inspired by @shanaqui, I have been Beeminding the books I read for the past few years. The intent being not to force myself to read anything I dislike (I readily archive the goal if the book isn’t one I want to continue), but to keep myself from wandering from one shiny and exciting book to another and never finishing anything. It works pretty well: since starting doing this in late 2020 I’ve finished way more of the books I’ve started.
Recently, a question popped into my head: how much money have I spent on finishing books? I’m happy to have spent the money, of course: paying is not punishment. Quite the opposite, I want to be able to brag: I spent $X and in exchange I got to complete all these books instead of forgetting to continue them halfway through. Beyond the general benefits Beeminder gives me, this is a specific major win I can credit Beeminder with.
Unfortunately, I don’t really have an easy way to get this data. If only there were a charges API! If I could pull all instances of Beeminder charging me from some API, each with the slug of the goal the charge was for, I could write a few lines of bash, using curl
and jq
to pull all my goals, find those tagged book
, and do the join.
I enjoy doing this kind of ad-hoc scripting to answer interesting questions, especially those of the quantified self variety. For instance, I have nice graphs I’ve generated of things like number of Beeminder data points per year, showing my use of Beeminder over time, and also correlating it with various things going on in my life.
So it’s a bit disappointing that I can’t answer this question as easily as some others, with a bit of scripting. I could work around this by exporting my payment history and my honey money balance history and extracting goal slugs using regexes, but that would be more manual than is ideal—I’d like to have a little script I could run whenever that gives me the up-to-date value.
Ideally there’d be an API endpoint I could call, /api/v1/users/me/charges.json
or whatever, that would return a list of objects with the keys amount
, timestamp
, and slug
, and maybe also things like status
or payment_type
, but that’s less important.
Others have asked for this in the past, but hopefully my specific use-case helps give a motivation for how this could be worth building.