MovescountBackup 1.0.2

dotnet add package MovescountBackup --version 1.0.2                
NuGet\Install-Package MovescountBackup -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<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                
#r "nuget: MovescountBackup, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. 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                

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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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 2,531 4/23/2018
1.0.1 1,572 4/15/2018
1.0.0 1,756 4/14/2018

Fix of the string conversion & refactoring