我一直在尝试使用 GMail API 和客户端库。我可以使用 javascript 节点 SDK 来获取线程列表,但片段返回为“”。
client.gmail.users.threads.list({userId: "me"}).withAuthClient(auth_with_access_token).execute(function (err, response) {
res.json({complete: response.threads})
});
然后我下载了python SDK并使用gmail api示例获得了一个线程列表,并注意到那些也有空片段。
for thread in threads['threads']:
print 'Thread: %s' % (thread)
线程 ID: {u'snippet': u'', u'id': u'146fccb21d960498', u'historyId': u'7177452'}
但是,当我通过 get thread 方法请求线程时,我确实得到了一个片段,但它只在线程列表中丢失。
我需要在请求中包含其他详细信息以获取代码段吗?
谢谢!