Add a Player to the Session in a Channel
Last updated on
Use the following function to add a player to the session in a channel:
- Go
- Python
- Java
err := matchmakingService.AddUserIntoSessionInChannel(input)
if err != nil {
return err
}
return nil
from accelbyte_py_sdk.api.matchmaking import add_user_into_session_in_channel
from accelbyte_py_sdk.api.matchmaking.models import ModelsMatchAddUserIntoSessionRequest
result, error = add_user_into_session_in_channel(
body=ModelsMatchAddUserIntoSessionRequest.create(
user_id="<user-id>"
),
channel_name="<channel-name>",
match_id="<match_id>"
)
if error:
print(error)
ModelsMatchAddUserIntoSessionRequest body = ModelsMatchAddUserIntoSessionRequest.builder()
.userId("")
.partyId("")
.build();
wMatchmaking.addUserIntoSessionInChannel(AddUserIntoSessionInChannel.builder()
.namespace(namespace)
.channelName(channelName)
.matchID("")
.body(body)
.build());