Beispiel #1
0
  public Map<User, List<User>> get(Iterable<User> friends) {
    errors.clear();

    Map<User, List<User>> friendsMap = new HashMap<User, List<User>>();
    Map<User, VKAsyncResult> futures = new HashMap<User, VKClient.VKAsyncResult>();

    for (User friend : friends) {
      futures.put(friend, client.sendAsync(buildRequest(friend.id)));
    }

    process(friendsMap, futures);
    return friendsMap;
  }
Beispiel #2
0
 public List<User> get(String id) {
   errors.clear();
   Result result = client.send(buildRequest(id));
   return processResponse(id, result);
 }