public abstract class YandexTranslatorAPI
extends java.lang.Object
Constructor and Description |
---|
YandexTranslatorAPI() |
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
retrievePropString(java.net.URL url,
java.lang.String jsonValProperty)
Forms a request, sends it using the GET method and returns the value with the given label from the resulting JSON
response.
|
static void |
setKey(java.lang.String pKey)
Sets the API key.
|
static void |
setReferrer(java.lang.String pReferrer)
Sets the referrer field.
|
public static void setKey(java.lang.String pKey)
pKey
- The API key.public static void setReferrer(java.lang.String pReferrer)
pReferrer
- The referrer.protected static java.lang.String retrievePropString(java.net.URL url, java.lang.String jsonValProperty) throws java.lang.Exception
url
- a uniform resource locatorjsonValProperty
- a JSON stringjava.lang.Exception
- a generic exception