目录

查询最新运动表现

功能介绍

查询用户的最新运动表现。

场景描述

查询用户的最新运动表现,其中包含跑力指数、状况指数、体能指数、疲劳指数、成绩预测。

使用约束

接口原型

承载协议

HTTPS GET

接口方向

开发者应用->Health Service Kit云

接口URL

https://health-api.cloud.huawei.com/healthkit/v2/athleticPerformance/latest?timeZone=***

数据格式

请求消息:Content-Type: application/json

响应消息:Content-Type: application/json

请求参数

Request Header

参数

参数类型

是否必选

描述

timeZone

String

是

时区。其中的特殊字符需要进行URL编码。

例如待设置的时区为+0800时,需要输入“%2b0800”。

Request Body

无

请求示例

GET  https://health-api.cloud.huawei.com/healthkit/v2/athleticPerformance/latest?timeZone=%2b0800
Content-Type: application/json
Authorization: Bearer xxxxxxxxxxxxxxxxx

响应参数

状态码为200时:

Response Header

参数

参数类型

是否必选

描述

Content-Type

String

是

取值为:application/json; charset=UTF-8

Response Body

参数

参数类型

是否必选

描述

runningAbility

Double

是

跑力指数,取值范围:20~90。

condition

Double

是

状况指数,等级范围为:

  • >6:长期未运动
  • (3, 6]:精力充沛
  • (0.5, 3]:状况良好
  • (-2, 0.5]:可以正常训练
  • (-6, -2]:轻微疲劳
  • (-10, -6]:非常疲劳
  • (-13, -10]:严重疲劳
  • <=-13:必须休息了

fitness

Double

是

体能指数,取值范围:0~80。

fatigue

Double

是

疲劳指数,取值范围:0~160。

predictedTimes

PredictedTimes

是

成绩预测,请参见PredictedTimes数据模型。

响应示例

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
     "runningAbility": 20,
     "fitness": 0.0814,
     "fatigue": 0.0001,
     "condition": 0.0832,
     "predictedTimes":{
         "km1": 780,
         "km3": 1524,
         "km5": 2750,
         "km10": 5696,
         "halfMarathon": 12641,
         "marathon": 26334
     }
}

错误码

请参见错误码。