public class ConduitAPIClient
extends java.lang.Object
| Constructor and Description |
|---|
ConduitAPIClient(java.lang.String conduitURL,
java.lang.String conduitToken) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.http.client.methods.HttpUriRequest |
createRequest(java.lang.String action,
net.sf.json.JSONObject params)
Post a URL-encoded "params" key with a JSON-encoded body as per the Conduit API
|
net.sf.json.JSONObject |
perform(java.lang.String action,
net.sf.json.JSONObject params)
Call the conduit API of Phabricator
|
public ConduitAPIClient(java.lang.String conduitURL,
java.lang.String conduitToken)
public net.sf.json.JSONObject perform(java.lang.String action,
net.sf.json.JSONObject params)
throws java.io.IOException,
ConduitAPIException
action - Name of the API callparams - The data to send to Harbormasterjava.io.IOException - If there was a problem reading the responseConduitAPIException - If there was an error calling conduitpublic org.apache.http.client.methods.HttpUriRequest createRequest(java.lang.String action,
net.sf.json.JSONObject params)
throws java.io.UnsupportedEncodingException,
ConduitAPIException
action - The name of the Conduit methodparams - The data to be sent to the Conduit methodjava.io.UnsupportedEncodingException - when the POST data can't be encodedConduitAPIException - when the conduit URL is misconfigured