Skip to content

Conversation

@go8ose
Copy link

@go8ose go8ose commented May 5, 2013

This series of commits ends with the ability to fetch the 'streams' for a ride from Strava, which I wanted. Please consider merging these commits in. I've tried to not make any changes that break backwards compatibility (though I can't guarantee I've succeeded).

geoffcrompton and others added 6 commits April 29, 2013 13:34
This will allow mixing in v2 api calls in later commits.
When running pychecker on the module it complains that it's not found. Even
if I modified the module to always import urllib, pychecker still complained
that urllib.request and urllib.error were not module attributes. I suspect
the code paths that use urllib for requests do not work, hence I've removed
them with this commit.
This will (in a later commit) be used to implement logins. It's a little
ironic that with my last commit having removed urllib usage, I'm now
re-importing it to get the urlencode() function.
Some of the strava API calls return multiple pieces of useful data, such as
the /v2/authentication/login call. Rather than discard that data having the
key optional means you can have the load() method return it all to your
method.
Occasionally the API requires us to pass parameters in as query arguments.
So far that's been done by creating the 'url' outside the load() method.
But it's quite easy to do within the load() method.

This also fixes a minor bug in the url forming of Athlete.rides().
…ion.

This lets us get an authentication token that we can use to access the
streams part of the API, and get some interesting and useful ride data.
@Packetslave
Copy link
Owner

The urllib/urllib2 is for Python 3 compatibility. Will look at the rest.

@Packetslave
Copy link
Owner

Actually, I'm going to hold off on this for the moment. Strava just announced yesterday they're killing the v1 and v2 API entirely on May 31. http://engineering.strava.com/strava-api-update/

I've requested access to the new v3 API so I can keep strava.py alive, but we'll see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants