Google Calendar v3 Java API:插入事件

Google Calendar v3 Java API:插入事件

问题描述:

我正在尝试通过Java API将事件插入Google日历: CalendarTest

I am trying to insert an event into a google calendar via the java API: CalendarTest

我想跑步:

new Calendar.Events.Insert(calendarId, content).execute();

除了构造函数受到保护并且我无法找到静态公共对象之外 插入的方法.有什么建议吗?

except that the constructor is protected and I cannot find a static public method to do the insert. Any suggestions?

我如下解决了这个问题:

I solved this issue as follows:

calendarClient.events().insert(appCalendarId, calendarEvent).execute();