我是Google API的新手,并且很难阅读人们联系的内容。
为了获取特定联系人的详细信息,参考文献显示该代码应该有效[编辑:我更新了Personfields]:
profile = service.people().get(resourceName='people/c63810788897573286', personFields='names')
ResourceName是特定联系人的ID(该ID仅适用于可以访问我的帐户的人)。该服务器正确抓住它并返回以下
:
如何阅读此对象的内容?我无法从
我想打印出名称。我是API的新手,所以也许有一种读取HTTP对象的标准方法,或者也许是Google API所独有的。感谢您的建议
I'm new to Google's API and I'm having trouble reading the content of a People contact.
To get the details of a particular contact, references show this code should work [Edit: I updated the personfields]:
profile = service.people().get(resourceName='people/c63810788897573286', personFields='names')
The resourceName is the ID of a particular contact (that ID will only work for someone with access to my account). The server grabs it correctly and returns this:
<googleapiclient.discovery.Resource object at 0x10fd183c8>
How do I read the content of this object? I can't figure out from the documentation
I want to print out the Name. I'm pretty new to APIs, so maybe there is a standard way to read an HTTP object or maybe it's something unique to Google's API. Thanks for any advice
发布评论
评论(1)
我在另一个有点<<< /a>相关的stackoverflow。我需要在调用中添加.execute()
I found an answer in another somewhat related StackOverflow. I needed to the add .execute() to the call