得到了这个输出historyId是什么意思,是划时代的时间吗?你知道吗
UserInfo is
{'emailAddress': 'sssss@gmail.com', 'messagesTotal': 22919, 'threadsTotal': 22016, 'historyId': '1727906'}
使用的代码
from googleapiclient.discovery import build
from httplib2 import Http
from oauth2client import file, client, tools
from dateutil.relativedelta import relativedelta
from datetime import datetime
SCOPES = 'https://www.googleapis.com/auth/gmail.readonly'
userInfo = service.users().getProfile(userId='me').execute()
print ("UserInfo is \n %s" % (userInfo))
Anwser:HistoryID不是epoc time,而是id
历史ID的定义
直接从doucmentation getprofile
用法
与history.list一起使用
也用于以下情况
将客户端与Gmail同步
保持客户端与Gmail同步对于大多数应用程序场景都很重要。总体上有两种同步方案:完全同步和部分同步。当你的客户端第一次连接到Gmail或者其他一些罕见的情况下,完全同步是必需的。如果您的客户机最近进行了同步,则部分同步比完全同步更轻。您还可以使用推送通知实时触发部分同步,并且仅在必要时触发,从而避免不必要的轮询。你知道吗
你也可以找到sync
相关问题 更多 >
编程相关推荐