Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

fitness_activities(:limit => 26) not working #3

Open
RumiFlow opened this issue Sep 25, 2014 · 3 comments
Open

fitness_activities(:limit => 26) not working #3

RumiFlow opened this issue Sep 25, 2014 · 3 comments

Comments

@RumiFlow
Copy link

Great API guys! Thanks so much!

I've ran into an issue with fetching activities when :limit is greater than 25. Until 25 everything works perfectly. I'm using ruby 2.0.0p481 and the error message that I get for limit 26 is as follows:

/Library/Ruby/Gems/2.0.0/gems/run_keeper-0.0.5/lib/run_keeper/activity_request.rb:18:in request': undefined methodmap' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/run_keeper-0.0.5/lib/run_keeper/activity_request.rb:28:in request' from /Library/Ruby/Gems/2.0.0/gems/run_keeper-0.0.5/lib/run_keeper/activity_request.rb:8:inget_activities'
from /Library/Ruby/Gems/2.0.0/gems/run_keeper-0.0.5/lib/run_keeper/request.rb:18:in fitness_activities' from uRun.rb:21:in

'

I suspect that this has something to do with the default page size limit.

Any help here would be greatly appreciated.

Thanks!

@coop
Copy link
Owner

coop commented Sep 25, 2014

Hey mate,

I haven't used this library for about 2 - 3 years so I'm not sure what does and does not work. I don't remember that pagination was available so limiting was implemented in ruby not by RunKeeper. It looks like you can ask for a custom page size now which is a better solution than what I've provided.

I'd be interested in taking a pull request for the new functionality if you have time?

Thanks

@RumiFlow
Copy link
Author

Hi Coop!

Understandable that after a few years the API has changed. I would be glad
to help out with that functionality. Note that this would be my first time
contributing to any open source project so some guidance would be needed.

Cheers!

On Fri, Sep 26, 2014 at 1:04 AM, Tim Cooper notifications@github.com
wrote:

Hey mate,

I haven't used this library for about 2 - 3 years so I'm not sure what
does and does not work. I don't remember that pagination was available so limiting
was implemented in ruby
https://github.com/coop/run_keeper/blob/master/lib/run_keeper/activity_request.rb#L13
not by RunKeeper. It looks like you can ask for a custom page size
http://developer.runkeeper.com/healthgraph/example-api-calls#example-get-custom-page-size
now which is a better solution than what I've provided.

I'd be interested in taking a pull request for the new functionality if
you have time?

Thanks


Reply to this email directly or view it on GitHub
#3 (comment).

@coop
Copy link
Owner

coop commented Sep 25, 2014

Github has some really good documentation on this process. If you want to make some changes I'd be fine with you putting up a pull request that is "half right" and we can work through it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants