Package weibo4j.model

Examples of weibo4j.model.Status


        System.out.println("content length:" + content.length);
        ImageItem pic = new ImageItem("pic", content);
        String s = java.net.URLEncoder.encode(args[1], "utf-8");
        Timeline tl = new Timeline();
        tl.client.setToken(args[0]);// access_token
        Status status = tl.UploadStatus(s, pic);

        System.out.println("Successfully upload the status to [" + status.getText() + "].");
      } catch (Exception e1) {
        e1.printStackTrace();
      }
    } catch (Exception ioe) {
      System.out.println("Failed to read the system input.");
View Full Code Here


    String access_token = args[0];
    String id = args[1];
    Timeline tm = new Timeline();
    tm.client.setToken(access_token);
    try {
      Status status = tm.Destroy(id);
      Log.logInfo(status.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    String access_token = args[0];
    String statuses = args[1];
    Timeline tm = new Timeline();
    tm.client.setToken(access_token);
    try {
      Status status = tm.UpdateStatus(statuses);
      Log.logInfo(status.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

   *      href="http://open.weibo.com/wiki/2/statuses/upload">statuses/upload</a>
   * @since JDK 1.5
   */
  public Status UploadStatus(String status, ImageItem item, Float lat, Float longs)
      throws WeiboException {
    return new Status(client.multPartURL(WeiboConfig.getValue("baseURL") + "statuses/upload.json",
        new PostParameter[] {new PostParameter("status", status),
            new PostParameter("lat", lat.toString()), new PostParameter("long", longs.toString())},
        item));
  }
View Full Code Here

    String access_token = args[0];
    String id = args[1];
    Timeline tm = new Timeline();
    tm.client.setToken(access_token);
    try {
      Status status = tm.showStatus(id);

      Log.logInfo(status.toString());

    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    String access_token = args[0];
    String id = args[1];
    Timeline tm = new Timeline();
    tm.client.setToken(access_token);
    try {
      Status status = tm.Repost(id);
      Log.logInfo(status.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

   * @see <a
   *      href="http://open.weibo.com/wiki/2/statuses/show">statuses/show</a>
   * @since JDK 1.5
   */
  public Status showStatus(String id) throws WeiboException {
    return new Status(client.get(WeiboConfig.getValue("baseURL") + "statuses/show.json",
        new PostParameter[] {new PostParameter("id", id)}));
  }
View Full Code Here

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

   * @see <a
   *      href="http://open.weibo.com/wiki/2/statuses/repost">statuses/repost</a>
   * @since JDK 1.5
   */
  public Status Repost(String id, String status, Integer is_comment) throws WeiboException {
    return new Status(client.post(WeiboConfig.getValue("baseURL") + "statuses/repost.json",
        new PostParameter[] {new PostParameter("id", id), new PostParameter("status", status),
            new PostParameter("is_comment", is_comment.toString())}));
  }
View Full Code Here

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

TOP

Related Classes of weibo4j.model.Status

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.