0

我希望您能帮助我找出对 Google People API 的 JS 请求有什么问题。一般来说它运作良好,但我只收到标准信息。请求掩码不会改变任何东西。

问候!

var request = gapi.client.people.people.connections.list({
    resourceName: 'people/me',
    pageToken: pageToken,
    pageSize: 500,
    requestMask: {
        includeField: 'people.names,people.phoneNumbers.people.emailAddresses'
    }
});
4

1 回答 1

2

客户端库可能存在错误,以下工作:

var request = gapi.client.people.people.connections.list({
    resourceName: 'people/me',
    pageToken: pageToken,
    pageSize: 500,
    'requestMask.includeField': 'people.names,people.phoneNumbers.people.emailAddresses',
    // ^^ note that the nested object is flattened
    requestMask: {
        includeField: 'people.names,people.phoneNumbers.people.emailAddresses'
    }
});

虽然今天只使用扁平键有效,但使用这两种模式定义它可能是明智的,以防谷歌修复客户端库。

于 2016-10-30T19:48:35.643 回答