com.strava.api
4.0.1
dotnet add package com.strava.api --version 4.0.1
NuGet\Install-Package com.strava.api -Version 4.0.1
<PackageReference Include="com.strava.api" Version="4.0.1" />
paket add com.strava.api --version 4.0.1
#r "nuget: com.strava.api, 4.0.1"
// Install com.strava.api as a Cake Addin #addin nuget:?package=com.strava.api&version=4.0.1 // Install com.strava.api as a Cake Tool #tool nuget:?package=com.strava.api&version=4.0.1
Strava.NET
Important Notes (Read me first!)
This project was forked from the timheuer repo, which in turn was forked from the original by sascha-simon, neither of which have been updated in a long time. It is therefore very possible that various aspects of the project don't work as originally intended, or don't work full stop, due to changes made by Strava in their API.
Intro
Current version: 4.0.1 (June 2021)
Hopefully this small framework makes using the Strava API a little bit easier! Please keep in mind that this framework is in a pretty early stage and things are about to change. Kudos to Strava for letting people use data uploaded to Strava! Strava.NET uses the great Json.NET library from James Newton-King - such a great piece of code.
Getting an access token from Strava
You can get an access token from Strava by using one of the following methods:
- StaticAuthentication You can use this method if you already have an access token. You can either use the WebAuthentication class to get a access token from Strava or you can use your token, that you got when you registered your application.
StaticAuthentication auth = new StaticAuthentication("<insert token here>");
- WebAuthentication This procedure should be used, if you want to authorize your application for the first time. When an object is created and the GetTokenAsync() method is invoked, a browser window will open and you have to authorize the apllication. Once the button is clicked, Strava invokes a callback function. When you create a WebAuthentication object, a web server is started locally on your computer. Once the button is clicked, Strava invokes a callback function which is received by the callback server. You now have a working access token created specifically for your application. You can store this access token in a file on your hard disk, so you don't have to open a browser window every time. You should use some sort of cryptographic algorithm, to obfuscate the access token.
Upon the next start of the program, you can then load the token from your hard disk and use the StaticAuthentication method described above.
The date and time that the token expires will also be saved, so it is possible to check this and only obtain a new token when this is actually required.
Product | Versions 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. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 12.0.3)
- System.Drawing.Common (>= 4.7.0)
- System.Runtime (>= 4.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.