So, if someone doesn’t want to use IFTTT for hooking up a flic button with Beeminder, they can just use the Beeminder API directly.
This action is also available for the flic widgets, so you can play around with this even without a physical button (*2).
Now what I really want to do is call the Beeminder app directly or as the second best thing this Shortcut:
And while flickr integrates with a whole bunch of other services, they do not yet have a Shortcuts integration (let alone one for Beeminder of course). So I went ahead and bugged their support about it. They said to submit this as an idea on their ideas.flic.io page and so I did. Only to later discover that this was already suggested last year:
I tried the workaround suggested on the flic page and it is working but when you use it with a button (and only then (!)) it requires you to tap on to the notification that flic is presenting to you. This being said it is a nice URL scheme example.
Here is what I did:
I got the iOS Shortcut that @dehowell prepared, put my auth token etc. in there, then made another Shortcut called “Log Water”:
I could have skipped this step and passed the parameters directly into the URL as &input=… but this way I can have Apple Health integration, too!
Now when I run this directly from within the flic app by tapping on the double click action it kicks Shortcuts and I have my data point together with a nicely formatted time stamp in Beeminder and I even got it noted down in Apple Health.
If I use the actual flic button however I get this:
I have since turned the necessity of tapping onto the notification into a feature by adding a little bit of interactivity.
Now the shortcut presents me with the choice between a 200ml, 250ml or 300ml glas.
The selected amount gets added into Apple Health and once that is done I divide it by 250 (which is 8oz), format the number as text, then replace “,” with “.” because sadly the “Format Number” action does not allow to specify the locale and then I pass it to Beeminder.
Lastly Shortcuts opens the Beeminder app so I’m back on my stopwatch screen.