Skip to content

Commit 214143f

Browse files
Automatically update Java SDK
1 parent f4f2b62 commit 214143f

78 files changed

Lines changed: 13189 additions & 251 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎pom.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- General project information -->
99
<groupId>so.trophy</groupId>
1010
<artifactId>trophy-java</artifactId>
11-
<version>1.27.0</version>
11+
<version>1.28.0</version>
1212
<packaging>jar</packaging>
1313
<name>Trophy</name>
1414
<description>Java client library for the Trophy API</description>
@@ -80,7 +80,7 @@
8080
<dependency>
8181
<groupId>com.fasterxml.jackson.module</groupId>
8282
<artifactId>jackson-module-parameter-names</artifactId>
83-
<version>2.18.8</version>
83+
<version>2.18.11</version>
8484
</dependency>
8585

8686
<!-- Java 8 Date/time -->

‎src/main/java/so/trophy/AsyncTrophyApiClient.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import so.trophy.resources.leaderboards.AsyncLeaderboardsClient;
1313
import so.trophy.resources.metrics.AsyncMetricsClient;
1414
import so.trophy.resources.points.AsyncPointsClient;
15+
import so.trophy.resources.rewards.AsyncRewardsClient;
1516
import so.trophy.resources.streaks.AsyncStreaksClient;
1617
import so.trophy.resources.users.AsyncUsersClient;
1718

@@ -20,6 +21,8 @@ public class AsyncTrophyApiClient {
2021

2122
protected final Supplier<AsyncAchievementsClient> achievementsClient;
2223

24+
protected final Supplier<AsyncRewardsClient> rewardsClient;
25+
2326
protected final Supplier<AsyncMetricsClient> metricsClient;
2427

2528
protected final Supplier<AsyncUsersClient> usersClient;
@@ -35,6 +38,7 @@ public class AsyncTrophyApiClient {
3538
public AsyncTrophyApiClient(ClientOptions clientOptions) {
3639
this.clientOptions = clientOptions;
3740
this.achievementsClient = Suppliers.memoize(() -> new AsyncAchievementsClient(clientOptions));
41+
this.rewardsClient = Suppliers.memoize(() -> new AsyncRewardsClient(clientOptions));
3842
this.metricsClient = Suppliers.memoize(() -> new AsyncMetricsClient(clientOptions));
3943
this.usersClient = Suppliers.memoize(() -> new AsyncUsersClient(clientOptions));
4044
this.streaksClient = Suppliers.memoize(() -> new AsyncStreaksClient(clientOptions));
@@ -47,6 +51,10 @@ public AsyncAchievementsClient achievements() {
4751
return this.achievementsClient.get();
4852
}
4953

54+
public AsyncRewardsClient rewards() {
55+
return this.rewardsClient.get();
56+
}
57+
5058
public AsyncMetricsClient metrics() {
5159
return this.metricsClient.get();
5260
}

‎src/main/java/so/trophy/TrophyApiClient.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import so.trophy.resources.leaderboards.LeaderboardsClient;
1313
import so.trophy.resources.metrics.MetricsClient;
1414
import so.trophy.resources.points.PointsClient;
15+
import so.trophy.resources.rewards.RewardsClient;
1516
import so.trophy.resources.streaks.StreaksClient;
1617
import so.trophy.resources.users.UsersClient;
1718

@@ -20,6 +21,8 @@ public class TrophyApiClient {
2021

2122
protected final Supplier<AchievementsClient> achievementsClient;
2223

24+
protected final Supplier<RewardsClient> rewardsClient;
25+
2326
protected final Supplier<MetricsClient> metricsClient;
2427

2528
protected final Supplier<UsersClient> usersClient;
@@ -35,6 +38,7 @@ public class TrophyApiClient {
3538
public TrophyApiClient(ClientOptions clientOptions) {
3639
this.clientOptions = clientOptions;
3740
this.achievementsClient = Suppliers.memoize(() -> new AchievementsClient(clientOptions));
41+
this.rewardsClient = Suppliers.memoize(() -> new RewardsClient(clientOptions));
3842
this.metricsClient = Suppliers.memoize(() -> new MetricsClient(clientOptions));
3943
this.usersClient = Suppliers.memoize(() -> new UsersClient(clientOptions));
4044
this.streaksClient = Suppliers.memoize(() -> new StreaksClient(clientOptions));
@@ -47,6 +51,10 @@ public AchievementsClient achievements() {
4751
return this.achievementsClient.get();
4852
}
4953

54+
public RewardsClient rewards() {
55+
return this.rewardsClient.get();
56+
}
57+
5058
public MetricsClient metrics() {
5159
return this.metricsClient.get();
5260
}

‎src/main/java/so/trophy/core/ClientOptions.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ private ClientOptions(Environment environment, Map<String, String> headers,
3535
this.environment = environment;
3636
this.headers = new HashMap<>();
3737
this.headers.putAll(headers);
38-
this.headers.putAll(new HashMap<String,String>() {{put("X-Fern-Language", "JAVA");put("X-Fern-SDK-Name", "com.trophy.fern:api-sdk");put("X-Fern-SDK-Version", "0.0.8616");}});
38+
this.headers.putAll(new HashMap<String,String>() {{put("X-Fern-Language", "JAVA");put("X-Fern-SDK-Name", "com.trophy.fern:api-sdk");put("X-Fern-SDK-Version", "0.0.9322");}});
3939
this.headerSuppliers = headerSuppliers;
4040
this.httpClient = httpClient;
4141
this.timeout = timeout;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package so.trophy.errors;
2+
3+
/**
4+
* This file was auto-generated by Fern from our API Definition.
5+
*/
6+
7+
8+
import so.trophy.core.TrophyApiApiException;
9+
import okhttp3.Response;
10+
import so.trophy.types.ErrorBody;
11+
12+
public final class ConflictError extends TrophyApiApiException {
13+
/**
14+
* The body of the response that triggered the exception.
15+
*/
16+
private final ErrorBody body;
17+
18+
public ConflictError(ErrorBody body) {
19+
super("ConflictError", 409, body);
20+
this.body = body;
21+
}
22+
23+
public ConflictError(ErrorBody body, Response rawResponse) {
24+
super("ConflictError", 409, body, rawResponse);
25+
this.body = body;
26+
}
27+
28+
/**
29+
* @return the body
30+
*/
31+
@java.lang.Override
32+
public ErrorBody body() {
33+
return this.body;
34+
}
35+
}

‎src/main/java/so/trophy/resources/admin/AdminClient.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import so.trophy.resources.admin.leaderboards.LeaderboardsClient;
1616
import so.trophy.resources.admin.metrics.MetricsClient;
1717
import so.trophy.resources.admin.points.PointsClient;
18+
import so.trophy.resources.admin.rewards.RewardsClient;
1819
import so.trophy.resources.admin.settings.SettingsClient;
1920
import so.trophy.resources.admin.streaks.StreaksClient;
2021
import so.trophy.resources.admin.tenants.TenantsClient;
@@ -26,6 +27,8 @@ public class AdminClient {
2627

2728
protected final Supplier<AchievementsClient> achievementsClient;
2829

30+
protected final Supplier<RewardsClient> rewardsClient;
31+
2932
protected final Supplier<MetricsClient> metricsClient;
3033

3134
protected final Supplier<LeaderboardsClient> leaderboardsClient;
@@ -46,6 +49,7 @@ public AdminClient(ClientOptions clientOptions) {
4649
this.clientOptions = clientOptions;
4750
this.attributesClient = Suppliers.memoize(() -> new AttributesClient(clientOptions));
4851
this.achievementsClient = Suppliers.memoize(() -> new AchievementsClient(clientOptions));
52+
this.rewardsClient = Suppliers.memoize(() -> new RewardsClient(clientOptions));
4953
this.metricsClient = Suppliers.memoize(() -> new MetricsClient(clientOptions));
5054
this.leaderboardsClient = Suppliers.memoize(() -> new LeaderboardsClient(clientOptions));
5155
this.streaksClient = Suppliers.memoize(() -> new StreaksClient(clientOptions));
@@ -64,6 +68,10 @@ public AchievementsClient achievements() {
6468
return this.achievementsClient.get();
6569
}
6670

71+
public RewardsClient rewards() {
72+
return this.rewardsClient.get();
73+
}
74+
6775
public MetricsClient metrics() {
6876
return this.metricsClient.get();
6977
}

‎src/main/java/so/trophy/resources/admin/AsyncAdminClient.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import so.trophy.resources.admin.leaderboards.AsyncLeaderboardsClient;
1616
import so.trophy.resources.admin.metrics.AsyncMetricsClient;
1717
import so.trophy.resources.admin.points.AsyncPointsClient;
18+
import so.trophy.resources.admin.rewards.AsyncRewardsClient;
1819
import so.trophy.resources.admin.settings.AsyncSettingsClient;
1920
import so.trophy.resources.admin.streaks.AsyncStreaksClient;
2021
import so.trophy.resources.admin.tenants.AsyncTenantsClient;
@@ -26,6 +27,8 @@ public class AsyncAdminClient {
2627

2728
protected final Supplier<AsyncAchievementsClient> achievementsClient;
2829

30+
protected final Supplier<AsyncRewardsClient> rewardsClient;
31+
2932
protected final Supplier<AsyncMetricsClient> metricsClient;
3033

3134
protected final Supplier<AsyncLeaderboardsClient> leaderboardsClient;
@@ -46,6 +49,7 @@ public AsyncAdminClient(ClientOptions clientOptions) {
4649
this.clientOptions = clientOptions;
4750
this.attributesClient = Suppliers.memoize(() -> new AsyncAttributesClient(clientOptions));
4851
this.achievementsClient = Suppliers.memoize(() -> new AsyncAchievementsClient(clientOptions));
52+
this.rewardsClient = Suppliers.memoize(() -> new AsyncRewardsClient(clientOptions));
4953
this.metricsClient = Suppliers.memoize(() -> new AsyncMetricsClient(clientOptions));
5054
this.leaderboardsClient = Suppliers.memoize(() -> new AsyncLeaderboardsClient(clientOptions));
5155
this.streaksClient = Suppliers.memoize(() -> new AsyncStreaksClient(clientOptions));
@@ -64,6 +68,10 @@ public AsyncAchievementsClient achievements() {
6468
return this.achievementsClient.get();
6569
}
6670

71+
public AsyncRewardsClient rewards() {
72+
return this.rewardsClient.get();
73+
}
74+
6775
public AsyncMetricsClient metrics() {
6876
return this.metricsClient.get();
6977
}

0 commit comments

Comments
 (0)