如何使用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();

以上是 如何使用appcelerator调用Google日历API服务 的全部内容, 来源链接: utcz.com/qa/260990.html

回到顶部