You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This client library is supported but in maintenance mode only. We are fixing necessary bugs and adding essential features to ensure this library continues to meet your needs for accessing Google APIs. Non-critical issues will be closed. Any issue may be reopened if it is causing ongoing problems.
15
+
This client library is supported but in maintenance mode only. We are fixing necessary bugs and
16
+
adding essential features to ensure this library continues to meet your needs for accessing Google
17
+
APIs. Non-critical issues will be closed. Any issue may be reopened if it is causing ongoing problems.
16
18
17
-
If you're working with **Google Cloud Platform** APIs such as Datastore, Pub/Sub and many others, consider using the [Cloud Client Libraries for Java](https://github.com/GoogleCloudPlatform/google-cloud-java) instead. These are the new and idiomatic Java libraries targeted specifically at Google Cloud Platform Services.
19
+
If you're working with **Google Cloud Platform** APIs such as Datastore, Pub/Sub and many others,
20
+
consider using the [Cloud Client Libraries for Java](https://github.com/GoogleCloudPlatform/google-cloud-java)
21
+
instead. These are the new and idiomatic Java libraries targeted specifically at Google Cloud
22
+
Platform Services.
18
23
19
-
## <aname='Overview'>Overview<a/>
24
+
## Building locally
20
25
21
-
The Google APIs Client Library for Java is a flexible, efficient, and powerful Java client library for accessing any HTTP-based API on the web, not just Google APIs.
cd google-oauth-java-client && mvn compile && mvn install
47
+
```
48
+
49
+
##### Building And Testing
50
+
51
+
```
52
+
mvn install
53
+
```
54
+
55
+
## Overview
56
+
57
+
The Google APIs Client Library for Java is a flexible, efficient, and powerful Java client library
58
+
for accessing any HTTP-based API on the web, not just Google APIs.
22
59
23
60
The library has the following features:
24
61
- A powerful [OAuth 2.0](https://developers.google.com/api-client-library/java/google-api-java-client/oauth2) library with a consistent interface.
@@ -30,152 +67,193 @@ The library has the following features:
30
67
31
68
To use Google's Java client libraries to call any Google API, you need two libraries:
32
69
33
-
- The core Google APIs Client Library for Java (google-api-java-client), which is the generic runtime library described here. This library provides functionality common to all APIs, for example HTTP transport, error handling, authentication, JSON parsing, media download/upload, and batching.
34
-
- An auto-generated Java library for the API you are accessing, for example the [generated Java library for the BigQuery API](https://github.com/google/google-api-java-client-samples/tree/master/bigquery-appengine-sample/src/main/java/com/google/api/client/sample/bigquery/appengine/dashboard). These generated libraries include API-specific information such as the root URL, and classes that represent entities in the context of the API. These classes are useful for making conversions between JSON objects and Java objects.
70
+
- The core Google APIs Client Library for Java (google-api-java-client), which is the generic
71
+
runtime library described here. This library provides functionality common to all APIs, for example
72
+
HTTP transport, error handling, authentication, JSON parsing, media download/upload, and batching.
73
+
- An auto-generated Java library for the API you are accessing, for example
74
+
the [generated Java library for the BigQuery API](https://github.com/google/google-api-java-client-samples/tree/master/bigquery-appengine-sample/src/main/java/com/google/api/client/sample/bigquery/appengine/dashboard).
75
+
These generated libraries include API-specific information such as the root URL, and classes that
76
+
represent entities in the context of the API. These classes are useful for making conversions
77
+
between JSON objects and Java objects.
35
78
36
-
To find the generated library for a Google API, visit [Google APIs Client Library for Java](https://developers.google.com/api-client-library/java/apis/). The API-specific Java packages include both the core google-api-java-client and the client-specific libraries.
79
+
To find the generated library for a Google API, visit [Google APIs Client Library for Java](https://developers.google.com/api-client-library/java/apis/).
80
+
The API-specific Java packages include both the core google-api-java-client and the client-specific
81
+
libraries.
37
82
38
83
If you are using the old GData library, you need to
If you are developing for Android and the Google API you want to use is included in the [Google Play Services library](https://developer.android.com/google/play-services/index.html), you should use that library for the best performance and experience.
88
+
If you are developing for Android and the Google API you want to use is included in the
89
+
[Google Play Services library](https://developer.android.com/google/play-services/index.html), you
90
+
should use that library for the best performance and experience.
44
91
45
-
To access other Google APIs, you can use the Google APIs Client Library for Java, which supports [Android 1.5 (or higher)](https://developers.google.com/api-client-library/java/google-api-java-client/android).
92
+
To access other Google APIs, you can use the Google APIs Client Library for Java, which supports
-**The library makes it simple to call Google APIs.**
57
108
58
-
You can call Google APIs using Google service-specific generated libraries with the Google APIs Client Library for Java. Here's an example that makes a call to the [Google Calendar API](https://developers.google.com/google-apps/calendar/):
109
+
You can call Google APIs using Google service-specific generated libraries with the Google APIs
110
+
Client Library for Java. Here's an example that makes a call to the
The authentication library can reduce the amount of code needed to handle [OAuth 2.0](https://developers.google.com/api-client-library/java/google-api-java-client/oauth2), and sometimes a few lines is all you need. For example:
70
-
71
-
```java
72
-
/** Authorizes the installed application to access user's protected data. */
-**The library makes batching and media upload/download easier.**
87
143
88
-
The library offers helper classes for [batching](https://developers.google.com/api-client-library/java/google-api-java-client/batch), [media upload](https://developers.google.com/api-client-library/java/google-api-java-client/media-upload), and [media download](https://developers.google.com/api-client-library/java/google-api-java-client/media-download).
and [media download](https://developers.google.com/api-client-library/java/google-api-java-client/media-download).
89
148
90
149
-**The library runs on Google App Engine.**
91
150
92
-
[App Engine-specific helpers](https://developers.google.com/api-client-library/java/google-api-java-client/app-engine) make quick work of authenticated calls to APIs, and you do not need to worry about exchanging code for tokens. For example:
UrlHistory history =shortener.URL().list().execute();
164
+
...
165
+
}
166
+
```
106
167
107
168
-**The library runs on [Android (@Beta)](#@Beta).**
108
169
109
-
If you are developing for Android and the Google API you want to use is included in the [Google Play Services library](https://developer.android.com/google/play-services/index.html), you should use that library for the best performance and experience.
110
-
111
-
To access other Google APIs, you can use the Google Client Library for Java's Android-specific helper classes, which are are well-integrated with [Android AccountManager](http://developer.android.com/reference/android/accounts/AccountManager.html). For example:
The Google APIs Client Library for Java is easy to install, and you can download the binary directly from the [Downloads page](https://developers.google.com/api-client-library/java/google-api-java-client/download), or you can use Maven or Gradle.
132
-
To use Maven, add the following lines to your pom.xml file:
197
+
The Google APIs Client Library for Java is easy to install, and you can download the binary
198
+
directly from the [Downloads page](https://developers.google.com/api-client-library/java/google-api-java-client/download),
199
+
or you can use Maven or Gradle.
200
+
201
+
To use Maven, add the following lines to your pom.xml file:
133
202
134
-
```maven
135
-
<project>
136
-
<dependencies>
137
-
<dependency>
138
-
<groupId>com.google.api-client</groupId>
139
-
<artifactId>google-api-client</artifactId>
140
-
<version>1.23.0</version>
141
-
</dependency>
142
-
</dependencies>
143
-
</project>
144
-
```
203
+
```maven
204
+
<project>
205
+
<dependencies>
206
+
<dependency>
207
+
<groupId>com.google.api-client</groupId>
208
+
<artifactId>google-api-client</artifactId>
209
+
<version>1.23.0</version>
210
+
</dependency>
211
+
</dependencies>
212
+
</project>
213
+
```
145
214
146
-
To use Gradle, add the following lines to your build.gradle file:
215
+
To use Gradle, add the following lines to your build.gradle file:
This library is built on top of two common libraries, also built by Google, and also designed to work with any HTTP service on the web:
159
-
*[Google HTTP Client Library for Java](https://github.com/google/google-http-java-client)
160
-
*[Google OAuth Client Library for Java](https://github.com/google/google-oauth-java-client)
226
+
## Dependencies
227
+
This library is built on top of two common libraries, also built by Google, and also designed to
228
+
work with any HTTP service on the web:
161
229
162
-
## <aname='Warnings'>Important Warnings<a/>
230
+
-[Google HTTP Client Library for Java](https://github.com/google/google-http-java-client)
231
+
-[Google OAuth Client Library for Java](https://github.com/google/google-oauth-java-client)
163
232
164
-
### <aname='Beta'>@Beta<a/>
233
+
##Important Warnings
165
234
166
-
Features marked with the @Beta annotation at the class or method level are subject to change. They might be modified in any way, or even removed, in any major release. You should not use beta features if your code is a library itself (that is, if your code is used on the CLASSPATH of users outside your own control).
235
+
### @Beta
167
236
168
-
### <aname='Deprecations'>Deprecations<a/>
237
+
Features marked with the @Beta annotation at the class or method level are subject to change. They
238
+
might be modified in any way, or even removed, in any major release. You should not use beta features
239
+
if your code is a library itself (that is, if your code is used on the CLASSPATH of users outside
240
+
your own control).
169
241
170
-
Deprecated non-beta features will be removed eighteen months after the release in which they are first deprecated. You must fix your usages before this time. If you don't, any type of breakage might result, and you are not guaranteed a compilation error.
242
+
### Deprecations
243
+
244
+
Deprecated non-beta features will be removed eighteen months after the release in which they are
245
+
first deprecated. You must fix your usages before this time. If you don't, any type of breakage
246
+
might result, and you are not guaranteed a compilation error.
0 commit comments