打牌网 v4.0.4版本的 MD5 值为:e257b9ecf68b0639529ede50d4c5ca4b
以下内容为反编译后的 LoginInfoRequest.java 源代码,内容仅作参考
package org.xianliao.im.sdk.net.model;
import android.text.TextUtils;
import android.util.Log;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
import org.xianliao.im.sdk.constants.SGConstants;
import org.xianliao.im.sdk.net.GetReq;
import org.xianliao.im.sdk.net.NetBaseResp;
public class LoginInfoRequest {
public static class Req extends GetReq {
public String appId;
private NetBaseResp resp;
public String scope;
public String state;
private String url = "https://ssgw.updrips.com/oauth2/checkAppInfo";
private Map<String, String> argsMap = new HashMap();
public Req(NetBaseResp resp) {
this.resp = resp;
}
@Override
public URL getUrl() {
try {
String query = handleRequestArgs();
String urlString = this.url;
if (!TextUtils.isEmpty(query)) {
urlString = urlString + "?" + query;
}
return new URL(urlString);
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
@Override
public NetBaseResp getResp() {
return this.resp;
}
@Override
public Map<String, String> getRequestArgs() {
if (!TextUtils.isEmpty(this.appId)) {
this.argsMap.put(SGConstants.THIRD_APPID, this.appId);
}
if (!TextUtils.isEmpty(this.scope)) {
this.argsMap.put("scope", this.scope);
}
if (!TextUtils.isEmpty(this.state)) {
this.argsMap.put("state", this.state);
}
return this.argsMap;
}
}
public static class Resp extends NetBaseResp {
static final String TAG = "LoginInfoRequest.Resp";
public Data data = new Data();
@Override
public void response(String result) {
Log.i(TAG, "result: " + result);
if (TextUtils.isEmpty(result)) {
this.code = -1;
return;
}
try {
JSONObject object = new JSONObject(result);
JSONObject dataObject = object.getJSONObject("data");
this.data.appName = dataObject.getString("appName");
this.data.appId = dataObject.getString(SGConstants.THIRD_APPID);
this.data.appIconUrl = dataObject.getString("appIconUrl");
} catch (JSONException e) {
e.printStackTrace();
}
}
public class Data {
public String appIconUrl;
public String appId;
public String appName;
public Data() {
}
}
}
}