【问题标题】:how to access google calendar API methods如何访问谷歌日历 API 方法
【发布时间】:2012-04-09 02:38:52
【问题描述】:

我是 Google API 的新手,我正在尝试根据此处描述的 Google Calendar API 示例创建一个应用程序:http://samples.google-api-java-client.googlecode.com/hg/calendar-appengine-sample/instructions.html

这可行,但我无法继续前进,因为我无法访问https://developers.google.com/google-apps/calendar/v3/reference/ 中描述的所有 API 方法,例如 get、patch、list 等。

示例应用源代码中实现了几个方法:/year-planner/src/main/java/com/google/api/services/samples/calendar/appengine/server/CalendarGwtRpcSample.java:

void delete(GwtCalendar calendar) throws IOException;
GwtCalendar insert(GwtCalendar calendar) throws IOException;
GwtCalendar get(GwtCalendar calendar) throws IOException;
GwtCalendar update(GwtCalendar updated) throws IOException;

但只实现了删除、插入和更新方法。我希望这些可以直接从客户端库中获得。

我错过了什么吗?还是我需要自己创建所有这些方法?

我已按照示例应用程序的教程,在 Windows (Vista) 上使用 Eclipse 以及来自 Maven 存储库的源代码和客户端库。

谢谢

【问题讨论】:

    标签: java google-calendar-api google-api-java-client


    【解决方案1】:

    您需要为您想要的所有服务调用编写包装器 - 原因是您不能使用 Ajax 调用另一台服务器上的 Web 服务(在本例中为 google 日历 API)托管您的 GWT 应用程序。

    因此,在本例中,您的 GWT 应用程序对您的服务器进行 AJAX 调用,然后服务器调用 Google 日历服务并将结果包装回 GWT 客户端。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-01
      • 1970-01-01
      • 2016-04-15
      • 1970-01-01
      • 2012-11-13
      • 2021-06-17
      • 1970-01-01
      相关资源
      最近更新 更多