This sample provides an example of a migration from the prior version of Google Cloud Endpoints Frameworks to new Google Cloud Endpoints Frameworks for App Engine. This sample contains comments of how to use the prior Endpoints Frameworks as well. For clarity, the prior Endpoints Frameworks and the new Endpoints Frameworks are denoted as Endpoints Frameworks v1.0 and Endpoints Frameworks v2.0, respectively.
Google Cloud Endpoints Frameworks v2.0 provides new functionality which may require payment and uses an OpenAPI specification. The OpenAPI development process is explained here and a quickstart is provided here.
-
[Optional]: User Authenticating with Google Accounts in Web Clients
-
Update the
WEB_CLIENT_IDin Constants.java to reflect the web client ID you have registered in the Credentials on Developers Console for OAuth 2.0 client IDs. -
Update the value of
google.devrel.samples.helloendpoints.CLIENT_IDin base.js to reflect the web client ID you have registered in the Credentials on Developers Console for OAuth 2.0 client IDs.
-
-
[Optional]: User Authenticating with Google Accounts in other Applications Types
-
Inside Constants.java you will find placeholders for Android applications using Google Accounts client IDs registered in the Credentials on Developers Console for OAuth 2.0 client IDs.
-
These client IDs are used when defining annotation for this sample API found in Greetings.java.
-
You can read more about different user authentication supported here.
-
-
[Optional]: Use Cloud Endpoints Frameworks v2.0 Maven and Gradle client library generation plugins with Cloud Endpoints Frameworks v1.0.
-
Uncomment
Endpoints Frameworks v1.0sections and commentEndpoints Frameworks v2.0sections in the following files.pom.xml build.gradle src/main/webapp/WEB-INF/web.xml
-
-
Build a fresh binary by using:
mvn clean compile -
Run the application locally at http://localhost:8080 by using:
mvn appengine:run -
Explore local server's API explorer by browsing to:
-
Generate the client library located at
target/client-libs/helloworld-v1-java.zipby using:mvn endpoints-framework:clientLibs -
Deploy your application to Google App Engine by using:
mvn appengine:deploy
-
Build a fresh binary by using:
gradle clean compileJava -
Run the application locally at http://localhost:8080 by using:
gradle appengineRun -
Explore local server's API explorer by browsing to:
-
Generate the client library located at
build/endpointsClientLibs/helloworld-v1-java.zipby using:gradle endpointsClientLibs -
Deploy your application to Google App Engine by using:
gradle appengineDeploy