Interface ICloudCodeApi
Represents a collection of functions to interact with the API endpoints
Namespace: Unity.Services.Apis.CloudCode
Assembly: Unity.Services.Apis.dll
Syntax
public interface ICloudCodeApi : IApiAccessor
Methods
RunModule(string, string, string, RunModuleArguments, CancellationToken)
Run module function
Declaration
ApiOperation<RunModuleResponse> RunModule(string projectId, string moduleName, string functionName, RunModuleArguments runModuleArguments = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | projectId | ID of the project. |
| string | moduleName | Name of the Cloud Code module. |
| string | functionName | Name of the function to invoke from the given module. |
| RunModuleArguments | runModuleArguments | A JSON object containing the parameters to pass to the function. (optional) |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<RunModuleResponse> | The operation |
RunScript(string, string, RunScriptArguments, CancellationToken)
Run script
Declaration
ApiOperation<RunScriptResponse> RunScript(string projectId, string scriptName, RunScriptArguments runScriptArguments = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | projectId | ID of the project. |
| string | scriptName | Name of the script. |
| RunScriptArguments | runScriptArguments | A JSON object containing the script run arguments. (optional) |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<RunScriptResponse> | The operation |
SubscriptionTokenPlayer(string, CancellationToken)
Create a player subscription token
Declaration
ApiOperation<SubscriptionTokenResponse> SubscriptionTokenPlayer(string projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | projectId | ID of the project. |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<SubscriptionTokenResponse> | The operation |
SubscriptionTokenProject(string, CancellationToken)
Create a project subscription token
Declaration
ApiOperation<SubscriptionTokenResponse> SubscriptionTokenProject(string projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | projectId | ID of the project. |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<SubscriptionTokenResponse> | The operation |