Javascript 通过API写入谷歌日历

Javascript 通过API写入谷歌日历,javascript,jquery,google-api,google-calendar-api,Javascript,Jquery,Google Api,Google Calendar Api,var text=$('#text').val()//活动名称 var key=$('#key').val()//my calendar api键以连接到我的google日历 变量url=”https://content.googleapis.com/calendar/v3/calendars/example%40gmail.com/events/quickAdd?text=“+text+”&key=“+key; $.ajax({ url:url, 类型:“POST”, 成功:功能(数据) {

var text=$('#text').val()//活动名称
var key=$('#key').val()//my calendar api键以连接到我的google日历
变量url=”https://content.googleapis.com/calendar/v3/calendars/example%40gmail.com/events/quickAdd?text=“+text+”&key=“+key;
$.ajax({
url:url,
类型:“POST”,
成功:功能(数据)
{
控制台日志(数据);
},

});为了使用Google日历API,您不仅需要客户端ID,还需要对用户进行身份验证。实现这一目标的一种方法是使用

您可以使用您可以使用的客户端库。库支持6种语言。此外,还有一个关于如何使用库的示例,演示了库的功能