v1.0.0
Latest
2022.3+
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
Syntax
public interface IServersApi : IInitializable
Methods
GetServerActionLogsAsync(Int64, CancellationToken)
Lists the Action Logs for a server.
Declaration
Task<List<ActionLog>> GetServerActionLogsAsync(long serverId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | serverId | The ID of the server. |
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<Unity.Services.Multiplay.Authoring.Core.MultiplayApi.ActionLog>> | A list of Action Logs for the server with the given ID. |
GetServerAsync(Int64, CancellationToken)
Get the details of a single server with the given ID.
Declaration
Task<ServerInfo> GetServerAsync(long serverId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | serverId | The ID of the server. |
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Unity.Services.Multiplay.Authoring.Core.MultiplayApi.ServerInfo> | The details of the server with the given ID. |
TriggerServerActionAsync(Int64, ServerAction, CancellationToken)
Trigger an action against the server with the given ID.
Declaration
Task<bool> TriggerServerActionAsync(long serverId, ServerAction action, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | serverId | The ID of the server on which to trigger the action. |
ServerAction | action | The action to trigger. |
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | True if the action was successfully triggered, false otherwise. |