From 4e495d1e56f4f5335ea0e9a3511a48e12d3dc4bd Mon Sep 17 00:00:00 2001 From: Philipp Heuer Date: Fri, 14 May 2021 23:58:42 +0200 Subject: [PATCH] fix(eventsub): remove lockedAt in predictionEnd / rename predictionLock locksAt to lockedAt --- .../twitch4j/eventsub/events/ChannelPredictionEndEvent.java | 5 ----- .../twitch4j/eventsub/events/ChannelPredictionLockEvent.java | 2 +- .../github/twitch4j/eventsub/events/EventSubEventTest.java | 4 +--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/eventsub-common/src/main/java/com/github/twitch4j/eventsub/events/ChannelPredictionEndEvent.java b/eventsub-common/src/main/java/com/github/twitch4j/eventsub/events/ChannelPredictionEndEvent.java index d1fbe5338..a53bb2e06 100644 --- a/eventsub-common/src/main/java/com/github/twitch4j/eventsub/events/ChannelPredictionEndEvent.java +++ b/eventsub-common/src/main/java/com/github/twitch4j/eventsub/events/ChannelPredictionEndEvent.java @@ -30,11 +30,6 @@ public class ChannelPredictionEndEvent extends ChannelPredictionEvent { */ private PredictionStatus status; - /** - * The time the Channel Points Prediction locked. - */ - private Instant lockedAt; - /** * The time the Channel Points Prediction ended. */ diff --git a/eventsub-common/src/main/java/com/github/twitch4j/eventsub/events/ChannelPredictionLockEvent.java b/eventsub-common/src/main/java/com/github/twitch4j/eventsub/events/ChannelPredictionLockEvent.java index 5964d6cf8..3ddb2cd75 100644 --- a/eventsub-common/src/main/java/com/github/twitch4j/eventsub/events/ChannelPredictionLockEvent.java +++ b/eventsub-common/src/main/java/com/github/twitch4j/eventsub/events/ChannelPredictionLockEvent.java @@ -19,6 +19,6 @@ public class ChannelPredictionLockEvent extends ChannelPredictionEvent { /** * The time the Channel Points Prediction will automatically lock. */ - private Instant locksAt; + private Instant lockedAt; } diff --git a/eventsub-common/src/test/java/com/github/twitch4j/eventsub/events/EventSubEventTest.java b/eventsub-common/src/test/java/com/github/twitch4j/eventsub/events/EventSubEventTest.java index 11e36ba97..1218fa137 100644 --- a/eventsub-common/src/test/java/com/github/twitch4j/eventsub/events/EventSubEventTest.java +++ b/eventsub-common/src/test/java/com/github/twitch4j/eventsub/events/EventSubEventTest.java @@ -196,8 +196,7 @@ public void deserializePredictionEndEvent() { "\"outcomes\":[{\"id\":\"12345\",\"title\":\"Yeah!\",\"color\":\"blue\",\"users\":2,\"channel_points\":15000,\"top_predictors\":[{\"user_name\":\"Cool_User\",\"user_login\":\"cool_user\",\"user_id\":1234,\"channel_points_won\":10000," + "\"channel_points_used\":500},{\"user_name\":\"Coolest_User\",\"user_login\":\"coolest_user\",\"user_id\":1236,\"channel_points_won\":5000,\"channel_points_used\":100}]},{\"id\":\"22435\",\"title\":\"No!\",\"users\":2," + "\"channel_points\":200,\"color\":\"pink\",\"top_predictors\":[{\"user_name\":\"Cooler_User\",\"user_login\":\"cooler_user\",\"user_id\":12345,\"channel_points_won\":null,\"channel_points_used\":100},{\"user_name\":\"Elite_User\"," + - "\"user_login\":\"elite_user\",\"user_id\":1337,\"channel_points_won\":null,\"channel_points_used\":100}]}],\"status\":\"resolved\",\"started_at\":\"2020-07-15T17:16:03.17106713Z\",\"locked_at\":\"2020-07-15T17:16:11.17106713Z\"," + - "\"ended_at\":\"2020-07-15T17:16:11.17106713Z\"}", + "\"user_login\":\"elite_user\",\"user_id\":1337,\"channel_points_won\":null,\"channel_points_used\":100}]}],\"status\":\"resolved\",\"started_at\":\"2020-07-15T17:16:03.17106713Z\",\"ended_at\":\"2020-07-15T17:16:11.17106713Z\"}", ChannelPredictionEndEvent.class ); @@ -212,7 +211,6 @@ public void deserializePredictionEndEvent() { assertNotNull(event.getOutcomes().get(0).getTopPredictors().get(0)); assertEquals(10000, event.getOutcomes().get(0).getTopPredictors().get(0).getChannelPointsWon()); assertEquals(PredictionStatus.RESOLVED, event.getStatus()); - assertEquals(Instant.parse("2020-07-15T17:16:11.17106713Z"), event.getLockedAt()); assertEquals(Instant.parse("2020-07-15T17:16:11.17106713Z"), event.getEndedAt()); }