From 5a69402b652ab97cbbfdca96bb6a25e7eebb6560 Mon Sep 17 00:00:00 2001 From: darmiel <71837281+darmiel@users.noreply.github.com> Date: Wed, 25 Nov 2020 00:21:58 +0100 Subject: [PATCH] Updated JSON Keys --- .../wrappers/AnimationMessageTypeWrapper.java | 6 +++--- .../message/wrappers/AudioMessageTypeWrapper.java | 4 ++-- .../message/wrappers/ContactMessageTypeWrapper.java | 8 ++++---- .../message/wrappers/DocumentMessageTypeWrapper.java | 4 ++-- .../core/message/wrappers/GlobalJsonWrappers.java | 4 ++-- .../message/wrappers/PollMessageTypeWrapper.java | 12 ++++++------ .../message/wrappers/StickerMessageTypeWrapper.java | 2 +- .../message/wrappers/VideoMessageTypeWrapper.java | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/AnimationMessageTypeWrapper.java b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/AnimationMessageTypeWrapper.java index 53fa049..ff36f3f 100644 --- a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/AnimationMessageTypeWrapper.java +++ b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/AnimationMessageTypeWrapper.java @@ -37,9 +37,9 @@ public void execute(final MessageAnimation content, animationObject.addProperty("duration", animation.duration); animationObject.addProperty("width", animation.width); animationObject.addProperty("height", animation.height); - animationObject.addProperty("filename", animation.fileName); - animationObject.addProperty("mime", animation.mimeType); - animationObject.addProperty("stickers", animation.hasStickers); + animationObject.addProperty("fileName", animation.fileName); + animationObject.addProperty("mimeType", animation.mimeType); + animationObject.addProperty("hasStickers", animation.hasStickers); extra.add("animation", animationObject); } diff --git a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/AudioMessageTypeWrapper.java b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/AudioMessageTypeWrapper.java index 347fe80..bf013e4 100644 --- a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/AudioMessageTypeWrapper.java +++ b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/AudioMessageTypeWrapper.java @@ -33,8 +33,8 @@ public void execute(final MessageAudio content, final JsonObject audioObject = new JsonObject(); audioObject.addProperty("duration", audio.duration); audioObject.addProperty("title", audio.title); - audioObject.addProperty("filename", audio.fileName); - audioObject.addProperty("mime", audio.mimeType); + audioObject.addProperty("fileName", audio.fileName); + audioObject.addProperty("mimeType", audio.mimeType); extra.add("audio", audioObject); diff --git a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/ContactMessageTypeWrapper.java b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/ContactMessageTypeWrapper.java index e5cf151..89550c2 100644 --- a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/ContactMessageTypeWrapper.java +++ b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/ContactMessageTypeWrapper.java @@ -32,11 +32,11 @@ public void execute(final MessageContact content, final Contact contact = content.contact; final JsonObject object = new JsonObject(); - object.addProperty("phonenr", contact.phoneNumber); - object.addProperty("firstname", contact.firstName); - object.addProperty("lastname", contact.lastName); + object.addProperty("phoneNumber", contact.phoneNumber); + object.addProperty("firstName", contact.firstName); + object.addProperty("lastName", contact.lastName); object.addProperty("vcard", contact.vcard); - object.addProperty("userid", contact.userId); + object.addProperty("userId", contact.userId); extra.add("contact", object); } diff --git a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/DocumentMessageTypeWrapper.java b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/DocumentMessageTypeWrapper.java index 4516cb3..8722959 100644 --- a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/DocumentMessageTypeWrapper.java +++ b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/DocumentMessageTypeWrapper.java @@ -33,8 +33,8 @@ public void execute(final MessageDocument content, // extra final Document document = content.document; final JsonObject object = new JsonObject(); - object.addProperty("filename", document.fileName); - object.addProperty("mime", document.mimeType); + object.addProperty("fileName", document.fileName); + object.addProperty("mimeType", document.mimeType); extra.add("document", object); diff --git a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/GlobalJsonWrappers.java b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/GlobalJsonWrappers.java index 2b458b2..02c3097 100644 --- a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/GlobalJsonWrappers.java +++ b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/GlobalJsonWrappers.java @@ -8,9 +8,9 @@ public class GlobalJsonWrappers { public static JsonObject wrapLocation(final TdApi.Location location, final Integer expiresIn) { final JsonObject object = new JsonObject(); object.addProperty("latitude", location.latitude); - object.addProperty("longitude", location.longitude); + object.addProperty("latitude", location.longitude); if (expiresIn != null) { - object.addProperty("expires", expiresIn); + object.addProperty("expiresIn", expiresIn); } return object; } diff --git a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/PollMessageTypeWrapper.java b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/PollMessageTypeWrapper.java index 04546b4..18d2795 100644 --- a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/PollMessageTypeWrapper.java +++ b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/PollMessageTypeWrapper.java @@ -37,17 +37,17 @@ public void execute(final MessagePoll content, for (final PollOption option : poll.options) { final JsonObject object = new JsonObject(); object.addProperty("text", option.text); - object.addProperty("votes", option.voterCount); + object.addProperty("voterCount", option.voterCount); array.add(object); } final JsonObject object = new JsonObject(); object.addProperty("id", poll.id); - object.addProperty("totalvotes", poll.totalVoterCount); - object.addProperty("anonymous", poll.isAnonymous); - object.addProperty("closed", poll.isClosed); - object.addProperty("closedate", poll.closeDate); - object.addProperty("period", poll.openPeriod); + object.addProperty("totalVoterCount", poll.totalVoterCount); + object.addProperty("isAnonymous", poll.isAnonymous); + object.addProperty("isClosed", poll.isClosed); + object.addProperty("closeDate", poll.closeDate); + object.addProperty("openPeriod", poll.openPeriod); object.addProperty("type", poll.type.getConstructor() == PollTypeRegular.CONSTRUCTOR ? "REGULAR" : "QUIZ"); diff --git a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/StickerMessageTypeWrapper.java b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/StickerMessageTypeWrapper.java index 8ac88fa..d7105d9 100644 --- a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/StickerMessageTypeWrapper.java +++ b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/StickerMessageTypeWrapper.java @@ -36,7 +36,7 @@ public void execute(final MessageSticker content, object.addProperty("setId", sticker.setId); object.addProperty("width", sticker.width); object.addProperty("height", sticker.height); - object.addProperty("animated", sticker.isAnimated); + object.addProperty("isAnimated", sticker.isAnimated); extra.add("sticker", object); diff --git a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/VideoMessageTypeWrapper.java b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/VideoMessageTypeWrapper.java index 0658107..986d640 100644 --- a/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/VideoMessageTypeWrapper.java +++ b/apps/message-crawler/telegram-crawler-core/src/main/java/io/d2a/schwurbelwatch/tgcrawler/core/message/wrappers/VideoMessageTypeWrapper.java @@ -39,8 +39,8 @@ public void execute(final MessageVideo content, videoObject.addProperty("duration", video.duration); videoObject.addProperty("width", video.width); videoObject.addProperty("height", video.height); - videoObject.addProperty("filename", video.fileName); - videoObject.addProperty("mime", video.mimeType); + videoObject.addProperty("fileName", video.fileName); + videoObject.addProperty("mimeType", video.mimeType); extra.add("video", videoObject); }