Examples of WeiBoIdoInfoBean


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

      List<WeiBoIdoInfoBean> infoList = new ArrayList<WeiBoIdoInfoBean>();
     
      // 循环把所有听众信息保存起来
      for (int i = 0; i < infoJsonObj.length(); i++) {
       
        WeiBoIdoInfoBean infoBean = new WeiBoIdoInfoBean();
       
        // 单个的听众信息
        JSONObject jsonObjTemp = new JSONObject(infoJsonObj.get(i).toString());
       
        // 听众的账户名
        infoBean.setName(jsonObjTemp.getString("name"));
       
        // 听众的唯一ID
        infoBean.setOpenId(jsonObjTemp.getString("openid"));
       
        // 听众的昵称
        infoBean.setNick(jsonObjTemp.getString("nick"));
       
        // 听众头像url
        infoBean.setHead(jsonObjTemp.getString("head"));
       
        // 听众性别
        // infoBean.setSex(jsonObjTemp.get("sex").toString());
       
        // 听众所在地
        infoBean.setLocation(jsonObjTemp.getString("location"));
       
        // 标签
        JSONArray tweetArray = jsonObjTemp.getJSONArray("tweet");
        JSONObject jsonObjTempTweet = new JSONObject(tweetArray.get(0).toString());
       
        // 听众最近发表的一条微博内容
        infoBean.setTweetText(jsonObjTempTweet.getString("text"));
       
        // 听众最近发表的一条微博来源
        infoBean.setTweetFrom(jsonObjTempTweet.getString("from"));
       
        // 微博ID,用来唯一标识一条微博
        infoBean.setTweetId(jsonObjTempTweet.get("id").toString());
       
        // 发表微博的时间
        infoBean.setTweetTime(oqu.timeStampToDate(jsonObjTempTweet.get("timestamp").toString()));
       
        // 听众数
        infoBean.setFansnum(jsonObjTemp.get("fansnum").toString());
       
        // 收听的人数
        infoBean.setIdolnum(jsonObjTemp.get("idolnum").toString());
       
        // 是否为用户收听的人 0:不是; 1:是
        infoBean.setIsidol(jsonObjTemp.get("isidol").toString());
       
        // 听众是否为微博认证用户 0:不是; 1:是
        infoBean.setIsvip(jsonObjTemp.get("isvip").toString());
       
        // 听众标签
        if (!"null".equals(jsonObjTemp.get("tag").toString())) {
          List<WeiBoTagResultBean> tags = new ArrayList<WeiBoTagResultBean>();
         
          // 听众标签
          JSONArray tagsArray = jsonObjTemp.getJSONArray("tag");
         
          for (int j = 0; j < tagsArray.length(); j++) {
            WeiBoTagResultBean tagsBean = new WeiBoTagResultBean();
            // 听众标签
            JSONObject tagsObject = new JSONObject(tagsArray.get(j).toString());
           
            // 标签ID
            tagsBean.setId(tagsObject.getString("id"));
           
            // 标签名
            tagsBean.setName(tagsObject.getString("name"));
           
            tags.add(tagsBean);
          }
         
          // 设置用户标签
          infoBean.setTabList(tags);
        }
        // 设置用户相信信息
        infoList.add(infoBean);
      }
      resultBean.setIdoInfoList(infoList);
View Full Code Here

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

      List<WeiBoIdoInfoBean> infoList = new ArrayList<WeiBoIdoInfoBean>();
     
      // 循环把所有听众信息保存起来
      for (int i = 0; i < infoJsonObj.length(); i++) {
       
        WeiBoIdoInfoBean infoBean = new WeiBoIdoInfoBean();
       
        // 单个的听众信息
        JSONObject jsonObjTemp = new JSONObject(infoJsonObj.get(i).toString());
       
        // 听众的账户名
        infoBean.setName(jsonObjTemp.getString("name"));
       
        // 听众的唯一ID
        infoBean.setOpenId(jsonObjTemp.getString("openid"));
       
        // 听众的昵称
        infoBean.setNick(jsonObjTemp.getString("nick"));
       
        // 听众头像url
        infoBean.setHead(jsonObjTemp.getString("head"));
       
        // 听众性别
        // infoBean.setSex(jsonObjTemp.get("sex").toString());
       
        // 听众所在地
        infoBean.setLocation(jsonObjTemp.getString("location"));
       
        // 标签
        JSONArray tweetArray = jsonObjTemp.getJSONArray("tweet");
        JSONObject jsonObjTempTweet = new JSONObject(tweetArray.get(0).toString());
       
        // 听众最近发表的一条微博内容
        infoBean.setTweetText(jsonObjTempTweet.getString("text"));
       
        // 听众最近发表的一条微博来源
        infoBean.setTweetFrom(jsonObjTempTweet.getString("from"));
       
        // 微博ID,用来唯一标识一条微博
        infoBean.setTweetId(jsonObjTempTweet.get("id").toString());
       
        // 发表微博的时间
        infoBean.setTweetTime(oqu.timeStampToDate(jsonObjTempTweet.get("timestamp").toString()));
       
        // 听众数
        infoBean.setFansnum(jsonObjTemp.get("fansnum").toString());
       
        // 收听的人数
        infoBean.setIdolnum(jsonObjTemp.get("idolnum").toString());
       
        // 是否为用户收听的人 0:不是; 1:是
        infoBean.setIsidol(jsonObjTemp.get("isidol").toString());
       
        // 听众是否为微博认证用户 0:不是; 1:是
        infoBean.setIsvip(jsonObjTemp.get("isvip").toString());
       
        // 听众标签
        if (!"null".equals(jsonObjTemp.get("tag").toString())) {
          List<WeiBoTagResultBean> tags = new ArrayList<WeiBoTagResultBean>();
         
          // 听众标签
          JSONArray tagsArray = jsonObjTemp.getJSONArray("tag");
         
          for (int j = 0; j < tagsArray.length(); j++) {
            WeiBoTagResultBean tagsBean = new WeiBoTagResultBean();
            // 听众标签
            JSONObject tagsObject = new JSONObject(tagsArray.get(j).toString());
           
            // 标签ID
            tagsBean.setId(tagsObject.getString("id"));
           
            // 标签名
            tagsBean.setName(tagsObject.getString("name"));
           
            tags.add(tagsBean);
          }
         
          // 设置用户标签
          infoBean.setTabList(tags);
        }
        // 设置用户相信信息
        infoList.add(infoBean);
      }
      resultBean.setIdoInfoList(infoList);
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.