简体   繁体   English

通过REST API查询多个用户的Google健身数据

[英]Query several user's Google Fit data via REST API

What would be the right way of asking for the Google Fit info of all my users from my own web application (obviously having their consent)? 从我自己的网络应用程序(明显征得他们的同意)询问所有用户的Google健身信息的正确方法是什么?

I only see the param "userId" within the url path the unique way of asking for several specific users, but as it is stated in the reference manual, it seems that only the "me" value is supported. 我只在url路径中看到param“userId”以询问几个特定用户的独特方式,但正如参考手册中所述,似乎只支持“me”值。

...so this means that is not possible to retrieve fitness information from more than one user using the Fit REST API inside a web application? ...这意味着无法使用Web应用程序内的Fit REST API从多个用户检索健身信息?

Any help will be welcome! 欢迎任何帮助!

You are correct. 你是对的。 You'd have to do this one by one. 你必须逐一做到这一点。 As you can see in the get URI request : 正如您在get URI请求中看到的:

https://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId

there's only one room for userId . userId只有一个房间。

There's also Users.dataSources: list 还有Users.dataSources:列表

Lists all data sources that are visible to the developer, using the OAuth scopes provided. 使用提供的OAuth范围列出开发人员可见的所有数据源。 The list is not exhaustive; 该清单并非详尽无遗; the user may have private data sources that are only visible to other developers, or calls using other scopes. 用户可能拥有仅对其他开发人员可见的私有数据源,或使用其他范围的调用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM