|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectio.clarify.api.ClarifyResponse
public class ClarifyResponse
Wraps all of the details of a low-level Clarify SDK response into a single class that can be used to: 1) access the response code 2) a parsed version of the content (Using Resty), and 3) the response content (for your own parsing needs). This class depends on Resty, the underlying HTTP client used for calling the Clarify REST API. More details about this library, along with a link to the Javadoc, are available at http://beders.github.io/Resty/Resty/Overview.html
| Constructor Summary | |
|---|---|
ClarifyResponse(us.monoid.web.JSONResource jsonResource)
Initialize a new instance with the given Resty JSONResource returned by the Resty API |
|
| Method Summary | |
|---|---|
us.monoid.web.JSONResource |
getJSONResource()
Returns the underlying Resty JSONResource object, representing the parsed JSON response code See http://beders.github.io/Resty/Resty/Overview.html for more details on the Resty Java API |
Object |
getJSONValue(String path)
Uses the Resty JSONResponse to perform attempt to get a JSON path from the response payload and return it. |
int |
getResponseCode()
Returns the response code associated with this Clarify API call |
String |
getResponseContent()
Returns the raw JSON content from the response, allowing the caller to parse the JSON response using their own library |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClarifyResponse(us.monoid.web.JSONResource jsonResource)
jsonResource - a JSONResource instance than can be used to navigate the parsed JSON response| Method Detail |
|---|
public int getResponseCode()
public String getResponseContent()
public us.monoid.web.JSONResource getJSONResource()
public Object getJSONValue(String path)
path - is the entire URL path
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||