use of com.abewy.android.apps.klyph.core.graph.GraphObject in project Klyph by jonathangerbaud.
the class GroupMembersRequest method handleResult.
@Override
public ArrayList<GraphObject> handleResult(JSONArray[] result) {
JSONArray data = result[0];
JSONArray urls = result[1];
assocData(data, urls, "uid", "id", "pic", "url");
FriendDeserializer deserializer = new FriendDeserializer();
ArrayList<GraphObject> friends = (ArrayList<GraphObject>) deserializer.deserializeArray(data);
setHasMoreData(friends.size() >= 50);
return friends;
}
use of com.abewy.android.apps.klyph.core.graph.GraphObject in project Klyph by jonathangerbaud.
the class GroupProfileRequest method handleResult.
@Override
public ArrayList<GraphObject> handleResult(JSONArray[] result) {
JSONArray groupData = result[0];
JSONObject page = groupData.optJSONObject(0);
ArrayList<GraphObject> data = null;
if (page != null) {
GroupDeserializer deserializer = new GroupDeserializer();
data = (ArrayList<GraphObject>) deserializer.deserializeArray(groupData);
} else {
data = new ArrayList<GraphObject>();
}
setHasMoreData(false);
return data;
}
use of com.abewy.android.apps.klyph.core.graph.GraphObject in project Klyph by jonathangerbaud.
the class ElementEventRequest method handleResult.
@Override
public ArrayList<GraphObject> handleResult(JSONArray[] result) {
JSONArray data = result[0];
JSONArray urls = result[1];
assocData(data, urls, "eid", "id", "pic", "url");
EventDeserializer deserializer = new EventDeserializer();
ArrayList<GraphObject> events = (ArrayList<GraphObject>) deserializer.deserializeArray(data);
setHasMoreData(events.size() >= 25);
return events;
}
use of com.abewy.android.apps.klyph.core.graph.GraphObject in project Klyph by jonathangerbaud.
the class EventDeclinedRequest method handleResult.
@Override
public ArrayList<GraphObject> handleResult(JSONArray[] result) {
JSONArray data = result[0];
JSONArray urls = result[1];
assocData(data, urls, "uid", "id", "pic", "url");
FriendDeserializer deserializer = new FriendDeserializer();
ArrayList<GraphObject> friends = (ArrayList<GraphObject>) deserializer.deserializeArray(data);
setHasMoreData(friends.size() >= 50);
return friends;
}
use of com.abewy.android.apps.klyph.core.graph.GraphObject in project Klyph by jonathangerbaud.
the class EventTimelineRequest method handleResult.
@Override
public ArrayList<GraphObject> handleResult(JSONArray[] result) {
ArrayList<GraphObject> streams = super.handleResult(result);
if (result.length > 12) {
if (result[12].length() > 0) {
JSONArray eventData = result[12];
JSONArray rsvp_status = result[13];
EventDeserializer deserializer = new EventDeserializer();
Event event = (Event) deserializer.deserializeArray(eventData).get(0);
try {
JSONObject o = rsvp_status.getJSONObject(0);
event.setUserResponse(o.getString("rsvp_status"));
} catch (JSONException e) {
event.setUserResponse(EventResponse.NOT_REPLIED.toString());
}
streams.add(0, event);
}
}
setHasMoreData(streams.size() > 0);
return streams;
}
Aggregations