JasonSanford / mapmyfitness-python

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

Setting per_page > 40 omits results #21

Open ketch opened 9 years ago

ketch commented 9 years ago

Running

workouts = mmf.workout.search(user=xxx,per_page=40)

works fine, giving multiple pages with 40 workouts each. But passing

workouts = mmf.workout.search(user=xxx,per_page=10000)

gives back just one page of 40 workouts, even though workouts.count is greater than 40.

By the way, thanks for creating this package!

JasonSanford commented 9 years ago

Hi David, I think most endpoints in the MapMyFitness API are capped at 40 items per page - https://developer.underarmour.com/docs/v70_Paging

ketch commented 9 years ago

I see; thanks. Maybe it's worth throwing a warning/exception if it's set to more than 40 (I spent a few minutes trying to figure out what was going on).