docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CloudCodeApi

    Represents a collection of functions to interact with the API endpoints

    Inheritance
    object
    CloudCodeApi
    Implements
    ICloudCodeApi
    IApiAccessor
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Services.Apis.CloudCode
    Assembly: solution.dll
    Syntax
    public class CloudCodeApi : ICloudCodeApi, IApiAccessor

    Constructors

    CloudCodeApi(IApiClient)

    Initializes a new instance of the CloudCodeApi class using a Configuration object and client instance.

    Declaration
    public CloudCodeApi(IApiClient apiClient)
    Parameters
    Type Name Description
    IApiClient apiClient

    The client interface for synchronous API access.

    CloudCodeApi(IApiClient, IApiConfiguration)

    Initializes a new instance of the CloudCodeApi class using a Configuration object and client instance.

    Declaration
    public CloudCodeApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
    Parameters
    Type Name Description
    IApiClient apiClient

    The client interface for synchronous API access.

    IApiConfiguration apiConfiguration

    The configuration object.

    Properties

    Client

    The client for accessing this underlying API asynchronously.

    Declaration
    public IApiClient Client { get; }
    Property Value
    Type Description
    IApiClient

    Configuration

    Gets the configuration object

    Declaration
    public IApiConfiguration Configuration { get; }
    Property Value
    Type Description
    IApiConfiguration

    An instance of the Configuration

    Methods

    GetBasePath()

    Gets the base path of the API client.

    Declaration
    public string GetBasePath()
    Returns
    Type Description
    string

    The base path

    RunModule(string, string, string, RunModuleArguments, CancellationToken)

    Run module function Run a Cloud Code function from a module for a project.

    Declaration
    public 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 Run a Cloud Code script for a project.

    Declaration
    public 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 Create a subscription token for player messages.

    Declaration
    public 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 Create a subscription token for project messages.

    Declaration
    public 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

    Implements

    ICloudCodeApi
    IApiAccessor
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)