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. |
Run |
runModuleArguments | A JSON object containing the parameters to pass to the function. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
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. |
Run |
runScriptArguments | A JSON object containing the script run arguments. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
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. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
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. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |