Examples of WeiBoDelResultBean


Examples of com.qq.open.weibo.bean.result.WeiBoDelResultBean

   
    // 请求接口返回json数据
    String jsonData = oqu.doPost(OpenQqConstants.WEIBO_DEL_T_URL, this.getInterfaceData(paramBean));
   
    // 接口返回的数据
    WeiBoDelResultBean resultBean = this.jsonToBean(jsonData);
   
    // 日志
    log.info("删除指定微博 结束...");
   
    return resultBean;
View Full Code Here

Examples of com.qq.open.weibo.bean.result.WeiBoDelResultBean

   * @return Bean数据
   * @throws JSONException
   */
  private WeiBoDelResultBean jsonToBean(String jsonData) throws JSONException {
   
    WeiBoDelResultBean resultBean = new WeiBoDelResultBean();
   
    JSONObject jsonObjRoot;
    try {
      jsonObjRoot = new JSONObject(jsonData);
     
      // 接口返回错误的场合
      if (jsonObjRoot.getInt("ret") != 0) {
        // 设置错误标识为真
        resultBean.setErrorFlg(true);
        // 设置错误编号
        resultBean.setErrorCode(jsonObjRoot.get("errcode").toString());
        // 设置错误内容
        resultBean.setErrorMes(jsonObjRoot.getString("msg"));
      }
    } catch (JSONException e) {
      e.printStackTrace();
      // 日志
      log.error("delT 异常,json数据是:" + jsonData);
View Full Code Here

Examples of com.qq.open.weibo.bean.result.WeiBoDelResultBean

   
    paramBean.setId("22741076976199");
   
    WeiBoDel delT = new WeiBoDel();
   
    WeiBoDelResultBean resultBean = delT.delT(paramBean);
   
    if (resultBean.getErrorFlg()) {
      System.out.println("Error!!");
    } else {
      System.out.println("Success!!");
    }
    System.exit(0);
View Full Code Here

Examples of com.qq.open.weibo.bean.result.WeiBoDelResultBean

   * @return Bean数据
   * @throws JSONException
   */
  private WeiBoDelResultBean jsonToBean(String jsonData) throws JSONException {
   
    WeiBoDelResultBean resultBean = new WeiBoDelResultBean();
   
    JSONObject jsonObjRoot = new JSONObject(jsonData);
   
    // 接口返回错误的场合
    if (jsonObjRoot.getInt("ret") != 0) {
      // 设置错误标识为真
      resultBean.setErrorFlg(true);
      // 设置错误编号
      resultBean.setErrorCode(jsonObjRoot.get("errcode").toString());
      // 设置错误内容
      resultBean.setErrorMes(jsonObjRoot.getString("msg"));
    }
   
    return resultBean;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.