petergardfjall / garminexport

Garmin Connect activity exporter and backup tool
Apache License 2.0
500 stars 85 forks source link

Specify number of activities to request in list_activities() #69

Open lawrenceway65 opened 3 years ago

lawrenceway65 commented 3 years ago

Using GarminClient, the normal use case I have is to download the most recent activities - normally a very small number. When you have a lot of activities it is very slow download the entire list of activities, just to get the most recent one or two.

I propose an update to list_activites() to optionally specify the number of activites to list, adding an int parameter 'request_size'.

Also included in this push is some corrections to the example code given for GarminClient I noticed (and tripped over.)