Skip to content

REST API created using Azure Functions to be consumed by Telegram bot developed with Azure Service Bot

Notifications You must be signed in to change notification settings

ibanezjp/zwiftapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zwift API using Azure Functions

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:

Manual import one by one.

  1. HttpTrigger Azure Functions to add/remove completed routes.

Auto import from a screen shot.

  1. Upload screenshot to Azure Storage (BLOB)
  2. 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.
  3. An Azure Function triggered by the new message in the Queue marks completed routes as DONE in your profile.

Badges

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.

About

REST API created using Azure Functions to be consumed by Telegram bot developed with Azure Service Bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages