public class QencodeApiClient extends Object
| Constructor and Description |
|---|
QencodeApiClient(String api_key)
Constructs a new QencodeApiClient.
|
QencodeApiClient(String api_key,
String url) |
| Modifier and Type | Method and Description |
|---|---|
TranscodingTask |
CreateTask()
Creates new transcoding task
|
String |
getAccessToken() |
String |
getApiKey()
gets Qencode Project API Key for this client instance
|
String |
getApiUrl()
gets API endpoint url
|
String |
getLastResponseRaw()
returns Last Response in raw string (JSON)
|
org.codehaus.jackson.map.ObjectMapper |
getMapper() |
org.springframework.web.client.RestTemplate |
getRestTemplate() |
String |
Request(String path,
Map<String,String> parameters)
Performs request to a specified API method
|
String |
Request(String path,
String parameters)
Performs request to a specified API method
|
void |
setApiKey(String api_key)
sets Qencode Project API Key for this client instance
|
void |
setApiUrl(String api_url)
sets API endpoint url
|
void |
setRestTemplate(org.springframework.web.client.RestTemplate rt) |
public static final String API_URL
public QencodeApiClient(String api_key) throws UnsupportedEncodingException, QencodeException
api_key - Qencode Project API KeyQencodeException - if there's an error communicating Qencode API or API Key is not validUnsupportedEncodingExceptionpublic QencodeApiClient(String api_key, String url) throws UnsupportedEncodingException, QencodeException
public String getAccessToken()
public org.codehaus.jackson.map.ObjectMapper getMapper()
public String getApiKey()
public void setApiKey(String api_key)
public String getApiUrl()
public void setApiUrl(String api_url)
public org.springframework.web.client.RestTemplate getRestTemplate()
public void setRestTemplate(org.springframework.web.client.RestTemplate rt)
public String getLastResponseRaw()
public String Request(String path, Map<String,String> parameters) throws QencodeException, UnsupportedEncodingException
path - API method path, e.g. "create_task"parameters - key-value pairs specifying method paramsQencodeException - if there's an error communicating Qencode API or some params not validUnsupportedEncodingExceptionpublic String Request(String path, String parameters) throws QencodeException
path - API method path, e.g. "create_task"parameters - an URL-encoded params string, e.g. param1=value1¶m2=value2...QencodeException - if there's an error communicating Qencode API or some params not validpublic TranscodingTask CreateTask() throws UnsupportedEncodingException, QencodeException
UnsupportedEncodingExceptionQencodeException - if there's an error communicating Qencode API or access token not validCopyright © 2021. All rights reserved.