Get List of Wordpress users of wordpress
Put this on request componenthttps://WordpressSite.com/wp-json/wp/v2/users
and response code is here
try{
JSONArray array = new JSONArray(_response);
for (int i = 0; i < array.length(); i++) {
JSONObject o = array.getJSONObject(i);
id = o.getString("id");
name = o.getString("name");
description = o.getString("description");
link = o.getString("link");
avatar_urls = o.getJSONObject("avatar_urls").getString("96");
map = new HashMap<>();
map.put("id", id);
map.put("avatar", avatar_urls);
map.put("name", name);
map.put("details", description);
map.put("link", link);
map.put("url", url);
lmap.add(map);
}
recyclerview1.setAdapter(new Recyclerview1Adapter(lmap));
}catch(Exception e){
}
0 Comments