Fitbit.NET
Fitbit.NET copied to clipboard
Subscription urls are inconsistent
I have found an issue with subscriptions and the urls the add function is using. I was looking at the differences between the AddSubscription method which has been there a while and the Remove method Mau added. I couldn't work out why the format strings were different between them. On investigation there seems have been changes missed and/or merged out since the original migration to v2 :-(
If you look at the history of FormatKey
you can see what was there - https://github.com/aarondcoleman/Fitbit.NET/commit/8081da18 - The URLs have changed from when the original migration was done for version one.
This needs addressing before final 2.0 release
Hi Adam, Looks like things were rearranged, but on first glance the outputs of the URLs aren't the same? Did you discover an example one we can compare URLs?
Other than trying to setup some subscriptions the only thing I have to go on is the documentation - https://dev.fitbit.com/docs/subscriptions/
The urls have changed! :-(
Hi Adam, I'm still confused. Are you suggesting that a) Fitbit's endpoints have changed and the library uses the old versions or b) in the course of migration we messed up the existing endpoint collections? Somewhere you're seeing a difference from what we have to what's expected, so I'm trying to understand what that example is? Are we formatting that url string wrong by your view?
Hi, When I did the original migration from the old to the new for Add I moved the same urls as was over to the new way of working, but with the json extension, and used the FormatKey
to determine the URL instead of the original switch statement as per the commit I linked to in the original post.
I believe the URLs which were used and migrated have now changed and the current Add
method is using the wrong ones ... according to the documentation
Example? What's there vs what the docs say?
On Sunday, March 13, 2016, Adam Storr [email protected] wrote:
Hi, When I did the original migration from the old to the new for Add I moved the same urls as was over to the new way of working, but with the json extension, and used the FormatKey to determine the URL instead of the original switch statement as per the commit I linked to in the original post.
I believe the URLs which were used and migrated have now changed and the current Add method is using the wrong ones ... according to the documentation
— Reply to this email directly or view it on GitHub https://github.com/aarondcoleman/Fitbit.NET/issues/165#issuecomment-196047550 .
Old/Original Migrated to Async - https://github.com/aarondcoleman/Fitbit.NET/blob/async-portable/Fitbit.Portable/FitbitClient.cs#L705
Example of new - https://dev.fitbit.com/docs/subscriptions/#adding-a-subscription