Examples of Favorites


Examples of com.uphea.domain.Favorites

  /**
   * Stores favorite.
   */
  public Favorites storeFavorite(Question question, User user) {
    Favorites favorites = new Favorites(question.getId(), user.getId());
    return appDao.store(favorites);
  }
View Full Code Here

Examples of com.uphea.domain.Favorites

  /**
   * Deletes favorite.
   */
  public void removeFavorite(Question question, User user) {
    Favorites favorites = findUserFavorite(question, user);
    if (favorites == null) {
      return;
    }
    appDao.deleteById(favorites);
  }
View Full Code Here

Examples of weibo4j.model.Favorites

   * @see <a
   *      href="http://open.weibo.com/wiki/2/favorites/show">favorites/show</a>
   * @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

Examples of weibo4j.model.Favorites

   * @see <a
   *      href="http://open.weibo.com/wiki/2/favorites/create">favorites/create</a>
   * @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

Examples of weibo4j.model.Favorites

   * @see <a
   *      href="http://open.weibo.com/wiki/2/favorites/destroy">favorites/destroy</a>
   * @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

Examples of weibo4j.model.Favorites

   * @see <a
   *      href="http://open.weibo.com/wiki/2/favorites/tags/update">favorites/tags/update</a>
   * @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

Examples of weibo4j.model.Favorites

   *      href="http://open.weibo.com/wiki/2/favorites/tags/update">favorites/tags/update</a>
   * @since JDK 1.5
   */
  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

Examples of weibo4j.model.Favorites

    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Favorite fm = new Favorite();
    String id = "3406785442845028";
    try {
      Favorites favors =fm.destroyFavorites(id);
      Log.logInfo(favors.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of weibo4j.model.Favorites

    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    String id = "3406785442845028";
    Favorite fm = new Favorite();
    try {
      Favorites favors = fm.createFavorites(id);
      Log.logInfo(favors.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of weibo4j.model.Favorites

    weibo.setToken(access_token);
    Favorite fm = new Favorite();
    try {
      String tags=args[1];
      String id = args[2];
      Favorites favors = fm.updateFavoritesTags(id, tags);
      Log.logInfo(favors.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
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.