(roomsV1())
createRoomDeprecated- CreateRoomDeprecated⚠️ DeprecateddestroyRoomDeprecated- DestroyRoomDeprecated⚠️ DeprecatedgetActiveRoomsForProcessDeprecated- GetActiveRoomsForProcessDeprecated⚠️ DeprecatedgetConnectionInfoDeprecated- GetConnectionInfoDeprecated⚠️ DeprecatedgetInactiveRoomsForProcessDeprecated- GetInactiveRoomsForProcessDeprecated⚠️ DeprecatedgetRoomInfoDeprecated- GetRoomInfoDeprecated⚠️ DeprecatedsuspendRoomDeprecated- SuspendRoomDeprecated⚠️ Deprecated
CreateRoomDeprecated
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.CreateRoomDeprecatedResponse;
import dev.hathora.cloud_sdk.models.shared.CreateRoomParams;
import dev.hathora.cloud_sdk.models.shared.Region;
import dev.hathora.cloud_sdk.models.shared.Security;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ApiError, Exception {
HathoraCloud sdk = HathoraCloud.builder()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
CreateRoomDeprecatedResponse res = sdk.roomsV1().createRoomDeprecated()
.createRoomParams(CreateRoomParams.builder()
.region(Region.CHICAGO)
.clientIPs(List.of(
"123.123.123.123"))
.deploymentId("dep-6d4c6a71-2d75-4b42-94e1-f312f57f33c5")
.roomConfig("{\"name\":\"my-room\"}")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.roomId("2swovpy1fnunu")
.call();
if (res.roomId().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
createRoomParams |
CreateRoomParams | ✔️ | N/A | |
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
roomId |
Optional<String> | ➖ | N/A | 2swovpy1fnunu |
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 400, 401, 402, 404, 422, 429, 500 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
DestroyRoomDeprecated
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.DestroyRoomDeprecatedResponse;
import dev.hathora.cloud_sdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ApiError, Exception {
HathoraCloud sdk = HathoraCloud.builder()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
DestroyRoomDeprecatedResponse res = sdk.roomsV1().destroyRoomDeprecated()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.roomId("2swovpy1fnunu")
.call();
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
roomId |
String | ✔️ | N/A | 2swovpy1fnunu |
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 401, 404, 429, 500 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
GetActiveRoomsForProcessDeprecated
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.GetActiveRoomsForProcessDeprecatedResponse;
import dev.hathora.cloud_sdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ApiError, Exception {
HathoraCloud sdk = HathoraCloud.builder()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
GetActiveRoomsForProcessDeprecatedResponse res = sdk.roomsV1().getActiveRoomsForProcessDeprecated()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.processId("cbfcddd2-0006-43ae-996c-995fff7bed2e")
.call();
if (res.classes().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
processId |
String | ✔️ | N/A | cbfcddd2-0006-43ae-996c-995fff7bed2e |
GetActiveRoomsForProcessDeprecatedResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 401, 404, 429 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
GetConnectionInfoDeprecated
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.GetConnectionInfoDeprecatedResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ApiError, Exception {
HathoraCloud sdk = HathoraCloud.builder()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
GetConnectionInfoDeprecatedResponse res = sdk.roomsV1().getConnectionInfoDeprecated()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.roomId("2swovpy1fnunu")
.call();
if (res.connectionInfo().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
roomId |
String | ✔️ | N/A | 2swovpy1fnunu |
GetConnectionInfoDeprecatedResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 400, 402, 404, 429, 500 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
GetInactiveRoomsForProcessDeprecated
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.GetInactiveRoomsForProcessDeprecatedResponse;
import dev.hathora.cloud_sdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ApiError, Exception {
HathoraCloud sdk = HathoraCloud.builder()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
GetInactiveRoomsForProcessDeprecatedResponse res = sdk.roomsV1().getInactiveRoomsForProcessDeprecated()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.processId("cbfcddd2-0006-43ae-996c-995fff7bed2e")
.call();
if (res.classes().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
processId |
String | ✔️ | N/A | cbfcddd2-0006-43ae-996c-995fff7bed2e |
GetInactiveRoomsForProcessDeprecatedResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 401, 404, 429 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
GetRoomInfoDeprecated
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.GetRoomInfoDeprecatedResponse;
import dev.hathora.cloud_sdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ApiError, Exception {
HathoraCloud sdk = HathoraCloud.builder()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
GetRoomInfoDeprecatedResponse res = sdk.roomsV1().getRoomInfoDeprecated()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.roomId("2swovpy1fnunu")
.call();
if (res.room().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
roomId |
String | ✔️ | N/A | 2swovpy1fnunu |
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 401, 404, 422, 429 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
SuspendRoomDeprecated
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import dev.hathora.cloud_sdk.HathoraCloud;
import dev.hathora.cloud_sdk.models.errors.ApiError;
import dev.hathora.cloud_sdk.models.operations.SuspendRoomDeprecatedResponse;
import dev.hathora.cloud_sdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ApiError, Exception {
HathoraCloud sdk = HathoraCloud.builder()
.security(Security.builder()
.hathoraDevToken("<YOUR_BEARER_TOKEN_HERE>")
.build())
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.orgId("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39")
.build();
SuspendRoomDeprecatedResponse res = sdk.roomsV1().suspendRoomDeprecated()
.appId("app-af469a92-5b45-4565-b3c4-b79878de67d2")
.roomId("2swovpy1fnunu")
.call();
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
Optional<String> | ➖ | N/A | app-af469a92-5b45-4565-b3c4-b79878de67d2 |
roomId |
String | ✔️ | N/A | 2swovpy1fnunu |
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ApiError | 401, 404, 429, 500 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |