Package weibo4j.model

Examples of weibo4j.model.PostParameter


   * @since JDK 1.5
   */
  public Favorites showFavorites(String id) throws WeiboException {
    return new Favorites(Weibo.client.get(WeiboConfig.getValue("baseURL")
        + "favorites/show.json",
        new PostParameter[] { new PostParameter("id", id) }));
  }
View Full Code Here


   * @since JDK 1.5
   */
  public List<Favorites> getFavoritesByTags(String tid) throws WeiboException {
    return Favorites.constructFavorites(Weibo.client.get(
        WeiboConfig.getValue("baseURL") + "favorites/by_tags.json",
        new PostParameter[] { new PostParameter("tid", tid) }));
  }
View Full Code Here

   */
  public List<Favorites> getFavoritesByTags(String tid, Paging page)
      throws WeiboException {
    return Favorites.constructFavorites(Weibo.client.get(
        WeiboConfig.getValue("baseURL") + "favorites/by_tags.json",
        new PostParameter[] { new PostParameter("tid", tid) }, page));
  }
View Full Code Here

   * @since JDK 1.5
   */
  public Favorites createFavorites(String id) throws WeiboException {
    return new Favorites(Weibo.client.post(WeiboConfig.getValue("baseURL")
        + "favorites/create.json",
        new PostParameter[] { new PostParameter("id", id) }));
  }
View Full Code Here

   * @since JDK 1.5
   */
  public Favorites destroyFavorites(String id) throws WeiboException {
    return new Favorites(Weibo.client.post(WeiboConfig.getValue("baseURL")
        + "favorites/destroy.json",
        new PostParameter[] { new PostParameter("id", id) }));
  }
View Full Code Here

  public Boolean destroyFavoritesBatch(String ids) throws WeiboException {
    try {
      return Weibo.client
          .post(WeiboConfig.getValue("baseURL")
              + "favorites/destroy_batch.json",
              new PostParameter[] { new PostParameter("ids", ids) })
          .asJSONObject().getBoolean("result");
    } catch (JSONException e) {
      throw new WeiboException(e);
    }
  }
View Full Code Here

   * @since JDK 1.5
   */
  public Favorites updateFavoritesTags(String id) throws WeiboException {
    return new Favorites(Weibo.client.post(WeiboConfig.getValue("baseURL")
        + "favorites/tags/update.json",
        new PostParameter[] { new PostParameter("id", id) }));
  }
View Full Code Here

   */
  public Favorites updateFavoritesTags(String id, String tags)
      throws WeiboException {
    return new Favorites(Weibo.client.post(WeiboConfig.getValue("baseURL")
        + "favorites/tags/update.json", new PostParameter[] {
        new PostParameter("id", id), new PostParameter("tags", tags) }));
  }
View Full Code Here

  public JSONObject updateFavoritesTagsBatch(String tid, String tag)
      throws WeiboException {
    return Weibo.client.post(
        WeiboConfig.getValue("baseURL")
            + "favorites/tags/update_batch.json",
        new PostParameter[] { new PostParameter("tid", tid),
            new PostParameter("tag", tag) }).asJSONObject();
  }
View Full Code Here

  public Boolean destroyFavoritesTagsBatch(String ids) throws WeiboException {
    try {
      return Weibo.client
          .post(WeiboConfig.getValue("baseURL")
              + "favorites/destroy_batch.json",
              new PostParameter[] { new PostParameter("ids", ids) })
          .asJSONObject().getBoolean("result");
    } catch (JSONException e) {
      throw new WeiboException(e);
    }
  }
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.