CommonGoogleClientRequestInitializer
or a subclass of it.@Deprecated public class GoogleKeyInitializer extends Object implements com.google.api.client.http.json.JsonHttpRequestInitializer, GoogleClientRequestInitializer
This is needed when doing unauthenticated access to Google APIs. Otherwise, you will only be able to make a small number of queries. When you exceed this limit, you will receive a "403 Forbidden" error with the message "Daily Limit Exceeded. Please sign up". See Unauthenticated access for more details.
Note that this is not needed when doing authenticated access with an OAuth 2.0 access token, because the OAuth 2.0 client ID is already associated with the same project as the API key.
Constructor and Description |
---|
GoogleKeyInitializer(String key)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
initialize(AbstractGoogleClientRequest<?> request)
Deprecated.
Initializes a Google client request.
|
void |
initialize(com.google.api.client.http.json.JsonHttpRequest request)
Deprecated.
|
public GoogleKeyInitializer(String key)
key
- API keypublic void initialize(com.google.api.client.http.json.JsonHttpRequest request)
initialize
in interface com.google.api.client.http.json.JsonHttpRequestInitializer
public void initialize(AbstractGoogleClientRequest<?> request)
GoogleClientRequestInitializer
initialize
in interface GoogleClientRequestInitializer
Copyright © 2010-2012 Google. All Rights Reserved.