문제

I am using FitBit API to get Activities. In response I am getting a JSON array of activities. For each activity they provides some details like name, activityId, calories,etc but date and time is not available. Is there any API to get activity details along with start date and time.

도움이 되었습니까?

해결책 2

Yes. Check the fitbit api docs, there is a clearly marked attribute called startTime.

다른 팁

Please call this service https://api.fitbit.com/1/user/[user-id]/activities/date/[date].json

You will get start time and duration example

{
        "description" : "Very Leisurely - under 10 mph",
        "category" : "activity",
        "name" : "Bike",
        "calories" : 1000,
        "id" : "572c571610b47a37753055c6",
        "activityType" : "Bike",
        "userId" : "5722f36110b47af433f111c9",
        "deviceName" : "Fitbit",
        "duration" : 1200,
        "distance" : 1.5,
        "startDate" : "2016-05-06",
        "startTime" : "12:40",
        "steps" : 0
      }

For step by step tutorial and source code , you should go https://appengineer.in/2016/04/30/fitbit-aouth-in-ios-app/

The only way to do this is, unfortunately, the time series that Suresh mentioned. It's a little bit of a pain because you have to grab each individual stat's time series and piece them together (please correct me if there's another way, but I didn't find one).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top