|
||||||||||
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 String |
ENCODING
|
protected static String |
referrer
The HTTP referrer attribute. |
Constructor Summary | |
---|---|
GoogleAPI()
|
Method Summary | |
---|---|
protected static JSONObject |
retrieveJSON(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(URL url,
String parameters)
Forms an HTTP request, sends it using POST method and returns the result of the request as a JSONObject. |
static void |
setHttpReferrer(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 String ENCODING
protected static String referrer
Constructor Detail |
---|
public GoogleAPI()
Method Detail |
---|
public static void setHttpReferrer(String pReferrer)
pReferrer
- The HTTP referrer parameter.public static void validateReferrer() throws Exception
Exception
protected static JSONObject retrieveJSON(URL url) throws Exception
url
- The URL to query for a JSONObject.
Exception
- on error.protected static JSONObject retrieveJSON(URL url, String parameters) throws Exception
url
- The URL to query for a JSONObject.parameters
- Additional POST parameters
Exception
- on error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |