【发布时间】:2018-10-25 08:15:18
【问题描述】:
我们使用 people api 来获取 contact_groups 列表。 尽管我们使用了 sync_token,但我们无法获取已删除的组。但人名单没有这个问题。如何解决?
service = Google::Apis::PeopleV1::PeopleServiceService.new
service.client_options.application_name = 'xxx'
service.authorization=Signet::OAuth2::Client.new(credentials)
response = service.list_contact_groups(sync_token: xxxx-xxxx-xxxx)
【问题讨论】:
-
寻求调试帮助的问题(“为什么这段代码不起作用?”)必须包括所需的行为、特定的问题或错误以及在问题本身中重现它所需的最短代码。没有明确问题陈述的问题对其他读者没有用处。请参阅:如何创建最小、完整和可验证的示例。
-
service = Google::Apis::PeopleV1::PeopleServiceService.new service.client_options.application_name = 'xxx' service.authorization=Signet::OAuth2::Client.new(credentials) response = service .list_contact_groups(sync_token: xxxx-xxxx-xxxx) 无法拉取已删除的群组。
-
请不要将代码放在 cmets 中,因为它真的很难阅读。相反,请继续更新您的原始问题(正如@DaimTo 为您所做的那样)并在 cmets 中记下您已完成的操作。这让我们所有人都更轻松。
-
好的。感谢您的回复
-
试过here,我们可以从一个存在的群组中获取信息,但无法获取已删除的群组。
标签: ruby google-api google-people-api