MovescountBackup 1.0.2

.NET Standard 2.0
Install-Package MovescountBackup -Version 1.0.2
dotnet add package MovescountBackup --version 1.0.2
<PackageReference Include="MovescountBackup" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MovescountBackup --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MovescountBackup, 1.0.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install MovescountBackup as a Cake Addin
#addin nuget:?package=MovescountBackup&version=1.0.2

// Install MovescountBackup as a Cake Tool
#tool nuget:?package=MovescountBackup&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Movescount Backup

Movescount Backup is s simple library that can download move records from Suunto Movescount. I have created it just because there is no official way how to create a backup of all your moves and an optional possibility to migrate them to other service such as Garmin or Strava.

Version

  • Version 1.0.2 - 2018-03-23

Getting Started/Installing

PM> Install-Package MovescountBackup -Version 1.0.2

Project Description

The solution consists of the following projects:

  • MovescountBackup.Lib is the main library containing client for downloading, main downloader, models and other services.

  • MovescountBackup.Console is just a sample that can be run locally.

  • MovescountBackup.Lib.Spec TODO.

Prerequisites

  • .NET Core 2.0.

Configuration

  • 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:
    1. Open console in your browser to se network requests.
    2. Login into Movescount.
    3. Select a requeset to http://www.movescount.com/api/members/private/messages.
    4. Copy value of Cookie key in request header. It should start with ASP.NET ....
  • BackupDir - Directory where moves should be stored. Required for FileSystemStorage.
  • StorageConnectionString - Connection string to Azure Blob Storage. Required for CloudStorate.
  • ContainerName - Container name on Azure Blob Storage. Required for CloudStorate.

MovescountBackup.Lib

The main project

Client.cs

Client is the class responsible for downloading data from Movescount. Because there is only need to get list of moves and one particular move with details, there are no other calls, such as create new move, update move, etc. But it can be extended to a full Movescount API client. The only problem is that the API specification is not public, so some inspection is required (e.g., searching on GitHub).

Downloader.cs

A class that uses Client to download single or multiple moves and store them to local disk (see FileSystemStorage.cs) or Azure Blob Store (see CloudStorage.cs). A sample Downloader usage is as follows (see MovescountBackup.Console.Program.cs):

var configuration = SetupConfiguration(); // Load or set IConfiguration instance
var client = new Client(configuration, new ConsoleLogger<Client>());
var storage = new CloudStorage(configuration.StorageConnectionString, configuration.ContainerName);
var downloader = new Downloader(configuration, client, storage, new ConsoleLogger<Downloader>());
var moves = await downloader.DownloadLastUserMoves(configuration.MovescountMemberName);
Console.WriteLine($"{moves.Count} moves have been downloaded.");

Deployment

You can use this libraly to be run manually (MovescountBackup.Console.Program.cs) or you can create, e.g., a Azure function or Lambda function on AWS, that can run periodically.

Contributing

Any contribution is welcomed. Especially to Client class.

Authors

  • Marek Polak - Initial work - marazt

License

© 2018 Marek Polak. This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • Enjoy it!
  • If you want, you can support this project too.
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MovescountBackup:

Package Downloads
StravaUpload

A simple library for backuping moves from Suunto Movescount and uploading them to Strava.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 1,290 4/23/2018
1.0.1 806 4/15/2018
1.0.0 922 4/14/2018

Fix of the string conversion & refactoring