Search in sources :

Example 6 with FriendDeserializer

use of com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer in project Klyph by jonathangerbaud.

the class AllFriendsRequest method handleResult.

@Override
public ArrayList<GraphObject> handleResult(JSONArray[] result) {
    JSONArray friends = result[0];
    JSONArray pics = result[1];
    assocData(friends, pics, "uid", "id", "pic", "url");
    FriendDeserializer deserializer = new FriendDeserializer();
    ArrayList<GraphObject> list = (ArrayList<GraphObject>) deserializer.deserializeArray(friends);
    setHasMoreData(false);
    return list;
}
Also used : JSONArray(org.json.JSONArray) ArrayList(java.util.ArrayList) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject) FriendDeserializer(com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer)

Example 7 with FriendDeserializer

use of com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer in project Klyph by jonathangerbaud.

the class BirthdayNotificationRequest 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() >= 25);
    return friends;
}
Also used : JSONArray(org.json.JSONArray) ArrayList(java.util.ArrayList) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject) FriendDeserializer(com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer)

Example 8 with FriendDeserializer

use of com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer in project Klyph by jonathangerbaud.

the class BirthdayRequest 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() >= 25);
    return friends;
}
Also used : JSONArray(org.json.JSONArray) ArrayList(java.util.ArrayList) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject) FriendDeserializer(com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer)

Example 9 with FriendDeserializer

use of com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer in project Klyph by jonathangerbaud.

the class FriendsRequest 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);
    setHasMoreData(false);
    return friends;
}
Also used : JSONArray(org.json.JSONArray) ArrayList(java.util.ArrayList) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject) FriendDeserializer(com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer)

Example 10 with FriendDeserializer

use of com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer 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;
}
Also used : JSONArray(org.json.JSONArray) ArrayList(java.util.ArrayList) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject) FriendDeserializer(com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer)

Aggregations

FriendDeserializer (com.abewy.android.apps.klyph.core.fql.serializer.FriendDeserializer)11 GraphObject (com.abewy.android.apps.klyph.core.graph.GraphObject)11 ArrayList (java.util.ArrayList)11 JSONArray (org.json.JSONArray)11