Skip to content

Commit e214ddf

Browse files
Update StreamingEventType.java [topic_post] (#194)
* Update StreamingEventType.java Added topic_post. event_type (string) — тип события. Возможные значения: post comment share **topic_post** * Update StreamingEventId.java Added topicOwnerId, topicId, topicPostId fields.
1 parent f4e7435 commit e214ddf

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

sdk/src/main/java/com/vk/api/sdk/streaming/objects/StreamingEventId.java

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ public class StreamingEventId {
2424
@SerializedName("shared_post_id")
2525
private Integer sharedPostId;
2626

27+
@SerializedName("topic_owner_id")
28+
private Integer topicOwnerId;
29+
30+
@SerializedName("topic_id")
31+
private Integer topicId;
32+
33+
@SerializedName("topic_post_id")
34+
private Integer topicPostId;
35+
36+
2737
public Integer getPostOwnerId() {
2838
return postOwnerId;
2939
}
@@ -44,6 +54,19 @@ public Integer getSharedPostId() {
4454
return sharedPostId;
4555
}
4656

57+
public Integer getTopicOwnerId() {
58+
return topicOwnerId;
59+
}
60+
61+
public Integer getTopicId() {
62+
return topicId;
63+
}
64+
65+
public Integer getTopicPostId() {
66+
return topicPostId;
67+
}
68+
69+
4770
@Override
4871
public boolean equals(Object o) {
4972
if (this == o) return true;
@@ -53,12 +76,15 @@ public boolean equals(Object o) {
5376
Objects.equals(postId, that.postId) &&
5477
Objects.equals(commentId, that.commentId) &&
5578
Objects.equals(sharedPostOwnerId, that.sharedPostOwnerId) &&
56-
Objects.equals(sharedPostId, that.sharedPostId);
79+
Objects.equals(sharedPostId, that.sharedPostId) &&
80+
Objects.equals(topicOwnerId, that.topicOwnerId) &&
81+
Objects.equals(topicId, that.topicId) &&
82+
Objects.equals(topicPostId, that.topicPostId);
5783
}
5884

5985
@Override
6086
public int hashCode() {
61-
return Objects.hash(postOwnerId, postId, commentId, sharedPostOwnerId, sharedPostId);
87+
return Objects.hash(postOwnerId, postId, commentId, sharedPostOwnerId, sharedPostId, topicOwnerId, topicId, topicPostId);
6288
}
6389

6490
@Override
@@ -69,6 +95,9 @@ public String toString() {
6995
sb.append(", commentId=").append(commentId);
7096
sb.append(", sharedPostOwnerId=").append(sharedPostOwnerId);
7197
sb.append(", sharedPostId=").append(sharedPostId);
98+
sb.append(", topicOwnerId=").append(topicOwnerId);
99+
sb.append(", topicId=").append(topicId);
100+
sb.append(", topicPostId=").append(topicPostId);
72101
sb.append('}');
73102
return sb.toString();
74103
}

sdk/src/main/java/com/vk/api/sdk/streaming/objects/StreamingEventType.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ public enum StreamingEventType {
1414
COMMENT("comment"),
1515

1616
@SerializedName("share")
17-
SHARE("share");
17+
SHARE("share"),
18+
19+
@SerializedName("topic_post")
20+
TOPIC_POST("topic_post");
1821

1922
private final String value;
2023

0 commit comments

Comments
 (0)