public ArrayList User getProfiles Collection Long uids Collection Stri

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
public ArrayList<User> getProfiles(Collection<Long> uids, Collection<String> domains, String fields, String name_case, String captcha_key, String captcha_sid) throws IOException, JSONException, KException{
if (uids == null && domains == null)
return null;
if ((uids != null && uids.size() == 0) || (domains != null && domains.size() == 0))
return null;
Params params = new Params("users.get");
if (uids != null && uids.size() > 0)
params.put("user_ids",arrayToString(uids));
if (domains != null && domains.size() > 0)
params.put("user_ids",arrayToString(domains));
params.put("fields",fields);
params.put("name_case",name_case);
addCaptchaParams(captcha_key, captcha_sid, params);
JSONObject root = sendRequest(params);
JSONArray array=root.optJSONArray("response");
return User.parseUsers(array);
}
public static ArrayList<User> parseUsers(JSONArray array) throws JSONException {
return parseUsers(array, false);
}