// Path: sample/src/main/java/com/vimeo/sample/model/DateParser.java
// public class DateParser extends TypeAdapter<Date> {
// 
//     private static final SimpleDateFormat dateFormat =
//             new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZZZZZ", Locale.ENGLISH);
// 
//     @Override
//     public void write(JsonWriter out, Date value) throws IOException {
//         out.value(dateFormat.format(value));
//     }
// 
//     @Override
//     public Date read(JsonReader in) throws IOException {
//         try {
//             return dateFormat.parse(in.nextString());
//         } catch (ParseException e) {
//             throw new IOException("Date parsing failed", e);
//         }
//     }
// }
// 
// Path: sample/src/main/java/com/vimeo/sample/model/Video.java
// @UseStag
// public class Video {
// 
//     @SerializedName("user")
//     public User mUser;
// 
//     @SerializedName("link")
//     public String mLink;
// 
//     @SerializedName("name")
//     public String mName;
// 
//     @SerializedName("created_time")
//     public Date mCreatedTime;
// 
//     @SerializedName("stats")
//     public Stats mStats;
// 
//     @Override
//     public String toString() {
//         return "user: { " + (mUser != null ? mUser.toString() : null) + " }\nlink: " + mLink + "\nname: " +
//                mName + "\ncreated_time: " + mCreatedTime + "\nstats: { " +
//                (mStats != null ? mStats.toString() : null) + " }";
//     }
// }


import android.os.AsyncTask;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.TypeAdapter;
import com.vimeo.sample.model.DateParser;
import com.vimeo.sample.model.Video;
import com.vimeo.sample.model.VideoList;
import com.vimeo.sample.model.VideoList$TypeAdapter;
import com.vimeo.sample.stag.generated.Stag;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Executors;
/*
 * The MIT License (MIT)
 * <p/>
 * Copyright (c) 2016 Vimeo
 * <p/>
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * <p/>
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * <p/>
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.vimeo.sample.network;




public final class NetworkRequest {

    private static final String TAG = "NetworkRequest";

    public interface Callback {

// Path: sample/src/main/java/com/vimeo/sample/model/DateParser.java
// public class DateParser extends TypeAdapter<Date> {
// 
//     private static final SimpleDateFormat dateFormat =
//             new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZZZZZ", Locale.ENGLISH);
// 
//     @Override
//     public void write(JsonWriter out, Date value) throws IOException {
//         out.value(dateFormat.format(value));
//     }
// 
//     @Override
//     public Date read(JsonReader in) throws IOException {
//         try {
//             return dateFormat.parse(in.nextString());
//         } catch (ParseException e) {
//             throw new IOException("Date parsing failed", e);
//         }
//     }
// }
// 
// Path: sample/src/main/java/com/vimeo/sample/model/Video.java
// @UseStag
// public class Video {
// 
//     @SerializedName("user")
//     public User mUser;
// 
//     @SerializedName("link")
//     public String mLink;
// 
//     @SerializedName("name")
//     public String mName;
// 
//     @SerializedName("created_time")
//     public Date mCreatedTime;
// 
//     @SerializedName("stats")
//     public Stats mStats;
// 
//     @Override
//     public String toString() {
//         return "user: { " + (mUser != null ? mUser.toString() : null) + " }\nlink: " + mLink + "\nname: " +
//                mName + "\ncreated_time: " + mCreatedTime + "\nstats: { " +
//                (mStats != null ? mStats.toString() : null) + " }";
//     }
// }


// Path: sample/src/main/java/com/vimeo/sample/network/NetworkRequest.java
import android.os.AsyncTask;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.TypeAdapter;
import com.vimeo.sample.model.DateParser;
import com.vimeo.sample.model.Video;
import com.vimeo.sample.model.VideoList;
import com.vimeo.sample.model.VideoList$TypeAdapter;
import com.vimeo.sample.stag.generated.Stag;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Executors;

/*
 * The MIT License (MIT)
 * <p/>
 * Copyright (c) 2016 Vimeo
 * <p/>
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * <p/>
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * <p/>
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.vimeo.sample.network;




public final class NetworkRequest {

    private static final String TAG = "NetworkRequest";

    public interface Callback {

        void onReceived(List<Video> list);