草庐IT

internalDate

全部标签

python - GMail API - 获取线程的最后一条消息

我在Python/GoogleAppEngine上使用GMailAPI。我有一个返回特定线程ID的查询,现在我想获取每个线程的最后一条消息。由于结果不一定按日期排序,我想知道对此最有效的API调用是什么?根据下面的评论,我设置了以下批处理函数:ifthreads!=[]:count=0#startanewbatchrequestafterevery1000requestsbatch=BatchHttpRequest(callback=get_items)fortinthreads:batch.add(service.users().threads().get(userId=email,