簡體   English   中英

如何訪問谷歌日歷 API 方法

[英]how to access google calendar API methods

我是 Google API 的新手,正在嘗試根據此處描述的 Google 日歷 API 示例創建一個應用程序: http://samples.google-api-java-client.googlecode.com/hg/calendar-appengine-sample/instructions .html

這行得通,但我無法繼續前進,因為我無法訪問 https 中描述的所有 API 方法,如獲取、補丁、列表等://developers.google.com/google-apps/calendar/ v3/參考/

示例應用程序源代碼中實現了一些方法:/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 存儲庫。

謝謝

您需要為您想要的所有服務調用編寫包裝器 - 原因是您不能使用 Ajax 在與托管您的 GWT 的服務器不同的服務器上調用 web 服務(在這種情況下為谷歌日歷 API)應用。

因此,在此示例中,您的 GWT 應用程序向您的服務器發出 AJAX 調用,然后服務器調用 Google 日歷服務並將結果返回給 GWT 客戶端。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM