Interface IPlayerNamesApi
Represents a collection of functions to interact with the API endpoints
Namespace: Unity.Services.Apis.PlayerNames
Assembly: Unity.Services.Apis.dll
Syntax
public interface IPlayerNamesApi : IApiAccessor
Methods
GetName(string, bool?, bool?, CancellationToken)
Get a player's name.
Declaration
ApiOperation<Player> GetName(string playerId, bool? autoGenerate = null, bool? showMetadata = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | The player's ID. |
bool? | autoGenerate | Indicates if a player without a name should have one auto generated or not. Defaults to true. (optional) |
bool? | showMetadata | If true, returns additional metadata like 'autoGenerated' with records. Defaults to false. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
UpdateName(string, UpdateNameRequest, CancellationToken)
Update a player's name.
Declaration
ApiOperation<Player> UpdateName(string playerId, UpdateNameRequest updateNameRequest, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | The player's ID. |
Update |
updateNameRequest | The update name request. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |