package com.datarecovery.master.data.api.request;

import com.atmob.user.param.AtmobParams;
import com.datarecovery.master.BuildConfig;
import com.datarecovery.master.data.repositories.AccountRepository;
import com.google.gson.annotations.SerializedName;

import java.lang.reflect.Field;

public class BaseRequest extends AtmobParams {

    @SerializedName("appPlatform")
    private final int appPlatform;

    @SerializedName("authToken")
    private String authToken;


    public BaseRequest() {
        this.appPlatform = 1;
        this.authToken = AccountRepository.token;
//        if (BuildConfig.DEBUG) {
//            try {
//                Field androidId = AtmobParams.class.getDeclaredField("androidId");
//                androidId.setAccessible(true);
//                androidId.set(this, "6713123wdq22e1232");
//            } catch (NoSuchFieldException e) {
//
//            } catch (IllegalAccessException e) {
//
//            }
//        }
    }

    public int getAppPlatform() {
        return appPlatform;
    }
}
