tgtg
tgtg copied to clipboard
[Feature suggestion] - Extended "order is ready" notifications
Hi,
I think getting a notification at another point before or during the pickup time would be nice to have. The timing of those reminders should be configurable and there can be multiple. Also, the remaining pickup time and the time it takes to get to the item location could be taken into consideration. The time it takes to get there with current traffic could be retrieved with the Google Maps Distance Matrix API Advanced.
The cost of that in the Google Maps Distance Matrix API Advanced would be negligible for a normal use case:
1 (magic bag per day) * 4 (possible modes of transportation) * 2 (reminders, for example when the pickup time starts and halfway through) * 30 (days) = 240 requests * 0,01 $ = 2,4 $ / month. If you would only like to use one or two modes / just one reminder or don't buy a magic bag every day it could even be less. Anyways, the 200$ Maps API free contingent per month will not be exceeded.
Example message: Your order is ready for pickup in 5 minutes! Pickup time ends in 20 minutes. Time it takes to get there with current traffic:
- Driving: 6 minutes
- Walking: 25 minutes (exceeds pickup time by 10 minutes)
Why? The TGTG app only reminds you of picking up your order about one hour before the pickup time starts. I recently found myself in a situation, where I got the 1-hour-before notification while I was doing something else. Time flies and I almost forgot to pick up the magic bag because I don't take an hour to get there but just a few minutes.
Hi @nikdav. That's a nice feature.
A connection to the google maps API is already included in the code and will be part of the next release. At the moment it allows to include distance and duration information to be included in the regular notifications.
As I am very busy at the moment it may take some time until I can work on this feature. If you want you can try to code it yourself and create a pull request.
Edit: I didn't see that you made the PR for the google maps API :)
Looks good.
Snippet (using distance_walking and duration_walking); Telegram notify.
Pickup: ... Walking distance (duration): 2.5 km (31 minutes), from home Link: ...
Thank you.