RemoveMember
Evicts the specified user from the specified lobby. The caller must be the owner of the lobby.
Service | Operation |
---|---|
lobby | REMOVE_MEMBER |
Method Parameters
Parameter | Description |
---|---|
lobbyId | Id of chosen lobby. |
connectionID | RTT connection id of specified member to be removed from the lobby. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string lobbyId = "55555:4v4:19";
string cxId = "55555:aaa-bbb-ccc-ddd:asdfjkl";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.LobbyService.RemoveMember(lobbyId, cxId, successCallback, failureCallback);
const char *lobbyId = "55555:4v4:19";
const char *cxId = "55555:aaa-bbb-ccc-ddd:asdfjkl";
_bc->getLobbyService()->removeMember(lobbyId, cxId, this);
NSString *lobbyId = @"55555:4v4:19";
NSString *cxId = @"55555:aaa-bbb-ccc-ddd:asdfjkl";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc lobbyService] removeMember:lobbyId
cxId:cxId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String lobbyId = "55555:4v4:19";
String cxId = "55555:aaa-bbb-ccc-ddd:asdfjkl";
this; // implements IServerCallback
_bc.getLobbyService().removeMember(lobbyId, cxId, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var lobbyId = "55555:4v4:19";
var cxId = "55555:aaa-bbb-ccc-ddd:asdfjkl";
_bc.lobby.removeMember(lobbyId, cxId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var lobbyId = "55555:4v4:19";
var connectionId = "55555:aaa-bbb-ccc-ddd:asdfjkl";
ServerResponse result = await _bc.lobbyService.removeMember(lobbyId:lobbyId, connectionId:connectionId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var lobbyId = "55555:4v4:19";
var cxId = "55555:aaa-bbb-ccc-ddd:asdfjkl";
var lobbyProxy = bridge.getLobbyServiceProxy();
var postResult = lobbyProxy.removeMember(lobbyId, cxId);
if (postResult.status == 200) {
// Success!
}
{
"service": "lobby",
"operation": "REMOVE_MEMBER",
"data": {
"lobbyId": "55555:4v4:19",
"cxId": "55555:aaa-bbb-ccc-ddd:asdfjkl"
}
}
JSON Response
{
"status": 200,
"data": {}
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40601 | RTT_NOT_ENABLED | RTT must be enabled for this feature |