(LobbyV2)
Deprecated. Use LobbyV3.
CreateLobbyDeprecated- Create a new lobby for an application. A lobby object is a wrapper around a room object. With a lobby, you get additional functionality like configuring the visibility of the room, managing the state of a match, and retrieving a list of public lobbies to display to players.⚠️ DeprecatedCreateLocalLobby-⚠️ DeprecatedCreatePrivateLobby-⚠️ DeprecatedCreatePublicLobby-⚠️ DeprecatedGetLobbyInfo- Get details for a lobby.⚠️ DeprecatedListActivePublicLobbiesDeprecatedV2- Get all active lobbies for a an application. Filter by optionally passing in aregion
. Use this endpoint to display all public lobbies that a player can join in the game client.⚠️ DeprecatedSetLobbyState- Set the state of a lobby. State is intended to be set by the server and must be smaller than 1MB. Use this endpoint to store match data like live player count to enforce max number of clients or persist end-game data (i.e. winner or final scores).⚠️ Deprecated
Create a new lobby for an application. A lobby object is a wrapper around a room object. With a lobby, you get additional functionality like configuring the visibility of the room, managing the state of a match, and retrieving a list of public lobbies to display to players.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
using HathoraCloud;
using HathoraCloud.Models.Operations;
using HathoraCloud.Models.Shared;
var sdk = new HathoraCloudSDK(appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");
CreateLobbyDeprecatedRequest req = new CreateLobbyDeprecatedRequest() {
CreateLobbyParams = new CreateLobbyParams() {
InitialConfig = new LobbyInitialConfig() {},
Region = Region.Tokyo,
Visibility = LobbyVisibility.Private,
},
RoomId = "2swovpy1fnunu",
};
using(var res = await sdk.LobbyV2.CreateLobbyDeprecatedAsync(
new CreateLobbyDeprecatedSecurity() {
PlayerAuth = "<YOUR_BEARER_TOKEN_HERE>",
},
req))
{
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
CreateLobbyDeprecatedRequest | ✔️ | The request object to use for the request. |
security |
HathoraCloud.Models.Operations.CreateLobbyDeprecatedSecurity | ✔️ | The security requirements to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
HathoraCloud.Models.Errors.ApiError | 400,401,402,404,422,429,500 | application/json |
HathoraCloud.Models.Errors.SDKException | 4xx-5xx | / |
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
using HathoraCloud;
using HathoraCloud.Models.Operations;
using HathoraCloud.Models.Shared;
var sdk = new HathoraCloudSDK(appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");
CreateLocalLobbyRequest req = new CreateLocalLobbyRequest() {
RequestBody = new CreateLocalLobbyRequestBody() {
InitialConfig = new LobbyInitialConfig() {},
Region = Region.SaoPaulo,
},
RoomId = "2swovpy1fnunu",
};
using(var res = await sdk.LobbyV2.CreateLocalLobbyAsync(
new CreateLocalLobbySecurity() {
PlayerAuth = "<YOUR_BEARER_TOKEN_HERE>",
},
req))
{
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
CreateLocalLobbyRequest | ✔️ | The request object to use for the request. |
security |
HathoraCloud.Models.Operations.CreateLocalLobbySecurity | ✔️ | The security requirements to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
HathoraCloud.Models.Errors.ApiError | 400,401,402,404,422,429,500 | application/json |
HathoraCloud.Models.Errors.SDKException | 4xx-5xx | / |
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
using HathoraCloud;
using HathoraCloud.Models.Operations;
using HathoraCloud.Models.Shared;
var sdk = new HathoraCloudSDK(appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");
CreatePrivateLobbyRequest req = new CreatePrivateLobbyRequest() {
RequestBody = new CreatePrivateLobbyRequestBody() {
InitialConfig = new LobbyInitialConfig() {},
Region = Region.Chicago,
},
RoomId = "2swovpy1fnunu",
};
using(var res = await sdk.LobbyV2.CreatePrivateLobbyAsync(
new CreatePrivateLobbySecurity() {
PlayerAuth = "<YOUR_BEARER_TOKEN_HERE>",
},
req))
{
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
CreatePrivateLobbyRequest | ✔️ | The request object to use for the request. |
security |
HathoraCloud.Models.Operations.CreatePrivateLobbySecurity | ✔️ | The security requirements to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
HathoraCloud.Models.Errors.ApiError | 400,401,402,404,422,429,500 | application/json |
HathoraCloud.Models.Errors.SDKException | 4xx-5xx | / |
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
using HathoraCloud;
using HathoraCloud.Models.Operations;
using HathoraCloud.Models.Shared;
var sdk = new HathoraCloudSDK(appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");
CreatePublicLobbyRequest req = new CreatePublicLobbyRequest() {
RequestBody = new CreatePublicLobbyRequestBody() {
InitialConfig = new LobbyInitialConfig() {},
Region = Region.SaoPaulo,
},
RoomId = "2swovpy1fnunu",
};
using(var res = await sdk.LobbyV2.CreatePublicLobbyAsync(
new CreatePublicLobbySecurity() {
PlayerAuth = "<YOUR_BEARER_TOKEN_HERE>",
},
req))
{
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
CreatePublicLobbyRequest | ✔️ | The request object to use for the request. |
security |
HathoraCloud.Models.Operations.CreatePublicLobbySecurity | ✔️ | The security requirements to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
HathoraCloud.Models.Errors.ApiError | 400,401,402,404,422,429,500 | application/json |
HathoraCloud.Models.Errors.SDKException | 4xx-5xx | / |
Get details for a lobby.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;
var sdk = new HathoraCloudSDK(appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");
GetLobbyInfoRequest req = new GetLobbyInfoRequest() {
RoomId = "2swovpy1fnunu",
};
using(var res = await sdk.LobbyV2.GetLobbyInfoAsync(req))
{
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
GetLobbyInfoRequest | ✔️ | The request object to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
HathoraCloud.Models.Errors.ApiError | 404 | application/json |
HathoraCloud.Models.Errors.SDKException | 4xx-5xx | / |
Get all active lobbies for a an application. Filter by optionally passing in a region
. Use this endpoint to display all public lobbies that a player can join in the game client.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;
var sdk = new HathoraCloudSDK(appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");
ListActivePublicLobbiesDeprecatedV2Request req = new ListActivePublicLobbiesDeprecatedV2Request() {};
using(var res = await sdk.LobbyV2.ListActivePublicLobbiesDeprecatedV2Async(req))
{
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
ListActivePublicLobbiesDeprecatedV2Request | ✔️ | The request object to use for the request. |
ListActivePublicLobbiesDeprecatedV2Response
Error Object | Status Code | Content Type |
---|---|---|
HathoraCloud.Models.Errors.SDKException | 4xx-5xx | / |
Set the state of a lobby. State is intended to be set by the server and must be smaller than 1MB. Use this endpoint to store match data like live player count to enforce max number of clients or persist end-game data (i.e. winner or final scores).
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;
var sdk = new HathoraCloudSDK(
security: new Security() {
HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
},
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");
SetLobbyStateRequest req = new SetLobbyStateRequest() {
SetLobbyStateParams = new SetLobbyStateParams() {
State = new SetLobbyStateParamsState() {},
},
RoomId = "2swovpy1fnunu",
};
using(var res = await sdk.LobbyV2.SetLobbyStateAsync(req))
{
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
SetLobbyStateRequest | ✔️ | The request object to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
HathoraCloud.Models.Errors.ApiError | 401,404,422,429 | application/json |
HathoraCloud.Models.Errors.SDKException | 4xx-5xx | / |