Example #1
0
  /** 1验证用户登录 */
  public static String login(
      String oname,
      String oauth_access_token,
      String headpic,
      String nickname,
      String sex,
      String sbid) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "login");
    map.put("oname", oname);
    map.put("oauth_access_token", oauth_access_token);
    map.put("headpic", headpic);
    map.put("nickname", nickname);
    map.put("sex", sex);
    map.put("sbid", sbid);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map) + "我是微博");
      Log.i(TAG, resultStr + "我是微博");
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #2
0
  /** 第三方授权登录 */
  public static String oauthLogin(
      String deviceid,
      String oauth_uid,
      String open_name,
      String nickname,
      String headpic,
      String sex) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "oauthlogin");
    map.put("deviceid", deviceid);
    map.put("oauth_uid", oauth_uid);
    map.put("open_name", open_name);
    map.put("nickname", nickname);
    map.put("headpic", headpic);
    map.put("sex", sex);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      System.out.println(resultStr + "resultStr");
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }

    return null;
  }
Example #3
0
  /** 新闻列表获取3.0 */
  public static String getcolumnlist(
      String userid,
      String columnid,
      String deviceid,
      String key,
      String screen_width,
      String page) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "getcolumnlist");
    map.put("userid", userid);
    map.put("columnid", columnid);
    map.put("deviceid", deviceid);
    map.put("key", key);
    map.put("screen_width", screen_width);
    map.put("page", page);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #4
0
  /** 头条客排行榜列表 */
  public static String headLineRank() {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "ranking");
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #5
0
 /** 获取用户信息 */
 public static String getUserInfo(String userid) {
   Log.i(TAG, userid + ":userid");
   Map<String, Object> map = new HashMap<String, Object>();
   map.put("cmd", "getuserinfo");
   map.put("userid", userid);
   String resultStr;
   try {
     resultStr =
         new String(
             Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
     Log.i(TAG, "Json_map:" + JSONUtil.toJSONString(map));
     Log.i(TAG, "Json:" + resultStr);
     if (resultStr != null) {
       return resultStr;
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return null;
 }
Example #6
0
  /** 请求瀑布流内�? */
  public static String requestWaterfall(String infoid) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "innerpic");
    map.put("infoid", infoid);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #7
0
  /** 头条精选文章列表 */
  public static String goodArticles(String page) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "getpickedlist");
    map.put("page", page);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #8
0
  /** 2.兴趣添加 */
  public static String sukiadd(String sbid, String suki) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "sukiadd");
    map.put("deviceid", sbid);
    map.put("suki", suki);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #9
0
  /** 新聞詳情3.0.1接口 */
  public static String requestDetails(String infoid) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "getdetailinfo_v3_0_1");
    map.put("infoid", infoid);
    map.put("platform", "android");
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #10
0
  /** 收藏文章 */
  public static String collectArticles(String infoid, String userid) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "addfavorite");
    map.put("infoid", infoid);
    map.put("userid", userid);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #11
0
  /** 请求专题 */
  public static String getSubject(String sc_infoid) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "specialcoverage");
    map.put("sc_infoid", sc_infoid);
    String resultStr;
    try {
      Log.i("message", FinalConstant.URL_CONTENT_INTERFACE);
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #12
0
  /** �?��key */
  public static String quitKey(String userid, String guidkey) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "mpkeydel");
    map.put("userid", userid);
    map.put("guidkey", guidkey);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #13
0
  /** 解析数据13.用户反馈 */
  public static String returnDatafeedback(String text) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "feedback");
    map.put("type", "1");
    map.put("text", text);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #14
0
  /** app推薦 */
  public static String returnDatarecommend(String page) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "getapp");
    map.put("system", "android");
    map.put("page", page);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #15
0
  /** 取消绑定 */
  public static String unBindAccount(String userid, String open_name) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "unbound");
    map.put("userid", userid);
    map.put("open_name", open_name);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map) + "我是微博");
      Log.i(TAG, resultStr + "我是微博");
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #16
0
  /** 新闻列表2 */
  public static String newsList2(String page, String key, String sbid) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "newslist4");
    map.put("page", page);
    map.put("key", key);
    map.put("sbid", sbid);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #17
0
  /** 解析数据 23 收藏列表 */
  public static String returnDatacolllist(String typeid, String userid, String page) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "colllist");
    map.put("typeid", typeid);
    map.put("userid", userid);
    map.put("page", page);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #18
0
  /** 搜索重写 */
  public static String searchKey(String page, String key, String deviceid) {
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "searchlist");
    map.put("page", page);
    map.put("key", key);
    map.put("deviceid", deviceid);

    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, "chuan------" + JSONUtil.toJSONString(map));
      Log.i(TAG, "返回值-------" + resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #19
0
  /** xie duanzi */
  public static String writeSnippet(String userid, String text, String pic) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "addhumor");
    map.put("userid", userid);
    map.put("text", text);
    map.put("pic", pic);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #20
0
  /** 取消订阅 */
  public static String subCancelscibe(String userid, String ttkeid) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "subttke");
    map.put("subtype", "0");
    map.put("userid", userid);
    map.put("ttkeid", ttkeid);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #21
0
  public static String newsDetails(String infoid, String sbid, String x, String y) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "infodetail");
    map.put("infoid", infoid);
    map.put("sbid", sbid);
    map.put("x", x);
    map.put("y", y);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #22
0
  public static String snippetDing(String infoid) {

    //		if(flagDing){

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "dingplus");
    map.put("infoid", infoid);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      flagDing = false;
      Log.i(TAG, JSONUtil.toJSONString(map));
      Log.i(TAG, resultStr);
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    //		}
    return null;
  }
Example #23
0
  /** 请求轮播图片 */
  public static String requestPics() {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "getttkehomepic");
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #24
0
 /** 段子顶和踩的操作 */
 public static String snippetDingOrCai(String infoid, String type) {
   Map<String, Object> map = new HashMap<String, Object>();
   map.put("cmd", "setpraiseorstomp");
   map.put("infoid", infoid);
   map.put("type", type);
   String resultStr;
   try {
     resultStr =
         new String(
             Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
     if (resultStr != null) {
       return resultStr;
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   //		}
   return null;
 }
Example #25
0
  /** 最热段子 */
  public static String hottestSnippetList(String page) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "gethumorpiclist");
    map.put("type", "3");
    map.put("page", page);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Example #26
0
  public static String modifyUserInfo(String userid, String nickname, String headpic, String sign) {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("cmd", "modifyuser");
    map.put("userid", userid);
    map.put("nickname", nickname);
    map.put("headpic", headpic);
    map.put("sign", sign);
    String resultStr;
    try {
      resultStr =
          new String(
              Http.httpPost1(FinalConstant.URL_CONTENT_INTERFACE, JSONUtil.toJSONString(map)));
      if (resultStr != null) {
        return resultStr;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }