【发布时间】:2021-05-15 21:14:04
【问题描述】:
我正在尝试使用 google People API 按她/他的姓名字段搜索一个人。这是代码示例:
service = build('people', 'v1', credentials=creds)
request = service.people().searchContacts(pageSize=10, query="A", readMask="names")
print(request.body) # results in None, but there is a lot of contacts in my list starting from "A".
我使用了以下链接:
https://developers.google.com/people/v1/contacts#python
https://googleapis.github.io/google-api-python-client/docs/dyn/people_v1.people.html#get
https://developers.google.com/people/quickstart/python
范围是https://www.googleapis.com/auth/contacts.readonly。
我需要一种使用姓名掩码返回联系人列表的方法(例如,应该使用“f”、“F”、“foo”等找到名为“Foo bar”的人)。
【问题讨论】:
标签: python python-3.x google-contacts-api google-people-api