Previously this web api endpoint
/1/user/[user-id]/foods/log/[resource]/date/[start-date]/[end-date].json
returned values in string format like below
{
"foods-log-water": [
{
"dateTime": "",
"value": "0.0"
},
{
"dateTime": "",
"value": "0.0"
},
currently its responding with number
{
"foods-log-water": [
{
"dateTime": "",
"value": 0
},
{
"dateTime": "",
"value": 0
},
Is this change intended, the api doc still shows string values in example response ?
https://dev.fitbit.com/build/reference/web-api/nutrition-timeseries/get-nutrition-timeseries-by-date...
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
I will need to get more information from you to investigate this issue. I just sent you a message through Issue Tracker.
Thanks!
Best AnswerBro I ran into this exact thing before, and yeah, it caught me off guard too. The endpoint switching from string to number is not really documented properly, but it seems like they updated the backend for consistency. Your code might need a small tweak to handle numbers instead of strings now. When I was testing similar API changes while working on my Hypic project, catching these subtle changes early saved me a lot of debugging headaches.
Best Answer