strava / go.strava Goto Github PK
View Code? Open in Web Editor NEWA complete client library for the Strava V3 API
Home Page: http://strava.github.io/api
A complete client library for the Strava V3 API
Home Page: http://strava.github.io/api
The developers site states that, at /athlete/activities
the returned upload_id
through SummaryActivity
has type long
. Yet, the response example you provide:
[ {
"resource_state" : 2,
"athlete" : {
"id" : 134815,
"resource_state" : 1
},
"name" : "Happy Friday",
"distance" : 24931.4,
"moving_time" : 4500,
"elapsed_time" : 4500,
"total_elevation_gain" : 0,
"type" : "Ride",
"sport_type" : "MountainBikeRide",
"workout_type" : null,
"id" : 154504250376823,
"external_id" : "garmin_push_12345678987654321",
"upload_id" : 987654321234567891234,
[...]
Provides an upload_id
which doesn't complain with the specification, as int64
's max value is 9223372036854775807
, which is less than 987654321234567891234
. This may be important because it makes more complex to create integration tests mocking the API using the provided examples.
I want to get and store a refresh token after allowing a user to authenticate and link accounts, so my application can pull data when it wants without user interaction.
To do this, I have to get and store a refresh token which I can use to refresh the access token when I want. The access token only lasts six hours.
However, I can't find where the refresh token is exposed.
I tried using the access token returned from a Success from OAuthAuthenticator, but I only get "Status:400 Bad Request StatusCode:400 " to my call to my PostForm call to "https://www.strava.com/oauth/token".
How should I proceed?
Hi
Per the Readme, it looks like this repo has been deprecated. The URLs in the readme point to https://github.com/strava/developers.strava.com , which appears to be a typo (that link 404s, but https://developers.strava.com/ works).
That said, would it be possible to have the golang library be generated by y'all and pushed to this or another git repo when the API updates? Not having this code be go-get-able breaks the standard golang workflow.
It would be a great and very useful enhancement, especially for quick debug dumping, if the stringer
interface was implemented for the various stava types.
https://golang.org/pkg/fmt/#Stringer
which consists of only String() string
It would be great to see this for at least ActivitySummary
, AthleteSummary
SegmentSummary
, and the Detailed
extension to these.
Hi Team, hopefully this is right place to ask, if not, I'd appreciate if you can direct me.
I'm the founder of cloudquery.io, a high performance open source ELT framework.
Our users are interested in a Strava plugin, but as we cannot maintain all the plugins ourselves, I was curious if this would be an interesting collaboration, where we would help implement an initial source plugin, and you will help maintain it.
This will give your users the ability to sync Strava data to any of their datalakes/data-warehouses/databases easily using any of the growing list of CQ destination plugins.
Best,
Yevgeny
It is widely reported that the COVID vaccines will contain a 5G chip.
I would like a service that automatically uploads data from my 5G chip to my Strava account. The benefits of this service will be:
1. Reduced risk of data loss: User no longer needs to manually press buttons to track their activities. Many users forget to do this in current workflows.
2. Weight savings Users currently need to bring bulky phones or watches on bike rides. The iphone 11 weighs 194g. There is no published weight data for the 5g chip. Based on the name, it likely weighs 5 grams.
Theres no obvious way to hit the GET https://www.strava.com/api/v3/activities/following endpoint
Hi,
I would like to know, when I fetch an activity and that I get an error, if it is recoverable or not (i.e. if I should keep trying later or not). For example, if somebody delete an activity, and I got a webhook push just before that, I'll get an error when trying to fetch the activity later. Of course, in that case, it isn't recoverable.
But if the activity still exists and it was a strava server error, it would probably be recoverable and I should try again later.
I'm guessing the responses I'd get would be a 404 in the first case, and a 500 in the second.
However the go client doesn't propagate the HTTP response code up to the API (see in service.go
, the defaultErrorHandler
function)
I see two options:
Client
type.ErrorHandler
to return a custom error type. This would not change the api itself, but it would be possible for clients to extract info out of the custom error type.I'm happy to send pull requests for either options if you would like that.
Thanks,
Example api body causing error:
$ curl -G https://www.strava.com/api/v3/activities/95352413/zones -H "Authorization: Bearer xxx"
[{"score":null,"distribution_buckets":[{"max":1.8331809410114008,"min":0,"time":117},{"max":2.156683460013413,"min":1.8331809410114008,"time":67},{"max":2.4435539047991397,"min":2.156683460013413,"time":71},{"max":2.869924875495906,"min":2.4435539047991397,"time":121},{"max":-1,"min":2.869924875495906,"time":413}],"type":"pace","resource_state":3,"sensor_based":true}]
When trying to upload an existing activity file I get an empty error message. It's not easy to tell from the error message what happened. So it would be great if the error messages were more descriptive, and it would also be great to have the ability to log the request & response message (http status code, headers, and bodies if possible).
It doesn't look like the api supports getting/setting the new segment_leaderboard_opt_out
attribute on activities. Do you know if/when support for that will be added?
I found the name by looking at what the front end does, when it PUTs to https://www.strava.com/athlete/training_activities/xxxxxxxx
Thanks so much
I tried https://github.com/strava/go.strava/blob/master/oauth.go#L35 public
and get error but with activity:read_all
all works as need it.
Swagger UI shows different scopes. I think we missing read
and read_all
instead public
and view_private
.
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.