// 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;
//     }
// }


import android.os.AsyncTask;
import android.util.Base64;
import com.bytetobyte.xwallet.network.api.models.TwitterAuthToken;
import com.google.gson.Gson;
import com.squareup.okhttp.Credentials;
import com.squareup.okhttp.FormEncodingBuilder;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
import java.io.IOException;
import okio.GzipSource;
import okio.Okio;
     * @return
     */
    private boolean isZipped(Response response) {
        return "gzip".equalsIgnoreCase(response.header("Content-Encoding"));
    }

    /**
     *
     * @param body
     * @return
     */
    private String unzip(ResponseBody body) {
        try {
            GzipSource responseBody = new GzipSource(body.source());
            return Okio.buffer(responseBody).readUtf8();
        } catch (IOException e) {
            return null;
        }
    }

    /**
     *
     * @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/TwitterAuthApi.java
import android.os.AsyncTask;
import android.util.Base64;
import com.bytetobyte.xwallet.network.api.models.TwitterAuthToken;
import com.google.gson.Gson;
import com.squareup.okhttp.Credentials;
import com.squareup.okhttp.FormEncodingBuilder;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
import java.io.IOException;
import okio.GzipSource;
import okio.Okio;

     * @return
     */
    private boolean isZipped(Response response) {
        return "gzip".equalsIgnoreCase(response.header("Content-Encoding"));
    }

    /**
     *
     * @param body
     * @return
     */
    private String unzip(ResponseBody body) {
        try {
            GzipSource responseBody = new GzipSource(body.source());
            return Okio.buffer(responseBody).readUtf8();
        } catch (IOException e) {
            return null;
        }
    }

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

        try {
            Gson gson = new Gson();
            TwitterAuthToken authResponse = gson.fromJson(s, TwitterAuthToken.class);