Пример #1
0
 private static void testUserFriends(DoubanService myService) {
   try {
     UserFeed uf = myService.getUserFriends("subdragon", 1, 2);
     for (UserEntry ue : uf.getEntries()) {
       printUserEntry(ue);
     }
   } catch (IOException e) {
     e.printStackTrace();
   } catch (ServiceException e) {
     e.printStackTrace();
   }
 }
Пример #2
0
  private static void testUserEntry(DoubanService myService) {
    UserEntry userEntry;
    try {
      String userId = "ahbei";
      userEntry = myService.getUser(userId);
      printUserEntry(userEntry);

      // printUserEntry(myService.getAuthorizedUser());

      // q=douban&start-index=10&max-results=1
      UserFeed userFeed = myService.findUser("douban", 1, 1);
      for (UserEntry ue : userFeed.getEntries()) {
        printUserEntry(ue);
      }
    } catch (IOException e) {
      e.printStackTrace();
    } catch (ServiceException e) {
      e.printStackTrace();
    }
  }