Class Response

java.lang.Object
com.chatopera.bot.sdk.basics.Response

public class Response extends Object
  • Field Details

  • Constructor Details

    • Response

      public Response()
  • Method Details

    • getRc

      public int getRc()
    • setRc

      public void setRc(int rc)
    • getMsg

      public String getMsg()
    • setMsg

      public void setMsg(String msg)
    • getError

      public String getError()
    • setError

      public void setError(String error)
    • getData

      public Object getData()
      返回Data数据
      Returns:
    • getDataType

      public String getDataType()
      返回 Data 的对象类型
      Returns:
    • setData

      public <T> void setData(T data) throws ChatbotException
      设置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: