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

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
TypeNameDescription
System.Int64serverId

The ID of the server.

System.Threading.CancellationTokencancellationToken

Cancellation Token to cancel the request.

Returns
TypeDescription
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
TypeNameDescription
System.Int64serverId

The ID of the server.

System.Threading.CancellationTokencancellationToken

Cancellation Token to cancel the request.

Returns
TypeDescription
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
TypeNameDescription
System.Int64serverId

The ID of the server on which to trigger the action.

ServerActionaction

The action to trigger.

System.Threading.CancellationTokencancellationToken

Cancellation Token to cancel the request.

Returns
TypeDescription
System.Threading.Tasks.Task<System.Boolean>

True if the action was successfully triggered, false otherwise.