1
我正在尋找使用appcelerator的Google日曆API服務實現。如何我將開始調用谷歌的API,沒有得到任何的想法一個請幫助me.Advance感謝如何使用appcelerator調用Google日曆API服務
我正在尋找使用appcelerator的Google日曆API服務實現。如何我將開始調用谷歌的API,沒有得到任何的想法一個請幫助me.Advance感謝如何使用appcelerator調用Google日曆API服務
使用標準的網絡過程http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network.HTTPClient聲明網絡通話,並使用谷歌日曆API https://developers.google.com/google-apps/calendar/v3/reference/
例如獲取用戶日曆
var url = " https://www.googleapis.com/calendar/v3/users/me/calendarList";
var client = Ti.Network.createHTTPClient({
// function called when the response data is available
onload : function(e) {
Ti.API.info("users calendars: " + JSON.stringify(this.responseText));
alert('success');
},
// function called when an error occurs, including a timeout
onerror : function(e) {
Ti.API.debug(e.error);
alert('error');
},
timeout : 5000 // in milliseconds
});
// Prepare the connection.
client.open("GET", url);
// Send the request.
client.send();