Skip to content

Commit 9ab1684

Browse files
committed
Merge remote-tracking branch 'origin/development'
2 parents 88097cc + eea5cd6 commit 9ab1684

File tree

6 files changed

+80
-6
lines changed

6 files changed

+80
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Add the following dependency to the dependencies section of your project's `pom.
1818
<dependency>
1919
<groupId>io.github.sornerol</groupId>
2020
<artifactId>chesscom-pubapi-wrapper</artifactId>
21-
<version>1.6.4</version>
21+
<version>1.7.0</version>
2222
</dependency>
2323
</dependencies
2424
```
@@ -27,7 +27,7 @@ Add the following dependency to the dependencies section of your project's `buil
2727
```
2828
dependencies {
2929
// other project dependencies...
30-
implementation 'io.github.sornerol:chesscom-pubapi-wrapper:1.6.4'
30+
implementation 'io.github.sornerol:chesscom-pubapi-wrapper:1.7.0'
3131
}
3232
```
3333

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.sornerol</groupId>
88
<artifactId>chesscom-pubapi-wrapper</artifactId>
9-
<version>1.6.4</version>
9+
<version>1.7.0</version>
1010
<packaging>jar</packaging>
1111

1212
<name>${project.groupId}:${project.artifactId}</name>
@@ -34,7 +34,7 @@
3434
<properties>
3535
<maven.compiler.source>1.8</maven.compiler.source>
3636
<maven.compiler.target>1.8</maven.compiler.target>
37-
<jackson.version>2.18.1</jackson.version>
37+
<jackson.version>2.18.2</jackson.version>
3838
</properties>
3939
<dependencyManagement>
4040
<dependencies>
@@ -51,7 +51,7 @@
5151
<dependency>
5252
<groupId>org.projectlombok</groupId>
5353
<artifactId>lombok</artifactId>
54-
<version>1.18.34</version>
54+
<version>1.18.36</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>com.fasterxml.jackson</groupId>
@@ -72,7 +72,7 @@
7272
<dependency>
7373
<groupId>commons-io</groupId>
7474
<artifactId>commons-io</artifactId>
75-
<version>2.17.0</version>
75+
<version>2.18.0</version>
7676
</dependency>
7777
<dependency>
7878
<groupId>org.slf4j</groupId>

src/main/java/io/github/sornerol/chess/pubapi/domain/club/Club.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ public class Club {
4545
@JsonProperty("country")
4646
private String countryApiUrl;
4747

48+
/**
49+
* The club's location. Note that this field appears to accept free-form
50+
* text, so the returned value may not actually represent any sort
51+
* of location.
52+
*/
53+
@JsonProperty("location")
54+
private String location;
55+
4856
/**
4957
* The average daily rating of club members
5058
*/

src/main/java/io/github/sornerol/chess/pubapi/domain/player/Player.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
import com.fasterxml.jackson.annotation.JsonProperty;
44
import io.github.sornerol.chess.pubapi.domain.player.enums.MembershipStatus;
55
import io.github.sornerol.chess.pubapi.domain.player.enums.Title;
6+
import io.github.sornerol.chess.pubapi.domain.streamers.StreamingPlatform;
67
import lombok.Getter;
78
import lombok.Setter;
89
import lombok.ToString;
910

11+
import java.util.List;
12+
1013
/**
1114
* Details about a player
1215
*/
@@ -121,4 +124,14 @@ public class Player {
121124
*/
122125
@JsonProperty("league")
123126
private String league;
127+
128+
129+
/**
130+
* If the player is a streamer, a list of streaming platforms associated with this player. Note that
131+
* only the platformType and channelUrl fields are set when retrieving details using the player API
132+
* endpoints. The Streamers API endpoint provides more details about streamers' streaming platforms.
133+
*/
134+
@JsonProperty("streaming_platforms")
135+
private List<StreamingPlatform> streamingPlatforms;
136+
124137
}

src/main/java/io/github/sornerol/chess/pubapi/domain/streamers/Streamer.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import lombok.Setter;
66
import lombok.ToString;
77

8+
import java.util.List;
9+
810
/**
911
* Contains information about a Chess.com streamer.
1012
*/
@@ -48,4 +50,10 @@ public class Streamer {
4850
*/
4951
@JsonProperty("is_community_streamer")
5052
private Boolean isCommunityStreamer;
53+
54+
/**
55+
* List of streaming platforms associated with this streamer
56+
*/
57+
@JsonProperty("platforms")
58+
private List<StreamingPlatform> streamingPlatforms;
5159
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package io.github.sornerol.chess.pubapi.domain.streamers;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import lombok.Getter;
5+
import lombok.Setter;
6+
import lombok.ToString;
7+
8+
/**
9+
* Contains details about a streaming platform a {@link io.github.sornerol.chess.pubapi.domain.player.Player}
10+
* or {@link Streamer} belongs to.
11+
*/
12+
@ToString
13+
@Getter
14+
@Setter
15+
public class StreamingPlatform {
16+
/**
17+
* The streaming platform name, such as Twitch or YouTube.
18+
*/
19+
@JsonProperty("type")
20+
private String platformType;
21+
22+
/**
23+
* If the streamer is currently live, this field is set to the URL for the streamer's live stream.
24+
*/
25+
@JsonProperty("stream_url")
26+
private String streamUrl;
27+
28+
/**
29+
* URL to the streamer's channel page on the streaming platform.
30+
*/
31+
@JsonProperty("channel_url")
32+
private String channelUrl;
33+
34+
/**
35+
* Is the streamer live on this streaming platform?
36+
*/
37+
@JsonProperty("is_live")
38+
private Boolean isLive;
39+
40+
/**
41+
* Is this platform the streamer's main live platform?
42+
*/
43+
@JsonProperty("is_main_live_platform")
44+
private Boolean isMainLivePlatform;
45+
}

0 commit comments

Comments
 (0)