使用 OAuth 列出对开发者可见的所有数据源 所提供的范围。该列表并未列出所有相关网址;用户可能拥有私有 仅对其他开发者可见的数据源,或使用 其他范围。 立即试用。
请求
HTTP 请求
GET https://www.googleapis.com/fitness/v1/users/userId/dataSources
参数
| 参数名称 | 值 | 说明 | 
|---|---|---|
| 路径参数 | ||
| userId | string | 列出所标识的人员的数据源。使用 me执行以下操作:
表示经过身份验证的用户。目前仅支持me。 | 
| 可选的查询参数 | ||
| dataTypeName | string | 要包含在列表中的数据类型的名称。如果未指定,则 数据源。 | 
授权
此请求需要获得以下至少一个范围的授权:
| 范围 | 
|---|
| https://www.googleapis.com/auth/fitness.activity.read | 
| https://www.googleapis.com/auth/fitness.activity.write | 
| https://www.googleapis.com/auth/fitness.location.read | 
| https://www.googleapis.com/auth/fitness.location.write | 
| https://www.googleapis.com/auth/fitness.body.read | 
| https://www.googleapis.com/auth/fitness.body.write | 
| https://www.googleapis.com/auth/fitness.nutrition.read | 
| https://www.googleapis.com/auth/fitness.nutrition.write | 
| https://www.googleapis.com/auth/fitness.blood_pressure.read | 
| https://www.googleapis.com/auth/fitness.blood_pressure.write | 
| https://www.googleapis.com/auth/fitness.blood_glucose.read | 
| https://www.googleapis.com/auth/fitness.blood_glucose.write | 
| https://www.googleapis.com/auth/fitness.oxygen_saturation.read | 
| https://www.googleapis.com/auth/fitness.oxygen_saturation.write | 
| https://www.googleapis.com/auth/fitness.body_temperature.read | 
| https://www.googleapis.com/auth/fitness.body_temperature.write | 
| https://www.googleapis.com/auth/fitness.reproductive_health.read | 
| https://www.googleapis.com/auth/fitness.reproductive_health.write | 
如需了解详情,请参阅身份验证和授权页面。
请求正文
使用此方法时请勿提供请求正文。
响应
如果成功,此方法将返回采用以下结构的响应正文:
{
  "dataSource": [
    users.dataSources Resource
  ]
}| 属性名称 | 值 | 说明 | 备注 | 
|---|---|---|---|
| dataSource[] | list | 之前创建的数据源。 | 
试试看!
使用下面的 API Explorer 对实际数据调用此方法,然后查看响应。
