酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319

以下内容为反编译后的 GetPrivateChannelMemberListProtocol.java 源代码,内容仅作参考


package com.kugou.android.app.home.channel.protocol;

import android.support.v4.app.NotificationCompat;
import c.t;
import com.huawei.hms.push.constant.RemoteMessageConst;
import com.kugou.android.app.home.channel.entity.d;
import com.kugou.android.app.home.channel.f.c;
import com.kugou.android.topic2.detail.base.CommonListResponse;
import com.kugou.common.network.w;
import com.kugou.common.utils.as;
import d.ab;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.i;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.json.JSONArray;
import org.json.JSONObject;
import rx.e;

@Metadata(bv = {1, 0, 3}, d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J@\u0010\u0003\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00060\u00050\u00042\u0006\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\n\b\u0002\u0010\r\u001a\u0004\u0018\u00010\u00062\b\b\u0002\u0010\u000e\u001a\u00020\u000fJ2\u0010\u0010\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00060\u00050\u00042\u0006\u0010\u0011\u001a\u00020\u00122\n\b\u0002\u0010\r\u001a\u0004\u0018\u00010\u00062\b\b\u0002\u0010\u000e\u001a\u00020\u000fH\u0002¨\u0006\u0013"}, d2 = {"Lcom/kugou/android/app/home/channel/protocol/GetPrivateChannelMemberListProtocol;", "", "()V", "getMembers", "Lrx/Observable;", "Lcom/kugou/android/topic2/detail/base/CommonListResponse;", "Lcom/kugou/android/app/home/channel/entity/ChannelMember;", RemoteMessageConst.Notification.CHANNEL_ID, "", "lastId", "", "pageSize", "", "owner", "insertOwner", "", "parseBody", "responseBody", "Lokhttp3/ResponseBody;", "androidkugou_release"}, k = 1, mv = {1, 1, 15})
public final class GetPrivateChannelMemberListProtocol {

    public static final GetPrivateChannelMemberListProtocol f11465a = new GetPrivateChannelMemberListProtocol();

    private GetPrivateChannelMemberListProtocol() {
    }

    @NotNull
    public static e a(GetPrivateChannelMemberListProtocol getPrivateChannelMemberListProtocol, String str, long j, int i, d dVar, boolean z, int i2, Object obj) {
        if ((i2 & 8) != 0) {
            dVar = (d) null;
        }
        return getPrivateChannelMemberListProtocol.a(str, j, i, dVar, (i2 & 16) != 0 ? false : z);
    }

    @NotNull
    public final e<CommonListResponse<d>> a(@NotNull String str, long j, int i, @Nullable d dVar, boolean z) {
        i.b(str, RemoteMessageConst.Notification.CHANNEL_ID);
        bi biVar = (bi) new t.a().b("GetTaskListProtocol").a(c.a.a.i.a()).a(w.a(com.kugou.android.app.a.a.Fn, "https://youth.kugou.com/v1/user/get_group_userlist")).a(c.b.a.a.a()).a().b().a(bi.class);
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        linkedHashMap.put("global_collection_id", str);
        linkedHashMap.put("pagesize", String.valueOf(i));
        linkedHashMap.put("last_id", String.valueOf(j));
        w.b(linkedHashMap, "");
        e c2 = biVar.b(linkedHashMap).c(new a(dVar, z));
        i.a((Object) c2, "viewInterface.get2(map)\n…sertOwner)\n            })");
        return c2;
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0018\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00030\u00020\u00012\u000e\u0010\u0004\u001a\n \u0006*\u0004\u0018\u00010\u00050\u0005H\n¢\u0006\u0002\b\u0007"}, d2 = {"<anonymous>", "Lrx/Observable;", "Lcom/kugou/android/topic2/detail/base/CommonListResponse;", "Lcom/kugou/android/app/home/channel/entity/ChannelMember;", "responseBody", "Lokhttp3/ResponseBody;", "kotlin.jvm.PlatformType", NotificationCompat.CATEGORY_CALL}, k = 3, mv = {1, 1, 15})
    public static final class a<T, R> implements rx.b.e<ab, e<CommonListResponse<d>>> {

        final d f11466a;

        final boolean f11467b;

        a(d dVar, boolean z) {
            this.f11466a = dVar;
            this.f11467b = z;
        }

        @Override
        @NotNull
        public final e<CommonListResponse<d>> call(ab abVar) {
            GetPrivateChannelMemberListProtocol getPrivateChannelMemberListProtocol = GetPrivateChannelMemberListProtocol.f11465a;
            i.a((Object) abVar, "responseBody");
            return getPrivateChannelMemberListProtocol.a(abVar, this.f11466a, this.f11467b);
        }
    }

    public final e<CommonListResponse<d>> a(ab abVar, d dVar, boolean z) {
        try {
            CommonListResponse commonListResponse = new CommonListResponse(0, null, 0, 0, null, 31, null);
            String f = abVar.f();
            as.f("lzq-young", f);
            JSONObject jSONObject = new JSONObject(f);
            commonListResponse.a(jSONObject.getInt("status"));
            commonListResponse.b(jSONObject.getInt("error_code"));
            commonListResponse.a(jSONObject.getString("error_msg"));
            JSONObject optJSONObject = jSONObject.optJSONObject("data");
            ArrayList arrayList = new ArrayList();
            if (optJSONObject != null) {
                JSONArray optJSONArray = optJSONObject.optJSONArray("list");
                if (optJSONArray != null) {
                    int length = optJSONArray.length();
                    for (int i = 0; i < length; i++) {
                        JSONObject jSONObject2 = optJSONArray.getJSONObject(i);
                        i.a((Object) jSONObject2, "getJSONObject(index)");
                        d dVar2 = new d();
                        dVar2.f11256b = jSONObject2.optString("nick_name");
                        dVar2.f11257c = jSONObject2.optString("user_pic");
                        dVar2.f11255a = jSONObject2.optLong("userid");
                        dVar2.f11258d = jSONObject2.optInt("gender");
                        arrayList.add(dVar2);
                    }
                }
                commonListResponse.e(optJSONObject.optInt("is_end", 1));
                commonListResponse.a(Long.valueOf(optJSONObject.optLong("last_id")));
                commonListResponse.g(optJSONObject.optInt("total"));
            }
            if (dVar != null && z) {
                arrayList.add(0, dVar);
            }
            commonListResponse.a((List) arrayList);
            e<CommonListResponse<d>> a2 = e.a(commonListResponse);
            i.a((Object) a2, "Observable.just(response)");
            return a2;
        } catch (Exception unused) {
            e<CommonListResponse<d>> a3 = e.a((Throwable) new c(null));
            i.a((Object) a3, "Observable.error<CommonL…nnelParseException(null))");
            return a3;
        }
    }
}