我使用gmailapi的^{nextPageToken
时,它被用来检索下一个页面,下一页返回时不带history
字段。不会引发HttpError
。在
results = self.service.users ().history ().list (userId = self.account, startHistoryId = start).execute ()
if 'history' in results:
yield results['history']
while 'nextPageToken' in results:
pt = results['nextPageToken']
results = self.service.users ().history ().list (userId = self.account, startHistoryId = start, pageToken = pt).execute ()
yield results['history'] # this fails with missing 'history' member.
如果我对问题理解正确的话,你不需要期望历史页面上有任何结果。在
我想这会有帮助。在
^{pr2}$相关问题 更多 >
编程相关推荐