Skip to content

Commit 07a94f0

Browse files
committed
Add more fields when sending spade infos
1 parent 0137c65 commit 07a94f0

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

miner/src/main/java/fr/rakambda/channelpointsminer/miner/api/twitch/data/MinuteWatchedProperties.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,17 @@ public class MinuteWatchedProperties{
3232
private String gameId;
3333
@JsonProperty("live")
3434
private boolean live;
35+
@JsonProperty("hidden")
36+
private boolean hidden;
3537
@JsonProperty("player")
3638
@NonNull
3739
private String player;
3840
@JsonProperty("user_id")
3941
private int userId;
42+
@JsonProperty("location")
43+
private String location;
44+
@JsonProperty("logged_in")
45+
private boolean loggedIn;
46+
@JsonProperty("muted")
47+
private boolean muted;
4048
}

miner/src/main/java/fr/rakambda/channelpointsminer/miner/runnable/SendSpadeMinutesWatched.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ protected boolean send(@NonNull Streamer streamer){
4444
.gameId(streamer.getGame().map(Game::getId).orElse(null))
4545
.game(streamer.getGame().map(Game::getName).orElse(null))
4646
.live(true)
47+
.hidden(false)
48+
.loggedIn(true)
49+
.muted(false)
50+
.location("channel")
4751
.build())
4852
.build();
4953

miner/src/test/java/fr/rakambda/channelpointsminer/miner/runnable/SendSpadeMinutesWatchedTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ void sendingMinutesWatched(){
9292
.gameId(GAME_ID)
9393
.game(GAME_NAME)
9494
.live(true)
95+
.hidden(false)
96+
.loggedIn(true)
97+
.muted(false)
98+
.location("channel")
9599
.build())
96100
.build();
97101

@@ -114,6 +118,10 @@ void sendingMinutesWatchedNoGameName(){
114118
.player(SITE_PLAYER)
115119
.userId(USER_ID)
116120
.live(true)
121+
.hidden(false)
122+
.loggedIn(true)
123+
.muted(false)
124+
.location("channel")
117125
.build())
118126
.build();
119127

@@ -132,6 +140,10 @@ void sendingMinutesWatchedNoGame(){
132140
.player(SITE_PLAYER)
133141
.userId(USER_ID)
134142
.live(true)
143+
.hidden(false)
144+
.loggedIn(true)
145+
.muted(false)
146+
.location("channel")
135147
.build())
136148
.build();
137149

0 commit comments

Comments
 (0)