This page describes how to generate a client library from your backend API. Any Java or Android app can use this library to call the API.
To create iOS clients for your API, we recommend that you use Google APIs Objective-C client library for REST APIs.
Before you begin
Generating the client library
To generate a client library:
Build your API
Invoke the frameworks command line tool similarly to the following:
Wait for the tool to generate the library; on success the tool displays a message similar to this one:
API client library written to target/client-libs/echo-v1-java.zip
API client library written to build/endpointsClientLibs/echo-v1-java.zip
Unzip the file using the unzip utility, or use another ZIP-compatible unarchiving utility:
Build the client library:
mvn clean package
The output is in the
target/directory. The exact filename depends on the version of the Java client. It is something similar to
The output is in the `build/libs` directory. The exact filename depends on the version of the Java client. It is something like
Add the client library JAR to your Java or Android app.
Repeat the above steps every time you modify your API code.