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

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


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

import android.support.v4.app.NotificationCompat;
import android.text.TextUtils;
import c.t;
import com.kugou.android.app.home.channel.entity.CommonResponse;
import com.kugou.android.app.home.channel.entity.d;
import com.kugou.android.app.home.channel.f.c;
import com.kugou.common.network.w;
import com.kugou.common.utils.as;
import d.ab;
import d.u;
import d.z;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.i;
import org.jetbrains.annotations.NotNull;
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\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J&\u0010\u0003\u001a\u00020\u00042\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00010\u00062\u0006\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\nH\u0002J\u001c\u0010\u000b\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00010\u00060\f2\u0006\u0010\r\u001a\u00020\u000eH\u0002J(\u0010\u000f\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00010\u00060\f2\u0006\u0010\u0010\u001a\u00020\n2\f\u0010\u0011\u001a\b\u0012\u0004\u0012\u00020\u00130\u0012¨\u0006\u0014"}, d2 = {"Lcom/kugou/android/app/home/channel/protocol/RemoveChannelMemberProtocol;", "", "()V", "fillErrorMsg", "", "response", "Lcom/kugou/android/app/home/channel/entity/CommonResponse;", "errorCode", "", "errorMsg", "", "parseBody", "Lrx/Observable;", "responseBody", "Lokhttp3/ResponseBody;", "remove", "channeld", "users", "", "Lcom/kugou/android/app/home/channel/entity/ChannelMember;", "androidkugou_release"}, k = 1, mv = {1, 1, 15})
public final class RemoveChannelMemberProtocol {

    public static final RemoveChannelMemberProtocol f11479a = new RemoveChannelMemberProtocol();

    private RemoveChannelMemberProtocol() {
    }

    @NotNull
    public final e<CommonResponse<Object>> a(@NotNull String str, @NotNull List<? extends d> list) {
        i.b(str, "channeld");
        i.b(list, "users");
        bi biVar = (bi) new t.a().b("RemoveChannelMemberProtocol").a(c.a.a.i.a()).a(w.a(com.kugou.android.app.a.a.Fo, "https://youth.kugou.com/v1/user/remove_group_user")).a(c.b.a.a.a()).a().b().a(bi.class);
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        JSONObject jSONObject = new JSONObject();
        jSONObject.put("global_collection_id", str);
        JSONArray jSONArray = new JSONArray();
        Iterator<T> it = list.iterator();
        while (it.hasNext()) {
            jSONArray.put(((d) it.next()).f11255a);
        }
        jSONObject.put("member_id", jSONArray);
        String jSONObject2 = jSONObject.toString();
        i.a((Object) jSONObject2, "body.toString()");
        w.b(linkedHashMap, jSONObject2);
        e c2 = biVar.c(linkedHashMap, z.a(u.a("application/json"), jSONObject2)).c(a.f11480a);
        i.a((Object) c2, "viewInterface.post2(map,…(responseBody)\n        })");
        return c2;
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0018\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\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/app/home/channel/entity/CommonResponse;", "", "responseBody", "Lokhttp3/ResponseBody;", "kotlin.jvm.PlatformType", NotificationCompat.CATEGORY_CALL}, k = 3, mv = {1, 1, 15})
    static final class a<T, R> implements rx.b.e<ab, e<CommonResponse<Object>>> {

        public static final a f11480a = new a();

        a() {
        }

        @Override
        @NotNull
        public final e<CommonResponse<Object>> call(ab abVar) {
            RemoveChannelMemberProtocol removeChannelMemberProtocol = RemoveChannelMemberProtocol.f11479a;
            i.a((Object) abVar, "responseBody");
            return removeChannelMemberProtocol.a(abVar);
        }
    }

    public final e<CommonResponse<Object>> a(ab abVar) {
        try {
            CommonResponse<Object> commonResponse = new CommonResponse<>(0, 0, null, false, null, 31, null);
            String f = abVar.f();
            as.f("lzq-young", f);
            JSONObject jSONObject = new JSONObject(f);
            commonResponse.a(jSONObject.getInt("status"));
            commonResponse.b(jSONObject.getInt("error_code"));
            String string = jSONObject.getString("error_msg");
            i.a((Object) string, "jsonObject.getString(\"error_msg\")");
            commonResponse.a(string);
            a(commonResponse, commonResponse.getError(), commonResponse.getErrorMsg());
            e<CommonResponse<Object>> a2 = e.a(commonResponse);
            i.a((Object) a2, "Observable.just(response)");
            return a2;
        } catch (Exception unused) {
            e<CommonResponse<Object>> a3 = e.a((Throwable) new c(null));
            i.a((Object) a3, "Observable.error<CommonR…nnelParseException(null))");
            return a3;
        }
    }

    private final void a(CommonResponse<Object> commonResponse, int i, String str) {
        if (TextUtils.isEmpty(str)) {
            commonResponse.a(i != 22003 ? i != 130002 ? i != 180000 ? i != 180030 ? "操作失败" : "该用户不在创作组里" : "该频道类型不是个人频道" : "不是频道主" : "邀请语含敏感词");
        }
    }
}