02-17-2016 15:10
02-17-2016 15:10
I am requesting steps and floors for all our subscribers.
Some user devices do not track floors and the api returns a validation error. No problem I catch it and move on. However I am curious,how I can know if the user has floors data so I can request floors data just for those users.
02-17-2016 16:04
02-17-2016 16:04
@caribou99 You can check what device(s) they have, and then based off what tracker they have, you can determine whether or not floors is an applicable metric.
02-18-2016 07:35
02-18-2016 07:35
Thanks!
02-18-2016 08:29 - edited 02-18-2016 08:33
02-18-2016 08:29 - edited 02-18-2016 08:33
A user may have multiple devices, one of which tracks floors. The user may be wearing a device that does not track floors but may have prviously sunched a floor tracking device. Now when I query a date I will get 0 instead of an error. Why not simply return 0 as a default even if the user does not have a device which tracks floors? Why this extra step of having to identify the capibilities of the devices the user has previously synched (or catch the error).
What is the benefit of returning an error if the user has not previously synched a floors tracking device?
02-18-2016 11:21
02-18-2016 11:21
@caribou99 The error response is unintentional and will be fixed at some point. In the meantime, I can only suggest checking for the devices, or continue handling the error.