I have a bunch of personal integrations I’ve written for Beeminder that Beeminder already calls on its own schedule.
The integration has a little web endpoint that wakes up in response to the request, checks the input parameters, gathers the data and replies by adding data to the appropriate goal with its own request a few seconds later. The sync button in Beeminder works fine, works on the apps…
It was a convenient enough model back when I wrote a bunch of those integrations (mostly before I did any development for Beeminder) but we could definitely make it better.
I try to do my best to keep up with low- and no-code services but there are too many!
Would it be more convenient if Beeminder were to keep the request open for 30 seconds for the service to get whatever data it needs and reply to the request with the datapoint itself, rather than using the request as a trigger to make a counter request? It would mean you wouldn’t need to have your Beeminder auth, I guess. If you wanted to use it as a trigger you could reply with an HTTP OK or something and that’d close the connection so Beeminder isn’t waiting for you.
Beeminder should probably provide the start and end timestamps of the Beeminder day in question in order to reduce the developer effort.
It may be slick for Beeminder to provide a unique handle each time it pokes the service that can be given back, if you use it as a trigger rather than just reply to the request. This could be helpful for troubleshooting, and probably other stuff that isn’t immediately obvious to me. I know that Heroku (RIP free tier) and Glitch et al sometimes have issues waking up in time, and having that back and forth record could be helpful. It’d be optional, so no harm no foul if you ignored it.
I know @narthur knows about this, but there’s another model I have been dreaming of for nearly a decade. I want an API endpoint that accepts a datapoint value. If the value were to change the “day’s aggregated value”, it adds that datapoint and replies with one response code. If it wouldn’t change the day’s datapoint, it doesn’t add the datapoint. (I haven’t thought through the value of updating the timestamp if it is a non-changer. Undecided.). This isn’t perfect for every type of data, but there are a lot of types where it would be awesome if someone’s random script doesn’t need to know anything about the goal. Who cares about custom deadlines, timezones, if it’s a new day, anything! Set up an automatic job to get the data and send it to Beeminder every ten minutes and forget about it. You won’t make pages of datapoints each day unless your data is really changing that often. Doing this today is definitely possible, but it’s silly how much work it is.
I’m just about wrapped up with a project I’ve been working on for two years now. One of the things I’ve had on the back burner is a demo personal integration that runs Playwright, does some browser interaction, scrapes a value, and gives it to Beeminder. Playwright has some decent tools for creation and debugging that require much less developer background than you’d think, and if I hooked it up as a template project on Replit it should be an even lower barrier to entry. It sounds like maybe the demo would be helpful even if I gutted the Playwright.
What do you folks think?