diff --git a/src/main/java/com/mixer/api/resource/chat/AbstractChatEvent.java b/src/main/java/com/mixer/api/resource/chat/AbstractChatEvent.java index 0a9df78..7393c93 100644 --- a/src/main/java/com/mixer/api/resource/chat/AbstractChatEvent.java +++ b/src/main/java/com/mixer/api/resource/chat/AbstractChatEvent.java @@ -21,6 +21,8 @@ public static enum EventType { @SerializedName("Stats") STATS (StatusEvent.class), @SerializedName("UserJoin") USER_JOIN (UserJoinEvent.class), @SerializedName("UserLeave") USER_LEAVE (UserLeaveEvent.class); + @SerializedName("UserUpdate") USER_UPDATE (UserUpdateEvent.class), + @SerializedName("PurgeMessage") PURGE_MESSAGE (PurgeMessageEvent.class); private final Class correspondingClass; diff --git a/src/main/java/com/mixer/api/resource/chat/events/DeleteMessageEvent.java b/src/main/java/com/mixer/api/resource/chat/events/DeleteMessageEvent.java index 18f443b..f40f477 100644 --- a/src/main/java/com/mixer/api/resource/chat/events/DeleteMessageEvent.java +++ b/src/main/java/com/mixer/api/resource/chat/events/DeleteMessageEvent.java @@ -5,6 +5,6 @@ public class DeleteMessageEvent extends AbstractChatEvent { public DeleteMessageEvent() { - this.type = Type.EVENT; + this.event = EventType.DELETE_MESSAGE; } } diff --git a/src/main/java/com/mixer/api/resource/chat/events/PurgeMessageEvent.java b/src/main/java/com/mixer/api/resource/chat/events/PurgeMessageEvent.java new file mode 100644 index 0000000..68bc1a0 --- /dev/null +++ b/src/main/java/com/mixer/api/resource/chat/events/PurgeMessageEvent.java @@ -0,0 +1,10 @@ +package com.mixer.api.resource.chat.events; + +import com.mixer.api.resource.chat.AbstractChatEvent; +import com.mixer.api.resource.chat.events.data.PurgeMessageData; + +public class PurgeMessageEvent extends AbstractChatEvent { + public PurgeMessageEvent() { + this.event = EventType.PURGE_MESSAGE; + } +} diff --git a/src/main/java/com/mixer/api/resource/chat/events/UserUpdateEvent.java b/src/main/java/com/mixer/api/resource/chat/events/UserUpdateEvent.java new file mode 100644 index 0000000..4666523 --- /dev/null +++ b/src/main/java/com/mixer/api/resource/chat/events/UserUpdateEvent.java @@ -0,0 +1,10 @@ +package com.mixer.api.resource.chat.events; + +import com.mixer.api.resource.chat.AbstractChatEvent; +import com.mixer.api.resource.chat.events.data.UserUpdateData; + +public class UserUpdateEvent extends AbstractChatEvent { + public UserUpdateEvent() { + this.event = EventType.USER_UPDATE; + } +} diff --git a/src/main/java/com/mixer/api/resource/chat/events/data/DeleteMessageData.java b/src/main/java/com/mixer/api/resource/chat/events/data/DeleteMessageData.java index 135f424..970d8a9 100644 --- a/src/main/java/com/mixer/api/resource/chat/events/data/DeleteMessageData.java +++ b/src/main/java/com/mixer/api/resource/chat/events/data/DeleteMessageData.java @@ -1,9 +1,15 @@ package com.mixer.api.resource.chat.events.data; +import com.mixer.api.resource.MixerUser; import com.mixer.api.resource.chat.AbstractChatEvent; +import java.util.List; import java.util.UUID; public class DeleteMessageData extends AbstractChatEvent.EventData { public UUID id; + public String user_name; + public int user_id; + public List user_roles; + public int user_level; } diff --git a/src/main/java/com/mixer/api/resource/chat/events/data/PurgeMessageData.java b/src/main/java/com/mixer/api/resource/chat/events/data/PurgeMessageData.java new file mode 100644 index 0000000..a5866c6 --- /dev/null +++ b/src/main/java/com/mixer/api/resource/chat/events/data/PurgeMessageData.java @@ -0,0 +1,15 @@ +package com.mixer.api.resource.chat.events.data; + +import com.google.gson.annotations.SerializedName; +import com.mixer.api.resource.MixerUser; +import com.mixer.api.resource.chat.AbstractChatEvent; + +import java.util.List; + +public class PurgeMessageData extends AbstractChatEvent.EventData { + public String user_name; + public int user_id; + public List user_roles; + public int user_level; + @SerializedName("user_id")public int message_owner_id; +} diff --git a/src/main/java/com/mixer/api/resource/chat/events/data/UserUpdateData.java b/src/main/java/com/mixer/api/resource/chat/events/data/UserUpdateData.java new file mode 100644 index 0000000..1006937 --- /dev/null +++ b/src/main/java/com/mixer/api/resource/chat/events/data/UserUpdateData.java @@ -0,0 +1,11 @@ +package com.mixer.api.resource.chat.events.data; + +import com.mixer.api.resource.MixerUser; +import com.mixer.api.resource.chat.AbstractChatEvent; + +import java.util.List; + +public class UserUpdateData extends AbstractChatEvent.EventData { + public List roles; + public int user; +}