2016-05-17 55 views

回答

0

您可以使用谷歌API,如谷歌雲端硬盤,日曆等谷歌應用程序引擎(GAE)。不幸的是,他們沒有直接的聯繫,但你可以使用google-api-python-client庫(你必須安裝)。

您可以按照Python Quickstart開始與GAE和谷歌API的整合。

下面是從previous SO question在答案給出以下代碼:

import httplib2 
from apiclient import discovery 

credentials = get_credentials() #Your function to request/access stored credentials 
#Authorise access to Drive using the user's credentials 
http = credentials.authorise(httplib2.Http()) 
#The service object is the gateway to your API functions 
service = discovery.build('drive', 'v2', http=http) 

#Run your requests using the service object. e.g. list first 10 files: 
results = service.files().list(maxResults=10).execute() 
# ... etc ... Do something with results 

從SO問題還包括針對Google Drive的API參考。

我希望這可以幫助你。 :)