Package com.chatopera.bot.sdk.basics
Class Response
java.lang.Object
com.chatopera.bot.sdk.basics.Response
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getData()
返回Data数据返回 Data 的对象类型getError()
getMsg()
int
getRc()
org.json.JSONObject
int
getTotal()
int
void
setCurrent_page
(int current_page) <T> void
setData
(T data) 设置data字段void
void
void
setRc
(int rc) void
setStatus
(org.json.JSONObject status) void
setTotal
(int total) void
setTotal_page
(int total_page) org.json.JSONObject
toJSON()
response数据转为JSONObject
-
Field Details
-
DATA_JSON_ARRAY
- See Also:
-
DATA_JSON_OBJECT
- See Also:
-
DATA_NULL
- See Also:
-
-
Constructor Details
-
Response
public Response()
-
-
Method Details
-
getRc
public int getRc() -
setRc
public void setRc(int rc) -
getMsg
-
setMsg
-
getError
-
setError
-
getData
返回Data数据- Returns:
-
getDataType
返回 Data 的对象类型- Returns:
-
setData
设置data字段- Type Parameters:
T
- JSONObject, JSONArray, String- Parameters:
data
-- Throws:
ChatbotException
-
getTotal
public int getTotal() -
setTotal
public void setTotal(int total) -
getCurrent_page
public int getCurrent_page() -
setCurrent_page
public void setCurrent_page(int current_page) -
getTotal_page
public int getTotal_page() -
setTotal_page
public void setTotal_page(int total_page) -
getStatus
public org.json.JSONObject getStatus() -
setStatus
public void setStatus(org.json.JSONObject status) -
toJSON
public org.json.JSONObject toJSON()response数据转为JSONObject- Returns:
-