Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/jquery-mobile/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script createEvent的可见性=Private_Google Apps Script - Fatal编程技术网

Google apps script createEvent的可见性=Private

Google apps script createEvent的可见性=Private,google-apps-script,Google Apps Script,我有如下基本的Google应用程序脚本代码: myCal.createEvent( eventName, startDate, endDate ); 其中变量是基本字符串和日期时间变量。没有问题 此外,我还希望创建此事件,将可见性设置为私有。我可以在界面上看到每个日历事件的此选项,但在createEvent中看不到有关此选项的任何文档 我缺少什么吗?CalendarEvent对象中有一个setVisibility方法。 createEvent()的返回类型为CalendarEvent m

我有如下基本的Google应用程序脚本代码:

myCal.createEvent( eventName, startDate, endDate ); 
其中变量是基本字符串和日期时间变量。没有问题

此外,我还希望创建此事件,将
可见性设置为
私有
。我可以在界面上看到每个日历事件的此选项,但在
createEvent
中看不到有关此选项的任何文档


我缺少什么吗?

CalendarEvent对象中有一个setVisibility方法。

createEvent()的返回类型为CalendarEvent

 myCal.createEvent( eventName, startDate, endDate )
     .setVisibility(CalendarApp.Visibility.PRIVATE);