Skip to content

Commit c5db0f3

Browse files
authored
Merge pull request #70 from hathora/speakeasy-sdk-regen-1756253357
chore: 🐝 Update SDK - Generate 3.2.0
2 parents 518a9eb + 3195a13 commit c5db0f3

File tree

735 files changed

+43554
-28088
lines changed

Some content is hidden

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

735 files changed

+43554
-28088
lines changed

.speakeasy/gen.lock

Lines changed: 210 additions & 18 deletions
Large diffs are not rendered by default.

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.552.0
1+
speakeasyVersion: 1.606.6
22
sources:
33
java-source:
44
sourceNamespace: java-source
5-
sourceRevisionDigest: sha256:ec4e4b2248bf073eae30616ae548ebb528bd7dd450661459e7f8a4417cd2023b
6-
sourceBlobDigest: sha256:cf474b64da154302d2fd12b2f60c31bad84ceb2d89aa94b74ce02722532ca75e
5+
sourceRevisionDigest: sha256:577401c910d4e5966fd680144e0ef3d38620dee02ce6a7cc70bd64ee90d0dcaa
6+
sourceBlobDigest: sha256:7037c4a3cfad22d533120b46da9b211a5f42427f8b70e36998095e3bf84b6bb1
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1748389981
9+
- speakeasy-sdk-regen-1756253357
1010
- 0.0.1
1111
targets:
1212
hathora-java:
1313
source: java-source
1414
sourceNamespace: java-source
15-
sourceRevisionDigest: sha256:ec4e4b2248bf073eae30616ae548ebb528bd7dd450661459e7f8a4417cd2023b
16-
sourceBlobDigest: sha256:cf474b64da154302d2fd12b2f60c31bad84ceb2d89aa94b74ce02722532ca75e
15+
sourceRevisionDigest: sha256:577401c910d4e5966fd680144e0ef3d38620dee02ce6a7cc70bd64ee90d0dcaa
16+
sourceBlobDigest: sha256:7037c4a3cfad22d533120b46da9b211a5f42427f8b70e36998095e3bf84b6bb1
1717
codeSamplesNamespace: code-samples-java-hathora-java
18-
codeSamplesRevisionDigest: sha256:0cea5bbd21bf26cec86660584d915d6a0a0e180f04620e775aedec46aa60f88b
18+
codeSamplesRevisionDigest: sha256:cd1ce58fba3f87119d56205751f2fa15390bdeb8b5bedffd8d65c1155c24bcd2
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

README.md

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Hathora Cloud API: Welcome to the Hathora Cloud API documentation! Learn how to
2222
* [Error Handling](#error-handling)
2323
* [Server Selection](#server-selection)
2424
* [Authentication](#authentication)
25+
* [Debugging](#debugging)
2526

2627
<!-- End Table of Contents [toc] -->
2728

@@ -36,15 +37,15 @@ The samples below show how a published SDK artifact is used:
3637

3738
Gradle:
3839
```groovy
39-
implementation 'dev.hathora:cloud-sdk:3.1.10'
40+
implementation 'dev.hathora:cloud-sdk:3.2.0'
4041
```
4142

4243
Maven:
4344
```xml
4445
<dependency>
4546
<groupId>dev.hathora</groupId>
4647
<artifactId>cloud-sdk</artifactId>
47-
<version>3.1.10</version>
48+
<version>3.2.0</version>
4849
</dependency>
4950
```
5051

@@ -61,29 +62,6 @@ On Windows:
6162
```bash
6263
gradlew.bat publishToMavenLocal -Pskip.signing
6364
```
64-
65-
### Logging
66-
A logging framework/facade has not yet been adopted but is under consideration.
67-
68-
For request and response logging (especially json bodies) use:
69-
```java
70-
SpeakeasyHTTPClient.setDebugLogging(true); // experimental API only (may change without warning)
71-
```
72-
Example output:
73-
```
74-
Sending request: http://localhost:35123/bearer#global GET
75-
Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]}
76-
Received response: (GET http://localhost:35123/bearer#global) 200
77-
Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]}
78-
Response body:
79-
{
80-
"authenticated": true,
81-
"token": "global"
82-
}
83-
```
84-
WARNING: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.
85-
86-
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
8765
<!-- End SDK Installation [installation] -->
8866

8967
<!-- Start SDK Example Usage [usage] -->
@@ -105,15 +83,14 @@ public class Application {
10583
public static void main(String[] args) throws ApiError, ApiError, Exception {
10684

10785
HathoraCloud sdk = HathoraCloud.builder()
86+
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
10887
.security(Security.builder()
109-
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
88+
.hathoraDevToken(System.getenv().getOrDefault("HATHORA_DEV_TOKEN", ""))
11089
.build())
111-
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
112-
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
11390
.build();
11491

11592
CreateAppResponse res = sdk.appsV2().createApp()
116-
.appConfig(AppConfig.builder()
93+
.createAppConfig(CreateAppConfig.builder()
11794
.appName("minecraft")
11895
.authConfiguration(AuthConfiguration.builder()
11996
.build())
@@ -368,15 +345,15 @@ public class Application {
368345
public static void main(String[] args) throws ApiError, ApiError, Exception {
369346

370347
HathoraCloud sdk = HathoraCloud.builder()
348+
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
349+
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
371350
.security(Security.builder()
372-
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
351+
.hathoraDevToken(System.getenv().getOrDefault("HATHORA_DEV_TOKEN", ""))
373352
.build())
374-
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
375-
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
376353
.build();
377354

378355
CreateAppResponse res = sdk.appsV2().createApp()
379-
.appConfig(AppConfig.builder()
356+
.createAppConfig(CreateAppConfig.builder()
380357
.appName("minecraft")
381358
.authConfiguration(AuthConfiguration.builder()
382359
.build())
@@ -420,15 +397,14 @@ public class Application {
420397
public static void main(String[] args) throws ApiError, ApiError, Exception {
421398

422399
HathoraCloud sdk = HathoraCloud.builder()
400+
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
423401
.security(Security.builder()
424-
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
402+
.hathoraDevToken(System.getenv().getOrDefault("HATHORA_DEV_TOKEN", ""))
425403
.build())
426-
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
427-
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
428404
.build();
429405

430406
CreateAppResponse res = sdk.appsV2().createApp()
431-
.appConfig(AppConfig.builder()
407+
.createAppConfig(CreateAppConfig.builder()
432408
.appName("minecraft")
433409
.authConfiguration(AuthConfiguration.builder()
434410
.build())
@@ -472,15 +448,14 @@ public class Application {
472448

473449
HathoraCloud sdk = HathoraCloud.builder()
474450
.serverIndex(1)
451+
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
475452
.security(Security.builder()
476-
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
453+
.hathoraDevToken(System.getenv().getOrDefault("HATHORA_DEV_TOKEN", ""))
477454
.build())
478-
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
479-
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
480455
.build();
481456

482457
CreateAppResponse res = sdk.appsV2().createApp()
483-
.appConfig(AppConfig.builder()
458+
.createAppConfig(CreateAppConfig.builder()
484459
.appName("minecraft")
485460
.authConfiguration(AuthConfiguration.builder()
486461
.build())
@@ -512,15 +487,14 @@ public class Application {
512487

513488
HathoraCloud sdk = HathoraCloud.builder()
514489
.serverURL("https://api.hathora.dev")
490+
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
515491
.security(Security.builder()
516-
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
492+
.hathoraDevToken(System.getenv().getOrDefault("HATHORA_DEV_TOKEN", ""))
517493
.build())
518-
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
519-
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
520494
.build();
521495

522496
CreateAppResponse res = sdk.appsV2().createApp()
523-
.appConfig(AppConfig.builder()
497+
.createAppConfig(CreateAppConfig.builder()
524498
.appName("minecraft")
525499
.authConfiguration(AuthConfiguration.builder()
526500
.build())
@@ -562,14 +536,13 @@ public class Application {
562536

563537
HathoraCloud sdk = HathoraCloud.builder()
564538
.security(Security.builder()
565-
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
539+
.hathoraDevToken(System.getenv().getOrDefault("HATHORA_DEV_TOKEN", ""))
566540
.build())
567-
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
568541
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
569542
.build();
570543

571544
CreateAppResponse res = sdk.appsV2().createApp()
572-
.appConfig(AppConfig.builder()
545+
.createAppConfig(CreateAppConfig.builder()
573546
.appName("minecraft")
574547
.authConfiguration(AuthConfiguration.builder()
575548
.build())
@@ -601,7 +574,6 @@ public class Application {
601574

602575
HathoraCloud sdk = HathoraCloud.builder()
603576
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
604-
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
605577
.build();
606578

607579
CreateLobbyRequest req = CreateLobbyRequest.builder()
@@ -610,15 +582,14 @@ public class Application {
610582
.visibility(LobbyVisibility.PRIVATE)
611583
.roomConfig("{\"name\":\"my-room\"}")
612584
.build())
613-
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
614585
.roomId("2swovpy1fnunu")
615586
.shortCode("LFG4")
616587
.build();
617588

618589
CreateLobbyResponse res = sdk.lobbiesV3().createLobby()
619590
.request(req)
620591
.security(CreateLobbySecurity.builder()
621-
.playerAuth("<YOUR_BEARER_TOKEN_HERE>")
592+
.playerAuth(System.getenv().getOrDefault("PLAYER_AUTH", ""))
622593
.build())
623594
.call();
624595

@@ -630,6 +601,37 @@ public class Application {
630601
```
631602
<!-- End Authentication [security] -->
632603

604+
<!-- Start Debugging [debug] -->
605+
## Debugging
606+
607+
### Debug
608+
You can setup your SDK to emit debug logs for SDK requests and responses.
609+
610+
For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:
611+
```java
612+
SDK.builder()
613+
.enableHTTPDebugLogging(true)
614+
.build();
615+
```
616+
Example output:
617+
```
618+
Sending request: http://localhost:35123/bearer#global GET
619+
Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]}
620+
Received response: (GET http://localhost:35123/bearer#global) 200
621+
Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]}
622+
Response body:
623+
{
624+
"authenticated": true,
625+
"token": "global"
626+
}
627+
```
628+
__WARNING__: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.
629+
630+
__NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging()`. The `SpeakeasyHTTPClient` honors this setting. If you are using a custom HTTP client, it is up to the custom client to honor this setting.
631+
632+
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
633+
<!-- End Debugging [debug] -->
634+
633635
<!-- Placeholder for Future Speakeasy SDK Sections -->
634636

635637
### Maturity

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,4 +1159,14 @@ Based on:
11591159
### Generated
11601160
- [java v3.1.10] .
11611161
### Releases
1162-
- [Maven Central v3.1.10] https://central.sonatype.com/artifact/dev.hathora/cloud-sdk/3.1.10 - .
1162+
- [Maven Central v3.1.10] https://central.sonatype.com/artifact/dev.hathora/cloud-sdk/3.1.10 - .
1163+
1164+
## 2025-08-27 12:39:59
1165+
### Changes
1166+
Based on:
1167+
- OpenAPI Doc
1168+
- Speakeasy CLI 1.606.6 (2.687.11) https://github.com/speakeasy-api/speakeasy
1169+
### Generated
1170+
- [java v3.2.0] .
1171+
### Releases
1172+
- [Maven Central v3.2.0] https://central.sonatype.com/artifact/dev.hathora/cloud-sdk/3.2.0 - .

USAGE.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ public class Application {
1313
public static void main(String[] args) throws ApiError, ApiError, Exception {
1414

1515
HathoraCloud sdk = HathoraCloud.builder()
16+
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
1617
.security(Security.builder()
17-
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
18+
.hathoraDevToken(System.getenv().getOrDefault("HATHORA_DEV_TOKEN", ""))
1819
.build())
19-
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
20-
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
2120
.build();
2221

2322
CreateAppResponse res = sdk.appsV2().createApp()
24-
.appConfig(AppConfig.builder()
23+
.createAppConfig(CreateAppConfig.builder()
2524
.appName("minecraft")
2625
.authConfiguration(AuthConfiguration.builder()
2726
.build())

build.gradle

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ repositories {
2727
}
2828

2929
java {
30-
sourceCompatibility = JavaVersion.VERSION_11
31-
targetCompatibility = JavaVersion.VERSION_11
3230
withSourcesJar()
3331
withJavadocJar()
3432
}
@@ -61,10 +59,14 @@ javadoc {
6159
}
6260

6361
tasks.withType(Javadoc) {
64-
failOnError false
62+
failOnError = false
6563
options.addStringOption('Xdoclint:none', '-quiet')
6664
}
6765

66+
tasks.withType(JavaCompile).configureEach {
67+
options.release = 11
68+
}
69+
6870
sourcesJar {
6971
archiveBaseName = "${artifactId}"
7072
}
@@ -103,11 +105,15 @@ publishing {
103105
// https://github.com/gradle/gradle/issues/18619
104106
groupId = "dev.hathora"
105107
artifactId = "cloud-sdk"
106-
version = "3.1.10"
108+
version = "3.2.0"
107109

108110
from components.java
109111

110112
pom {
113+
properties = [
114+
'maven.compiler.source': '11',
115+
'maven.compiler.target': '11',
116+
]
111117
name = 'Hathora Java SDK'
112118
description = 'SDK enabling Java developers to easily integrate with the Hathora API.'
113119
url = 'https://github.com/hathora/cloud-sdk-java'
@@ -160,4 +166,4 @@ dependencies {
160166
implementation 'commons-io:commons-io:2.18.0'
161167
}
162168

163-
apply from: 'build-extras.gradle'
169+
apply from: 'build-extras.gradle'

0 commit comments

Comments
 (0)