// Path: app/src/main/java/com/bytetobyte/xwallet/network/api/models/TwitterAuthToken.java
// public class TwitterAuthToken {
//     private String token_type;
//     private String access_token;
// 
//     public String getAccessToken() {
//         return access_token;
//     }
// 
//     public String getTokenType() {
//         return token_type;
//     }
// }
// 
// Path: app/src/main/java/com/bytetobyte/xwallet/network/api/models/TwitterSearchResult.java
// public class TwitterSearchResult {
//     private String created_at;
//     private String id_str;
//     private String text;
//     private boolean truncated;
// 
//     private TwitterEntities entities;
// 
//     public String getCreatedAt() {
//         return created_at;
//     }
// 
//     public String getIdStr() {
//         return id_str;
//     }
// 
//     public String getText() {
//         return text;
//     }
// 
//     public boolean isTruncated() {
//         return truncated;
//     }
// 
//     public TwitterEntities getEntities() {
//         return entities;
//     }
// }
// 
// Path: app/src/main/java/com/bytetobyte/xwallet/network/api/models/TwitterSearchStatuses.java
// public class TwitterSearchStatuses {
//     private List<TwitterSearchResult> statuses;
// 
//     /**
//      *
//      * @return
//      */
//     public List<TwitterSearchResult> getStatuses() {
//         return statuses;
//     }
// }


import android.os.AsyncTask;
import com.bytetobyte.xwallet.network.api.models.TwitterAuthToken;
import com.bytetobyte.xwallet.network.api.models.TwitterSearchResult;
import com.bytetobyte.xwallet.network.api.models.TwitterSearchStatuses;
import com.google.gson.Gson;
import com.squareup.okhttp.FormEncodingBuilder;
import com.squareup.okhttp.HttpUrl;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.RequestBody;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
import java.io.IOException;
import okio.GzipSource;
import okio.Okio;

        String content = null;
        try {
            Response response = client.newCall(request).execute();
            ResponseBody body = response.body();

            if (isZipped(response)) {
                content = unzip(body);
            } else {
                content = body.string();
            }

            body.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

        return content;
    }

    /**
     *
     * @param s
     */
    @Override
    protected void onPostExecute(String s) {
        super.onPostExecute(s);

        try {
            Gson gson = new Gson();
// Path: app/src/main/java/com/bytetobyte/xwallet/network/api/models/TwitterAuthToken.java
// public class TwitterAuthToken {
//     private String token_type;
//     private String access_token;
// 
//     public String getAccessToken() {
//         return access_token;
//     }
// 
//     public String getTokenType() {
//         return token_type;
//     }
// }
// 
// Path: app/src/main/java/com/bytetobyte/xwallet/network/api/models/TwitterSearchResult.java
// public class TwitterSearchResult {
//     private String created_at;
//     private String id_str;
//     private String text;
//     private boolean truncated;
// 
//     private TwitterEntities entities;
// 
//     public String getCreatedAt() {
//         return created_at;
//     }
// 
//     public String getIdStr() {
//         return id_str;
//     }
// 
//     public String getText() {
//         return text;
//     }
// 
//     public boolean isTruncated() {
//         return truncated;
//     }
// 
//     public TwitterEntities getEntities() {
//         return entities;
//     }
// }
// 
// Path: app/src/main/java/com/bytetobyte/xwallet/network/api/models/TwitterSearchStatuses.java
// public class TwitterSearchStatuses {
//     private List<TwitterSearchResult> statuses;
// 
//     /**
//      *
//      * @return
//      */
//     public List<TwitterSearchResult> getStatuses() {
//         return statuses;
//     }
// }


// Path: app/src/main/java/com/bytetobyte/xwallet/network/api/TwitterSearchApi.java
import android.os.AsyncTask;
import com.bytetobyte.xwallet.network.api.models.TwitterAuthToken;
import com.bytetobyte.xwallet.network.api.models.TwitterSearchResult;
import com.bytetobyte.xwallet.network.api.models.TwitterSearchStatuses;
import com.google.gson.Gson;
import com.squareup.okhttp.FormEncodingBuilder;
import com.squareup.okhttp.HttpUrl;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.RequestBody;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
import java.io.IOException;
import okio.GzipSource;
import okio.Okio;


        String content = null;
        try {
            Response response = client.newCall(request).execute();
            ResponseBody body = response.body();

            if (isZipped(response)) {
                content = unzip(body);
            } else {
                content = body.string();
            }

            body.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

        return content;
    }

    /**
     *
     * @param s
     */
    @Override
    protected void onPostExecute(String s) {
        super.onPostExecute(s);

        try {
            Gson gson = new Gson();
            TwitterSearchStatuses searchResult = gson.fromJson(s, TwitterSearchStatuses.class);