Package weibo4j.model

Examples of weibo4j.model.User


    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    String uid = args[1];
    Friendships fm = new Friendships();
    try {
      User user = fm.createFriendshipsById(uid);
      Log.logInfo(user.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }

  }
View Full Code Here


    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    String uid =  args[1];
    Users um = new Users();
    try {
      User user = um.showUserById(uid);
      Log.logInfo(user.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    String access_token = args[0];
    String uid = args[1];
    Friendships fm = new Friendships();
    fm.client.setToken(access_token);
    try {
      User user = fm.createFriendshipsById(uid);
      Log.logInfo(user.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }

  }
View Full Code Here

    String access_token = args[0];
    String uid = args[1];
    Friendships fm = new Friendships();
    fm.client.setToken(access_token);
    try {
      User fv = fm.destroyFriendshipsDestroyById(uid);
      Log.logInfo(fv.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

   * @see <a
   *      href="http://open.weibo.com/wiki/2/friendships/create">friendships/create</a>
   * @since JDK 1.5
   */
  public User createFriendshipsById(String uid) throws WeiboException {
    return new User(client.post(WeiboConfig.getValue("baseURL") + "friendships/create.json",
        new PostParameter[] {new PostParameter("uid", uid)}).asJSONObject());
  }
View Full Code Here

   * @see <a
   *      href="http://open.weibo.com/wiki/2/friendships/create">friendships/create</a>
   * @since JDK 1.5
   */
  public User createFriendshipsByName(String screen_name) throws WeiboException {
    return new User(client.post(WeiboConfig.getValue("baseURL") + "friendships/create.json",
        new PostParameter[] {new PostParameter("screen_name", screen_name)}).asJSONObject());
  }
View Full Code Here

   * @see <a
   *      href="http://open.weibo.com/wiki/2/friendships/destroy">friendships/destroy</a>
   * @since JDK 1.5
   */
  public User destroyFriendshipsDestroyById(String uid) throws WeiboException {
    return new User(client.post(WeiboConfig.getValue("baseURL") + "friendships/destroy.json",
        new PostParameter[] {new PostParameter("uid", uid)}).asJSONObject());
  }
View Full Code Here

   * @see <a
   *      href="http://open.weibo.com/wiki/2/friendships/destroy">friendships/destroy</a>
   * @since JDK 1.5
   */
  public User destroyFriendshipsDestroyByName(String screen_name) throws WeiboException {
    return new User(client.post(WeiboConfig.getValue("baseURL") + "friendships/destroy.json",
        new PostParameter[] {new PostParameter("screen_name", screen_name)}).asJSONObject());
  }
View Full Code Here

   * @version weibo4j-V2 1.0.1
   * @see <a href="http://open.weibo.com/wiki/2/users/show">users/show</a>
   * @since JDK 1.5
   */
  public User showUserById(String uid) throws WeiboException {
    return new User(client.get(WeiboConfig.getValue("baseURL") + "users/show.json",
        new PostParameter[] {new PostParameter("uid", uid)}).asJSONObject());
  }
View Full Code Here

   * @version weibo4j-V2 1.0.1
   * @see <a href="http://open.weibo.com/wiki/2/users/show">users/show</a>
   * @since JDK 1.5
   */
  public User showUserByScreenName(String screen_name) throws WeiboException {
    return new User(client.get(WeiboConfig.getValue("baseURL") + "users/show.json",
        new PostParameter[] {new PostParameter("screen_name", screen_name)}).asJSONObject());
  }
View Full Code Here

TOP

Related Classes of weibo4j.model.User

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.