Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

New Ruby/Ruby on Rails gem for accessing Fitbit API using OAuth2

Hi,

 

I have a ROR application that uses fitgem gem for accessing Fitbit API. However, with OAuth 2.0, I cannot use it anymore. So, I have started writing a fitgem version for oauth 2.0.

 

The new gem called (fitgem_oauth2) is available here https://github.com/gupta-ankit/fitgem_oauth2. I have also written a sample rails application to get started with this gem, which is available here https://github.com/gupta-ankit/FitgemOAuth2Rails

 

I also found another gem that was trying to do the same. Unfortunately, I lost the link and more importantly, as far as I remember from its API, migration to this gem was not straightforward.

 

The reason I am writing fitgem_oauth2 is not only for new users, but also for existing users of fitgem so that they can migrate to OAuth 2.0 with as little effort as possible.

 

The fitgem_oauth2 gem is still a work in progress and will be completed as soon as possible, surely before Fitbit removes OAuth 1.0

 

I am writing this post so that developers can try it out and also contribute to the code if they want.

Best Answer
6 REPLIES 6

Thank you for sharing! 🤘

Best Answer
0 Votes

Hello,

 

Thank you so much for sharing! I'm using fitgem right now, but am looking for an OAuth2-compatible replacement, especially as fitgem will no longer be usable after April 12. Is there any plan to include all methods that fitgem currently supports?

 

Thanks,
Brittany

Best Answer
0 Votes
Yes. That is the plan. Also if you are using some particular Fitbit API
methods, you should put those as issues so that I can implement those first.
Best Answer
0 Votes

fitgem_oauth2 is now complete with respect to the current API.

 

The current release is 1.0.0 and is available for use like any other gem 

 

gem 'fitgem_oauth2'

Best Answer

Hey agupta. Updated our gemspec to use your fitgem_oauth2. Looks like there are going to be a few differences. Do you have a document that shows your upgrade path? I think this would be great for the README. Obviously the FitgemOauth2::Client initiatlization will change but it seems like you have renamed some methods too.

Best Answer
0 Votes

Hi,

 

Yes, some method names are changed to reflect the way the API is documented and to keep the method names consistent

 

If you are looking for documentation, here is one place 

http://www.rubydoc.info/gems/fitgem_oauth2/1.0.4

 

However, some methods might not be documented. Sorry for that.

 

Due to OAuth2, the parameters for fitgem_oauth2 are different from fitgem. Here is a sample Rails application that should help 

https://github.com/gupta-ankit/FitgemOAuth2Rails

 

I do not have a list for methods that were renamed. However, I can add that as part of readme if you have a list of methods that did not work.

 

Best Answer
0 Votes