酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319
以下内容为反编译后的 cb.java 源代码,内容仅作参考
package com.kugou.android.app.home.channel.protocol;
import android.text.TextUtils;
import c.a.a.i;
import c.c.f;
import c.c.u;
import c.t;
import com.google.gson.Gson;
import com.kugou.android.app.home.channel.entity.chatroom.StudyRoomInfo;
import com.kugou.android.app.home.channel.entity.h;
import com.kugou.android.app.home.channel.f.c;
import com.kugou.common.network.w;
import d.ab;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
import rx.e;
public class cb {
public interface a {
@f
e<ab> a(@u Map<String, String> map);
}
public static e<h<StudyRoomInfo>> a(String str) {
if (com.kugou.common.environment.a.Z() || TextUtils.isEmpty(str)) {
return e.a((Throwable) new IllegalArgumentException("illegal room id or not login."));
}
a aVar = (a) new t.a().b("ChannelTodayFeatured").a(i.a()).a(w.a(com.kugou.android.app.a.a.ey, "https://youth.kugou.com/v1/room/get_room_detail")).a(c.b.a.a.a()).a().b().a(a.class);
HashMap hashMap = new HashMap(12);
hashMap.put("room_id", str);
w.b(hashMap, "");
return aVar.a(hashMap).c(new rx.b.e<ab, e<h<StudyRoomInfo>>>() {
@Override
public e<h<StudyRoomInfo>> call(ab abVar) {
try {
h hVar = new h();
try {
JSONObject jSONObject = new JSONObject(abVar.f());
hVar.a(jSONObject.optInt("status"));
hVar.b(jSONObject.optInt("error_code"));
JSONObject optJSONObject = jSONObject.optJSONObject("data");
if (hVar.c() == 1 && optJSONObject != null) {
hVar.a((h) new Gson().fromJson(optJSONObject.toString(), StudyRoomInfo.class));
}
} catch (JSONException e2) {
e2.printStackTrace();
}
return e.a(hVar);
} catch (IOException e3) {
e3.printStackTrace();
return e.a((Throwable) new c("解析异常"));
}
}
});
}
}