Interface IServersApi
Provides access to server information for the project. See https://services.docs.unity.com/multiplay-config/v1/#tag/Servers for details
Inherited Members
Namespace: Unity.Services.Multiplay.Authoring.Core.MultiplayApi
Assembly: Unity.Services.Multiplayer.Multiplay.Authoring.Core.dll
Syntax
public interface IServersApi : IInitializable
Methods
GetServerActionLogsAsync(long, CancellationToken)
Lists the Action Logs for a server.
Declaration
Task<List<ActionLog>> GetServerActionLogsAsync(long serverId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | serverId | The ID of the server. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<List<ActionLog>> | A list of Action Logs for the server with the given ID. |
GetServerAsync(long, CancellationToken)
Get the details of a single server with the given ID.
Declaration
Task<ServerInfo> GetServerAsync(long serverId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | serverId | The ID of the server. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ServerInfo> | The details of the server with the given ID. |
TriggerServerActionAsync(long, ServerAction, CancellationToken)
Trigger an action against the server with the given ID.
Declaration
Task<bool> TriggerServerActionAsync(long serverId, ServerAction action, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | serverId | The ID of the server on which to trigger the action. |
ServerAction | action | The action to trigger. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<bool> | True if the action was successfully triggered, false otherwise. |