10-11-2014 11:05
10-11-2014 11:05
Any help with this? I've tried to struggle through using Aaron Coleman's excellent fitbit.net but restsharp doesn't work with windows 8 (and windows phone). I've tried several things (including PortableRest, etc.). I have a feeling I could be at this a very long time. I just wanna hook up and write code 🙂
10-13-2014 08:17 - edited 10-13-2014 08:18
10-13-2014 08:17 - edited 10-13-2014 08:18
Hah, first, I kind of love how it's now become known officially as "Aaron Coleman's excellent Fitbit.net Library", but in reality there are a few contributors. Good way to get me to comment though 🙂
There shouldn't be any incompatibilities at the OS level. Since the library is .NET based, it's whatever .NET framework you have loaded on the machine, the latest version is always advised. If the issue is RestSharp, you can find a newer or alt version and build the Fitbit.NET library against that and include both .csproj in your proj. If you're using WinRT, that's a horse of a different color as there is no official RestSharp implementation there. Don't be afraid to go off the NuGet package path in general.
Speaking of Portable Class Library, we are re-writing a new library that removes the dependency on RestShap and uses the new Microsoft HttpClient component. Myself and Adam Storr are co-authoring it and you can have a look on github under the 'async-portable' branch. https://github.com/aarondcoleman/fitbit.net/tree/async-portable This is a breaking change build. The main reason is that all API endpoing methods will now return async Task<t> type returns because letting the framework do other things (other requests or UI thread for instance) while HTTP responses complete is ideal. We're going to document a migration path, but simply said you can keep copies of the old and new FitbitClient object, one is in namespace Fitbit.API.Portable and the other just in Fitbit.API. There are 3 projects, Fitbit (old client library), Fitbit.Common (common elements like return models), and Fitbit.Portable which is all the new async stuff. Migration should be done by loading all three and then moving over calls from the old library to the task based one, making changes in surrounding code accordingly (may the test cases be with you). Oh, and this new branch relies on AsyncOAuth (https://github.com/neuecc/AsyncOAuth) as the OAuth 1.0A implementation, that's the only external dependecy and even that is just based on HttpClient, so it should work across everything .NET.
For all reading this far, we welcome suggestions / contributions / documentation writing / sample projects on this new branch: https://github.com/aarondcoleman/fitbit.net/tree/async-portable For those on the old one we'll eventually put it in to read-only mode and leave the NuGet Package and source code up for the forceable future.
--Aaron
10-13-2014 13:41
10-13-2014 13:41
Hi Aaron. Thanks for the reply. I am indeed interested in that horse of a different color. Since your new implementation will be using the new HTTP Client - do you expect it will work on Windows Runtime? That was the route I was going down - and with any luck, your reply is the news I was hoping for 🙂
10-13-2014 14:02
10-13-2014 14:02