JasonSanford / mapmyfitness-python

A Python wrapper for the MapMyFitness API
MIT License
9 stars 6 forks source link

Document finding user IDs #22

Closed shacker closed 9 years ago

shacker commented 9 years ago

Documentation provides examples like

routes_paginator = mmf.route.search(user=9118466)

I've looked high and low on mapmyride.com and mapmyfitness.com but can't find any reference to a user ID integer anywhere, so am finding it hard to get started. Where can one find this?

JasonSanford commented 9 years ago

You'll receive the user id on the in the body of the final response in the oauth dance. I've used python social auth before to authenticate MapMyFitness users and it has worked well. Here is where it grabs the user id from the response.

This library doesn't concern itself with authorizing users and just assumes you've got a good user id in hand. You can also hit the /user/self/ endpoint listed here to get all user data (including id, name, height, weight, etc) by just using the currently auth'd user (the access token). Does that help?

shacker commented 9 years ago

Oh, I see - I misunderstood how this worked. OK, I'll play. Thanks.