Search in sources :

Example 1 with VideoDeserializer

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

the class AlbumVideosAllRequest method handleResult.

@Override
public ArrayList<GraphObject> handleResult(JSONArray result) {
    VideoDeserializer deserializer = new VideoDeserializer();
    ArrayList<GraphObject> videos = (ArrayList<GraphObject>) deserializer.deserializeArray(result);
    setHasMoreData(videos.size() >= 50);
    return videos;
}
Also used : ArrayList(java.util.ArrayList) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject) VideoDeserializer(com.abewy.android.apps.klyph.core.fql.serializer.VideoDeserializer)

Example 2 with VideoDeserializer

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

the class AlbumVideosRequest method handleResult.

@Override
public ArrayList<GraphObject> handleResult(JSONArray result) {
    VideoDeserializer deserializer = new VideoDeserializer();
    ArrayList<GraphObject> videos = (ArrayList<GraphObject>) deserializer.deserializeArray(result);
    setHasMoreData(videos.size() >= 50);
    return videos;
}
Also used : ArrayList(java.util.ArrayList) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject) VideoDeserializer(com.abewy.android.apps.klyph.core.fql.serializer.VideoDeserializer)

Example 3 with VideoDeserializer

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

the class VideoRequest method handleResult.

@Override
public ArrayList<GraphObject> handleResult(JSONArray[] result) {
    JSONArray video = result[0];
    JSONArray owner = result[1];
    JSONArray album = result[2];
    JSONArray pics = result[3];
    assocData(video, owner, "owner", "id", "owner_name", "name");
    assocData(video, album, "album_object_id", "object_id", "album_name", "name");
    assocData(video, pics, "owner", "id", "owner_pic", "url");
    VideoDeserializer deserializer = new VideoDeserializer();
    ArrayList<GraphObject> list = (ArrayList<GraphObject>) deserializer.deserializeArray(video);
    setHasMoreData(false);
    return list;
}
Also used : JSONArray(org.json.JSONArray) ArrayList(java.util.ArrayList) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject) VideoDeserializer(com.abewy.android.apps.klyph.core.fql.serializer.VideoDeserializer)

Aggregations

VideoDeserializer (com.abewy.android.apps.klyph.core.fql.serializer.VideoDeserializer)3 GraphObject (com.abewy.android.apps.klyph.core.graph.GraphObject)3 ArrayList (java.util.ArrayList)3 JSONArray (org.json.JSONArray)1