253 lines
6.0 KiB
Smali
253 lines
6.0 KiB
Smali
.class public Lcom/vk/api/video/VideoGetComments;
|
|
.super Lcom/vk/api/base/ApiRequest;
|
|
.source "VideoGetComments.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/vk/api/base/ApiRequest<",
|
|
"Lcom/vk/dto/common/data/VKList<",
|
|
"Lcom/vk/dto/video/LiveVideoComment;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(IIZIII)V
|
|
.locals 1
|
|
|
|
const-string v0, "video.getComments"
|
|
|
|
.line 1
|
|
invoke-direct {p0, v0}, Lcom/vk/api/base/ApiRequest;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v0, "owner_id"
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0, p2}, Lcom/vk/api/base/ApiRequest;->b(Ljava/lang/String;I)Lcom/vk/api/base/ApiRequest;
|
|
|
|
const-string p2, "video_id"
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p2, p1}, Lcom/vk/api/base/ApiRequest;->b(Ljava/lang/String;I)Lcom/vk/api/base/ApiRequest;
|
|
|
|
const-string p1, "need_likes"
|
|
|
|
.line 4
|
|
invoke-virtual {p0, p1, p3}, Lcom/vk/api/base/ApiRequest;->b(Ljava/lang/String;I)Lcom/vk/api/base/ApiRequest;
|
|
|
|
if-lez p4, :cond_0
|
|
|
|
const-string p1, "start_comment_id"
|
|
|
|
.line 5
|
|
invoke-virtual {p0, p1, p4}, Lcom/vk/api/base/ApiRequest;->b(Ljava/lang/String;I)Lcom/vk/api/base/ApiRequest;
|
|
|
|
:cond_0
|
|
const-string p1, "offset"
|
|
|
|
.line 6
|
|
invoke-virtual {p0, p1, p5}, Lcom/vk/api/base/ApiRequest;->b(Ljava/lang/String;I)Lcom/vk/api/base/ApiRequest;
|
|
|
|
const-string p1, "count"
|
|
|
|
.line 7
|
|
invoke-virtual {p0, p1, p6}, Lcom/vk/api/base/ApiRequest;->b(Ljava/lang/String;I)Lcom/vk/api/base/ApiRequest;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
const-string p2, "extended"
|
|
|
|
.line 8
|
|
invoke-virtual {p0, p2, p1}, Lcom/vk/api/base/ApiRequest;->b(Ljava/lang/String;I)Lcom/vk/api/base/ApiRequest;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lorg/json/JSONObject;)Lcom/vk/dto/common/data/VKList;
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lorg/json/JSONObject;",
|
|
")",
|
|
"Lcom/vk/dto/common/data/VKList<",
|
|
"Lcom/vk/dto/video/LiveVideoComment;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/json/JSONException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "response"
|
|
|
|
.line 2
|
|
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "items"
|
|
|
|
.line 3
|
|
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "profiles"
|
|
|
|
.line 4
|
|
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "groups"
|
|
|
|
.line 5
|
|
invoke-virtual {p1, v2}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
|
|
|
|
move-result-object v2
|
|
|
|
.line 6
|
|
new-instance v3, Lcom/vk/dto/common/data/VKList;
|
|
|
|
invoke-direct {v3}, Lcom/vk/dto/common/data/VKList;-><init>()V
|
|
|
|
const-string v4, "count"
|
|
|
|
.line 7
|
|
invoke-virtual {p1, v4}, Lorg/json/JSONObject;->getInt(Ljava/lang/String;)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {v3, p1}, Lcom/vk/dto/common/data/VKList;->a(I)V
|
|
|
|
.line 8
|
|
new-instance p1, Landroid/util/SparseArray;
|
|
|
|
invoke-direct {p1}, Landroid/util/SparseArray;-><init>()V
|
|
|
|
.line 9
|
|
new-instance v4, Landroid/util/SparseArray;
|
|
|
|
invoke-direct {v4}, Landroid/util/SparseArray;-><init>()V
|
|
|
|
const/4 v5, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
.line 10
|
|
:goto_0
|
|
invoke-virtual {v1}, Lorg/json/JSONArray;->length()I
|
|
|
|
move-result v7
|
|
|
|
if-ge v6, v7, :cond_0
|
|
|
|
.line 11
|
|
invoke-virtual {v1, v6}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {v7}, Lcom/vk/dto/newsfeed/Owner;->c(Lorg/json/JSONObject;)Lcom/vk/dto/newsfeed/Owner;
|
|
|
|
move-result-object v7
|
|
|
|
.line 12
|
|
invoke-virtual {v7}, Lcom/vk/dto/newsfeed/Owner;->getUid()I
|
|
|
|
move-result v8
|
|
|
|
invoke-virtual {p1, v8, v7}, Landroid/util/SparseArray;->append(ILjava/lang/Object;)V
|
|
|
|
add-int/lit8 v6, v6, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-eqz v2, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 13
|
|
:goto_1
|
|
invoke-virtual {v2}, Lorg/json/JSONArray;->length()I
|
|
|
|
move-result v6
|
|
|
|
if-ge v1, v6, :cond_1
|
|
|
|
.line 14
|
|
invoke-virtual {v2, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v6}, Lcom/vk/dto/newsfeed/Owner;->b(Lorg/json/JSONObject;)Lcom/vk/dto/newsfeed/Owner;
|
|
|
|
move-result-object v6
|
|
|
|
.line 15
|
|
invoke-virtual {v6}, Lcom/vk/dto/newsfeed/Owner;->getUid()I
|
|
|
|
move-result v7
|
|
|
|
invoke-virtual {p1, v7, v6}, Landroid/util/SparseArray;->append(ILjava/lang/Object;)V
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
.line 16
|
|
:cond_1
|
|
:goto_2
|
|
invoke-virtual {v0}, Lorg/json/JSONArray;->length()I
|
|
|
|
move-result v1
|
|
|
|
if-ge v5, v1, :cond_2
|
|
|
|
.line 17
|
|
new-instance v1, Lcom/vk/dto/video/LiveVideoComment;
|
|
|
|
invoke-virtual {v0, v5}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v1, v2, p1, v4}, Lcom/vk/dto/video/LiveVideoComment;-><init>(Lorg/json/JSONObject;Landroid/util/SparseArray;Landroid/util/SparseArray;)V
|
|
|
|
.line 18
|
|
invoke-virtual {v3, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
return-object v3
|
|
.end method
|
|
|
|
.method public bridge synthetic a(Lorg/json/JSONObject;)Ljava/lang/Object;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/Exception;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1}, Lcom/vk/api/video/VideoGetComments;->a(Lorg/json/JSONObject;)Lcom/vk/dto/common/data/VKList;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|