Strava Upload is s simple library that synchronizes moves (activities) with Strava. In the first version it supports moves from Suunto Movescount (a generic move/activity class is planned to support other services). If the activity is found on Strava, it tries to update its description. If not, a new activity is being created.
The library is written in .NetCore (.Net Standard 2.0). The code is available GitHub and you can find it in NuGet too.
PM > Install-Package StravaUpload
It consists of the following projects:
The main project with the following important classes.
The main class for uploading. Nothing complicated :).
Azure function that periodically downloads data from Suunto Movescount, store them in Azure Blob Storage and synchronize them with Strava periodically.
Just a test project for the library created before Azure function project.
To be able to connect to Movescount API, you have to have following keys that are required to be able to get data:
- MovescountAppKey – App key to be able to query Movescount API.
- MovescountUserKey – User key to be able to query Movescount API.
- MovescountUserEmail – User email to be able to query Movescount API.
- MovescountMemberName – Name of the member whose data we want to get.
- CookieValue – A cookie value that is needed to export GPX, TCX and other move files. This value can be get by the following steps:
- Open console in your browser to se network requests.
- Login into Movescount.
- Select a request to http://www.movescount.com/api/members/private/messages.
- Copy value of Cookie key in request header. It should start with ASP.NET ….
Other Configuration for Strava and Azure function:
- BackupDir – Backup directory. Used as a root directory in Azure Blob Storage.
- StorageConnectionString – Connection string to Azure Blob Storage.
- ContainerName – Name of the Azure Blob Storage container.
- StravaAccessToken – Readwrite access token to Strava.
- SendGridApiKey – ApiKey to Sendgrid for email notification (optional).
- EmailFrom – Sender email address (optional).
- EmailTo – Recipient email address (optional).
Just deploy StravaUpload.StravaUploadFunction to Azure and set required configuration. Thats all :).
Contributing is welcomed.