|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.GoogleAPI
public abstract class GoogleAPI
Makes generic Google API functionality available to specific API classes.
| Field Summary | |
|---|---|
protected static java.lang.String |
ENCODING
|
protected static java.lang.String |
referrer
The HTTP referrer attribute. |
| Constructor Summary | |
|---|---|
GoogleAPI()
|
|
| Method Summary | |
|---|---|
protected static JSONObject |
retrieveJSON(java.net.URL url)
Forms an HTTP request, sends it using GET method and returns the result of the request as a JSONObject. |
protected static JSONObject |
retrieveJSON(java.net.URL url,
java.lang.String parameters)
Forms an HTTP request, sends it using POST method and returns the result of the request as a JSONObject. |
static void |
setHttpReferrer(java.lang.String pReferrer)
Sets the HTTP Referrer. |
static void |
validateReferrer()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String ENCODING
protected static java.lang.String referrer
| Constructor Detail |
|---|
public GoogleAPI()
| Method Detail |
|---|
public static void setHttpReferrer(java.lang.String pReferrer)
pReferrer - The HTTP referrer parameter.
public static void validateReferrer()
throws java.lang.Exception
java.lang.Exception
protected static JSONObject retrieveJSON(java.net.URL url)
throws java.lang.Exception
url - The URL to query for a JSONObject.
java.lang.Exception - on error.
protected static JSONObject retrieveJSON(java.net.URL url,
java.lang.String parameters)
throws java.lang.Exception
url - The URL to query for a JSONObject.parameters - Additional POST parameters
java.lang.Exception - on error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||