krugerk
December 12, 2023, 4:25pm
2
In the meanwhile, you could set up an iOS shortcut to make the call for you. Upon tapping (executing) the shortcut, it could ask you which bmndr goal and which date, defaulting to the one 90 days ago.
Your wish is my challenge…
#!/bin/sh
# from https://www.beeminder.com/api/v1/auth_token.json
AUTH_TOKEN=your_token
USER=your_username
for GOAL in $( curl https://www.beeminder.com/api/v1/users/$USER.json?auth_token=$AUTH_TOKEN | sed -e 's/[^[]*//; s/^.//; s/].*//; s/[",]/ /g' )
do
echo $GOAL
curl -X PUT -d '{"tmin":"2016-01-01"}' https://www.beeminder.com/api/v1/users/$USER/goals/$GOAL.json?auth_token=$AUTH_TOKEN --header "Content-Type: application/json" > /dev/null
done
U…
The parameters tmin and tmax have since been documented at Beeminder API Reference .
3 Likes