The PROBLEM: We are a group of friend doing indoor cycling using Zwift (Onliny Cycling and Running APP in virtual worlds). For each completed route Zwift gives you a badge of "Route Completed". We what to know which uncompleted route we have in common? Zwift DOES NOT have an API to access information.
WHY I DO IT: I want to learn Azure and do something that help me and my friends!
I created some Azure Functions to solve this problem and also created a Telegram bot to access the information from our phones.
I created a webscraper to download routes from https://zwifthacks.com/app/routes/.
To import your completed route I created two options:
- HttpTrigger Azure Functions to add/remove completed routes.
- Upload screenshot to Azure Storage (BLOB)
- An Azure Function triggered by the new BLOB identifies completed routes (using https://www.customvision.ai/) and then identifies the name of completed routes (using https://cloud.google.com/vision/docs/ocr) and stored the results in a queue. I tried first using Computer Vision from Azure but it does not detect text so I switched to Google OCR.
- An Azure Function triggered by the new message in the Queue marks completed routes as DONE in your profile.
User data is stored in Cosmos DB (just for learning porpouses)
Also there are other HttpTrigger Azure Functions to get pending routes.
This API is consumed by an Telegram Bot that I created using Azure Bot Service.