Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit dd2376f

Browse files
author
Inkception
committed
Add MatchQuery.MatchQueryBuilder#tie to report ties
1 parent 709b0e4 commit dd2376f

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

core/src/main/java/at/stefangeyer/challonge/model/query/MatchQuery.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,22 @@
66
@Data
77
@Builder
88
public class MatchQuery {
9-
private Long winnerId;
9+
/**
10+
* winnerId can be either a long identifying the winner of the match or the string "tie" to declare the match as tied.
11+
**/
12+
private Object winnerId;
1013
private Integer votesForPlayer1;
1114
private Integer votesForPlayer2;
1215
private String scoresCsv;
16+
17+
public static class MatchQueryBuilder {
18+
public MatchQueryBuilder winnerId(final Long winnerId) {
19+
this.winnerId = winnerId;
20+
return this;
21+
}
22+
public MatchQueryBuilder tie() {
23+
this.winnerId = "tie";
24+
return this;
25+
}
26+
}
1327
}

0 commit comments

Comments
 (0)