使用提供的 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 对实际数据调用此方法,并查看响应。