Skip to content

Latest commit

 

History

History
430 lines (308 loc) · 19.6 KB

README.md

File metadata and controls

430 lines (308 loc) · 19.6 KB

RoomsV1

(roomsV1())

Overview

Available Operations

createRoomDeprecated

CreateRoomDeprecated

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

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
        }
    }
}

Parameters

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

Response

CreateRoomDeprecatedResponse

Errors

Error Type Status Code Content Type
models/errors/ApiError 400, 401, 402, 404, 422, 429, 500 application/json
models/errors/SDKError 4XX, 5XX */*

destroyRoomDeprecated

DestroyRoomDeprecated

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

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
    }
}

Parameters

Parameter Type Required Description Example
appId Optional<String> N/A app-af469a92-5b45-4565-b3c4-b79878de67d2
roomId String ✔️ N/A 2swovpy1fnunu

Response

DestroyRoomDeprecatedResponse

Errors

Error Type Status Code Content Type
models/errors/ApiError 401, 404, 429, 500 application/json
models/errors/SDKError 4XX, 5XX */*

getActiveRoomsForProcessDeprecated

GetActiveRoomsForProcessDeprecated

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

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
        }
    }
}

Parameters

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

Response

GetActiveRoomsForProcessDeprecatedResponse

Errors

Error Type Status Code Content Type
models/errors/ApiError 401, 404, 429 application/json
models/errors/SDKError 4XX, 5XX */*

getConnectionInfoDeprecated

GetConnectionInfoDeprecated

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

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
        }
    }
}

Parameters

Parameter Type Required Description Example
appId Optional<String> N/A app-af469a92-5b45-4565-b3c4-b79878de67d2
roomId String ✔️ N/A 2swovpy1fnunu

Response

GetConnectionInfoDeprecatedResponse

Errors

Error Type Status Code Content Type
models/errors/ApiError 400, 402, 404, 429, 500 application/json
models/errors/SDKError 4XX, 5XX */*

getInactiveRoomsForProcessDeprecated

GetInactiveRoomsForProcessDeprecated

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

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
        }
    }
}

Parameters

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

Response

GetInactiveRoomsForProcessDeprecatedResponse

Errors

Error Type Status Code Content Type
models/errors/ApiError 401, 404, 429 application/json
models/errors/SDKError 4XX, 5XX */*

getRoomInfoDeprecated

GetRoomInfoDeprecated

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

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
        }
    }
}

Parameters

Parameter Type Required Description Example
appId Optional<String> N/A app-af469a92-5b45-4565-b3c4-b79878de67d2
roomId String ✔️ N/A 2swovpy1fnunu

Response

GetRoomInfoDeprecatedResponse

Errors

Error Type Status Code Content Type
models/errors/ApiError 401, 404, 422, 429 application/json
models/errors/SDKError 4XX, 5XX */*

suspendRoomDeprecated

SuspendRoomDeprecated

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

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
    }
}

Parameters

Parameter Type Required Description Example
appId Optional<String> N/A app-af469a92-5b45-4565-b3c4-b79878de67d2
roomId String ✔️ N/A 2swovpy1fnunu

Response

SuspendRoomDeprecatedResponse

Errors

Error Type Status Code Content Type
models/errors/ApiError 401, 404, 429, 500 application/json
models/errors/SDKError 4XX, 5XX */*