Package com.dongxuexidu.douban4j.service

Examples of com.dongxuexidu.douban4j.service.DoubanShuoService


    }
  }
 
  public static void testGetDoubanShuoStatuses () {
    try {
      DoubanShuoService service = new DoubanShuoService();
      DoubanShuoStatusObj[] result = service.getStatusesByUserId("xxx");
      System.out.println("size : " + result.length);
      for (DoubanShuoStatusObj s : result) {
        System.out.println("text : " + s.getText() + " , title : " + s.getTitle());
      }
    } catch (DoubanException ex) {
View Full Code Here


  }
 
  public static void testPostStatus () {
    try {
      String accessToken = testAccessToken();
      DoubanShuoService service = new DoubanShuoService();
      DoubanShuoAttachementObj att = generateAtt();
      if (service.postNewStatus("I like..", att, DefaultConfigs.API_KEY, accessToken)) {
        System.out.println("done!");
      } else {
        System.out.println("failed!");
      }
    } catch (DoubanException ex) {
View Full Code Here

    }
  }
 
  public static void testGetDoubanShuoUser () {
    try {
      DoubanShuoService service = new DoubanShuoService();
      DoubanShuoUserObj[] users = service.getFollowingUserByUserId("xxx");
      for (DoubanShuoUserObj user : users) {
        System.out.println("user name : " + user.getScreenName());
        System.out.println("user id : " + user.getUid());
        System.out.println("user full id : " + user.getId());
      }
View Full Code Here

  }
 
  public static void testFollowUser () {
    try {
      String accessToken = testAccessToken();
      DoubanShuoService service = new DoubanShuoService();
      boolean result = service.followUser("xxx", DefaultConfigs.API_KEY,accessToken);
      if (result) {
        System.out.println("done!");
      } else {
        System.out.println("failed!");
      }
View Full Code Here

    }
  }
 
  public static void testGetRelationShip() {
    try {
      DoubanShuoService service = new DoubanShuoService();
      DoubanShuoService.DoubanShuoRelation relation = service.getRelationship("xxx", "xxx", DefaultConfigs.API_KEY);
      if (relation == DoubanShuoService.DoubanShuoRelation.FollowingOnly) {
        System.out.println("following");
      } else if (relation == DoubanShuoService.DoubanShuoRelation.BeFollowedOnly) {
        System.out.println("followed by");
      } else if (relation == DoubanShuoService.DoubanShuoRelation.Friend) {
View Full Code Here

TOP

Related Classes of com.dongxuexidu.douban4j.service.DoubanShuoService

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.