要访问 ExtendedProperties,我需要通知完整的投影。我见过的每个例子,他们都是通过 URL 来做的: https ://developers.google.com/google-apps/calendar/v2/reference#Event_feeds
https://www.google.com/calendar/feeds/userID/visibility/projection
但我没有那个网址。我按如下方式创建服务:
Calendar createService() throws GeneralSecurityException, IOException {
GoogleCredential credential = new GoogleCredential.Builder()
.setTransport(HTTP_TRANSPORT).setJsonFactory(JSON_FACTORY)
.setServiceAccountId(EMAIL)
.setServiceAccountScopes(CalendarScopes.CALENDAR)
.setServiceAccountPrivateKeyFromP12File(new File(getClass().getClassLoader().getResource(FILE_NAME).getFile()))
.build();
Calendar service = new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)
.setApplicationName("Rokko-Leggis")
.build();
return service;
}
我试图保存和检索 ExtendedProperty 但失败了
如何保存自定义字段?