gabornemeth / stravasharp Goto Github PK
View Code? Open in Web Editor NEWStrava client library
License: MIT License
Strava client library
License: MIT License
See more here
I'm getting a new error on an existing project, when I call client.Activities.GetAllActivitiesAfter(new DateTime(2021, 1, 28))
Exception has occurred: CLR/System.IndexOutOfRangeException
Exception thrown: 'System.IndexOutOfRangeException' in System.Private.CoreLib.dll: 'Index was outside the bounds of the array.'
at StravaSharp.LatLngConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in C:\code\RunTheGlobe\StravaSharp\src\StravaSharp\LatLng.cs:line 54
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
...
at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
at RestSharp.Portable.Deserializers.JsonDeserializer.Deserialize[T](IRestResponse response)
at RestSharp.Portable.RestResponse`1.<LoadResponse>d__5.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
...
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at StravaSharp.ActivityClient.<GetAthleteActivities>d__8.MoveNext() in C:\code\RunTheGlobe\StravaSharp\src\StravaSharp\ActivityClient.cs:line 58
Strava's API docs say the array should have 2 elements:
LatLng
A collection of float objects. A pair of latitude/longitude coordinates, represented as an array of 2 floating point numbers.
But I can see in the strava API response "start_latlng": [], "end_latlng": [],
for my activities of type WeightTraining, and runs that I manually uploaded and tagged Treadmill. (posted on the strava-api group thread about it, maybe somebody knows more.
I don't see a good workaround with the existing code, but I have a small patch I'll create a PR for.
Is there an example?
Hi,
Im using your library with no problem form several months. Thanks for That!
From some days i have been issued this problem on executing client.Activities.GetAthleteActivitiesAfter
I'm try to send you a pull request with this type included, but a 403 received, so i created this issue
Error converting value "WaterSport" to type 'StravaSharp.ActivityType'. Path '[2].type', line 1, position 2989. at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader) at RestSharp.Portable.Deserializers.JsonDeserializer.Deserialize[T](IRestResponse response) at RestSharp.Portable.RestResponse
1.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RestSharp.Portable.RestResponse.d__431.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RestSharp.Portable.RestClientBase.<Execute>d__59
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at StravaSharp.ActivityClient.d__8.MoveNext()`
All links on https://github.com/gabornemeth/StravaSharp/blob/master/GettingStarted.md currently return a 404 Not Found.
I'm just about to rework a Strava mash-up app that I've done a few versions of, but it's time for a new one (the previous is broken in various ways). My prior experience of developing an app with Strava is that particular during the test and debug phase, it's easy to hit Strava's rate limits. For this reason, and for various other issues of testability, I can't help feeling that this app would be a better match for my needs if it had an interface-based external definition. This could then be mocked for testing and development either for producing reproducible tests or to avoid rate limits.
Is this something you have considered? Is it something that you would be interested in help with?
The include_all_efforts parameter is being ignored, which means you get the activities but not the segment efforts corresponding to the activity. This is a fairly major omission!
I'm [intending to be] fixing this as part of my other issue - doing an interfaced implementation
The last version of nuget is 0.5.5, who doesn't have the PR 24, inluding the new sports types.
Is going to be online or nuget is not been maintain anymore?
Check this topic on Google Groups.
All tests regarding any other athlete (followed athletes, efforts, ...) fail right now. Now that chunk of the API is useless.
I've just made a PR. The CI checks have had some interaction with BitRise.io which has failed. Attempting to follow the link regarding the failure gives me a 404.
WTF?
(At the time of the PR I did not have a bitrise account; I do now (although I'm nervous about it's write permission to all of my github repos)
https://developers.strava.com/docs/reference/#api-models-Upload
Upload activity_id is long
You have it set to a int which causes exceptions on the parsing of the data
[JsonProperty("id")]
public long Id { get; }
[JsonProperty("external_id")]
public string ExternalId { get; }
[JsonProperty("activity_id", NullValueHandling = NullValueHandling.Ignore)]
public int ActivityId { get; }
[JsonProperty("status")]
public string Status { get; }
[JsonProperty("error")]
public string Error { get; }
[JsonIgnore]
public bool IsReady { get; }
Hi,
is there some step-by-step guide on how-to get started?
I had try to run sample app but. I can't login via google in android phone
Same issue as:-
#3
but with these activity types.
"Error converting value "VirtualRun" to type 'StravaSharp.ActivityType'.
"Error converting value "Golf" to type 'StravaSharp.ActivityType'.
"Error converting value "Handcycle" to type 'StravaSharp.ActivityType'.
"Error converting value "Soccer" to type 'StravaSharp.ActivityType'.
All activities done between June 2019 and July 2019. So none of them are old.
So can't read 38 user's data (out of just over 16000 athletes).
I need to display Strava routes in a Xamarin Forms app.
It doesn't use the PCL but the new .NET Standard 2.0 instead.
Is it still possible to use StravaSharp?
Good work ๐
How about adding support for the /photos
endpoint?
GET https://www.strava.com/api/v3/activities/:id/photos?photo_sources=true
http://strava.github.io/api/v3/activity_photos/#list
I'll be happy to submit a PR.
I couldn't find UpdateActivity in StravaSharp, but it exists in Strava documentation. It is a bug or intended?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.