Package weibo4j.model

Examples of weibo4j.model.PostParameter


   * @since JDK 1.5
   */
  public StatusWapper getPublicTimeline(int count, int baseApp) throws WeiboException {
    return Status.constructWapperStatus(Weibo.client.get(
        WeiboConfig.getValue("baseURL") + "statuses/public_timeline.json", new PostParameter[] {
            new PostParameter("count", count),
            new PostParameter("base_app", baseApp) }));

  }
View Full Code Here


  public Response get(String url, PostParameter[] params, Paging paging)
      throws WeiboException {
    if (null != paging) {
      List<PostParameter> pagingParams = new ArrayList<PostParameter>(4);
      if (-1 != paging.getMaxId()) {
        pagingParams.add(new PostParameter("max_id", String
            .valueOf(paging.getMaxId())));
      }
      if (-1 != paging.getSinceId()) {
        pagingParams.add(new PostParameter("since_id", String
            .valueOf(paging.getSinceId())));
      }
      if (-1 != paging.getPage()) {
        pagingParams.add(new PostParameter("page", String
            .valueOf(paging.getPage())));
      }
      if (-1 != paging.getCount()) {
        if (-1 != url.indexOf("search")) {
          // search api takes "rpp"
          pagingParams.add(new PostParameter("rpp", String
              .valueOf(paging.getCount())));
        } else {
          pagingParams.add(new PostParameter("count", String
              .valueOf(paging.getCount())));
        }
      }
      PostParameter[] newparams = null;
      PostParameter[] arrayPagingParams = pagingParams
View Full Code Here

  public StatusWapper getFriendsTimeline(Integer baseAPP, Integer feature,
      Paging paging) throws WeiboException {
    return Status.constructWapperStatus(Weibo.client.get(
        WeiboConfig.getValue("baseURL") + "statuses/friends_timeline.json",
        new PostParameter[] {
            new PostParameter("base_app", baseAPP.toString()),
            new PostParameter("feature", feature.toString()) },
        paging));
    }
View Full Code Here

  public JSONObject getFriendsTimelineIds(Integer baseAPP, Integer feature,
      Paging paging) throws WeiboException {
    return Weibo.client.get(
        WeiboConfig.getValue("baseURL") + "statuses/friends_timeline/ids.json",
        new PostParameter[] {
            new PostParameter("base_app", baseAPP.toString()),
            new PostParameter("feature", feature.toString()) },
        paging).asJSONObject();
    }
View Full Code Here

      Paging paging) throws WeiboException {
    return Status
        .constructWapperStatus(Weibo.client.get(
            WeiboConfig.getValue("baseURL") + "statuses/home_timeline.json",
            new PostParameter[] {
                new PostParameter("base_app", baseAPP.toString()),
                new PostParameter("feature", feature.toString()) },
            paging));
  }
View Full Code Here

        .getValue("baseURL") + "statuses/user_timeline.json"));
  }
  public StatusWapper getUserTimelineByUid(String uid) throws WeiboException {
    return Status.constructWapperStatus(Weibo.client.get(WeiboConfig
        .getValue("baseURL") + "statuses/user_timeline.json",new PostParameter[]{
      new PostParameter("uid", uid)
    }));
  }
View Full Code Here

    }));
  }
  public StatusWapper getUserTimelineByName(String screen_name) throws WeiboException {
    return Status.constructWapperStatus(Weibo.client.get(WeiboConfig
        .getValue("baseURL") + "statuses/user_timeline.json",new PostParameter[]{
      new PostParameter("screen_name", screen_name)
    }));
  }
View Full Code Here

  public StatusWapper getUserTimelineByUid(String uid, Paging page,
      Integer base_app, Integer feature) throws WeiboException {
    return Status.constructWapperStatus(Weibo.client.get(
            WeiboConfig.getValue("baseURL"+ "statuses/user_timeline.json",
            new PostParameter[] {
                new PostParameter("uid", uid),
                new PostParameter("base_app", base_app.toString()),
                new PostParameter("feature", feature.toString()) },
            page));
  }
View Full Code Here

  }
  public StatusWapper getUserTimelineByName(String screen_name, Paging page,Integer base_app, Integer feature) throws WeiboException {
    return Status.constructWapperStatus(Weibo.client.get(
            WeiboConfig.getValue("baseURL"+ "statuses/user_timeline.json",
            new PostParameter[] {
                new PostParameter("screen_name", screen_name),
                new PostParameter("base_app", base_app.toString()),
                new PostParameter("feature", feature.toString()) },
            page));
  }
View Full Code Here

   *      href="http://open.weibo.com/wiki/2/statuses/user_timeline">statuses/user_timeline</a>
   * @since JDK 1.5
   */
  public JSONObject getUserTimelineIdsByUid(String uid) throws WeiboException{
    return Weibo.client.get(WeiboConfig.getValue("baseURL")+"statuses/user_timeline/ids.json",new PostParameter[]{
      new PostParameter("uid", uid)
    }).asJSONObject();
  }
View Full Code Here

TOP

Related Classes of weibo4j.model.PostParameter

Copyright © 2018 www.massapicom. 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.