A starter application has been generated for you.
-
InstallJava Platform (JDK 6 or
higher).
-
InstallMaven (3.1.0 or higher). You may need to set your
JAVA_HOME
.
-
Download
the starter applicationand unzip it.
-
Download
the client secrets fileand overwrite the
src/main/resources/client_secrets.json
file
that was included in the application.
-
Open a terminal, change to the
calendar-appengine-sample
directory you just unzipped,
and execute:
mvn clean package
mvn appengine:devserver
This will compile, package, and deploy your starter application on a local development server. Openhttp://localhost:8888in
your browser.
-
Congratulations, you are up and running! At this point you will want to add calls into the Calendar API to thesrc/main/java/com/google/api/services/samples/calendar/appengine/CalendarSampleServlet.java
file.
Please read the file carefully, it contains detailed information in the comments.
To enable logging of HTTP requests and responses (highly recommended when debugging), please take a look at thesrc/main/webapp/WEB-INF/logging.properties
file.
To deploy your application to appspot.com
If this is the first time you are deploying your application to appspot.com, you will need to perform the following steps first.
-
Go tohttps://appengine.google.comand create an application.
-
Edit
src/main/webapp/WEB-INF/appengine-web.xml
, and enter the unique application identifier
(you chose it in the prior step) between the <application> tags.
If you've done the above, you can deploy at any time:
mvn appengine:update
If this is the first time you have run "update" on the project, a browser window will open prompting you to log in. Log in with the same Google account the app is registered with.
For more information on the Calendar API Java library surface you can visit:
https://develpers.google.com/resources/api-libraries/documentation/calendar/v3/java/latest/
Also check out theJava
Client Library documentation, and get more information on the Calendar API at:
https://developers.google.com/google-apps/calendar/firstapp
Setup Project in Eclipse
Prerequisites:installEclipse, and theMaven
plugin.
-
Setup Eclipse Preferences
-
Window > Preferences... (or on Mac, Eclipse > Preferences...)
-
Select Maven
-
check on "Download Artifact Sources"
-
check on "Download Artifact JavaDoc"
-
Import
calendar-appengine-sample
project
-
File > Import...
-
Select "General > Existing Project into Workspace" and click "Next"
-
Click "Browse" next to "Select root directory", find
calendar-appengine-sample
and
click "Next"
-
Click "Finish"
-
Run
-
Right-click on project
calendar-appengine-sample
-
Run As > Web Application
-
If asked for the location of the WAR directory, select
target/war
-
Openhttp://localhost:8888in your browser.
相关推荐
Google APIs Client Library for Java
Google APIs Client Library for Java
Google APIs Client Library for Java Library Maintenance Overview Highlighted Features Dependencies Important Warnings @Beta Deprecations Documentation Links Library Maintenance These client ...
googleapis for iphone
Google 网站上提供了goole search client api for Java和for dot.net的版本,大家可以参考. For C/C++的版本特点如下 内置XML解析器. 内置gbk/utf-8编码/解码器(包含GBK编码表) 采用Pure C编写,采用标准C接口. ...
前端开源库-browserstack-clientbrowserstack client、browserstack apis client library for node.js
这个库不单单是 Google APIs,还有 OAuth 服务,是基于 Google HTTP Client Library for Java 构建的。此库支持以下 Java 环境:Java 5 (or higher), standard (SE) and enterprise (EE)Android 2.1 (or higher)...
| <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"> | <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons">
JPush API Java Library概述这是 JPush REST API 的 Java 版本封装开发包,是由极光推送官方提供的,一般支持最新的 API 功能。对应的 REST API 文档:, .版本更新:。下载更新请到这里。非常欢迎各位开发者提交代码...
原地址:http://commondatastorage.googleapis.com/git-repo-downloads/repo,不方便的可以在这里下载
fonts.googleapis.com 被墙,https://fonts.googleapis.com/css?整理下载
android的普通安装方法...google_apis-8_r02.zip (文件较大,分为4部分) google_apis-8_r02.part1.rar google_apis-8_r02.part2.rar google_apis-8_r02.part3.rar google_apis-8_r02.part4.rar 也可到以下地址下载: ...
fonts.googleapis.com 加载慢,360公司也不再提供服务(fonts.useso.com),所以就从google上扒下来,把css和字体文件都放到本地。也可以根据这个例子,自己整理需要的css和fonts。
googleapis, Google api的public 接口定义 Google api这个库包含支持REST和gRPC协议的public api原始接口定义。 阅读原始界面定义可以更好地理解 Google api并帮助你更高效地利用它们。 你还可以将这些定义与开源...
Pro Java 9 Games Development Leveraging the JavaFX APIs 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
# Google APIs Client Library for PHP # The Google API Client Library enables you to work with Google APIs such as Google+, Drive, or YouTube on your server. These client libraries are officially ...