docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CloudCodeScriptsAdminApi

    Represents a collection of functions to interact with the API endpoints

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

    Constructors

    CloudCodeScriptsAdminApi(IApiClient)

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

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

    The client interface for synchronous API access.

    CloudCodeScriptsAdminApi(IApiClient, IApiConfiguration)

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

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

    CreateScript(string, string, CreateScriptRequest, CancellationToken)

    Create script Create a Cloud Code script for a project environment

    Declaration
    public ApiOperation CreateScript(string projectId, string environmentId, CreateScriptRequest createScriptRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string environmentId

    ID of the environment

    CreateScriptRequest createScriptRequest

    Provide script name, type and code. Parameters are optional. If no code is provided, a placeholder code example is used. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeleteScript(string, string, string, CancellationToken)

    Delete script Delete a Cloud Code script for a project environment.

    Declaration
    public ApiOperation DeleteScript(string projectId, string environmentId, string scriptName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string environmentId

    ID of the environment

    string scriptName

    Name of the script.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    GetBasePath()

    Gets the base path of the API client.

    Declaration
    public string GetBasePath()
    Returns
    Type Description
    string

    The base path

    GetScript(string, string, string, CancellationToken)

    Get script Get a Cloud Code script for a project environment

    Declaration
    public ApiOperation<GetScriptResponse> GetScript(string projectId, string environmentId, string scriptName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string environmentId

    ID of the environment

    string scriptName

    Name of the script.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetScriptResponse>

    The operation

    ListScripts(string, string, int?, string, CancellationToken)

    List scripts Get a list of the Cloud Code scripts for a project environment

    Declaration
    public ApiOperation<ListScriptsResponse> ListScripts(string projectId, string environmentId, int? limit = null, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string environmentId

    ID of the environment

    int? limit

    The number of scripts to return. (optional)

    string after

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<ListScriptsResponse>

    The operation

    PublishScript(string, string, string, PublishScriptRequest, CancellationToken)

    Publish script Publish a Cloud Code script for a project environment. You can't republish the active script, or publish a script with compiliaton errors.

    Declaration
    public ApiOperation<PublishScriptResponse> PublishScript(string projectId, string environmentId, string scriptName, PublishScriptRequest publishScriptRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string environmentId

    ID of the environment

    string scriptName

    Name of the script.

    PublishScriptRequest publishScriptRequest

    Optional. Provide a version number to publish if you want to republish an older version. By default, the working copy is published. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<PublishScriptResponse>

    The operation

    UpdateScript(string, string, string, UpdateScriptRequest, CancellationToken)

    Update script Update a Cloud Code script for a project environment

    Declaration
    public ApiOperation UpdateScript(string projectId, string environmentId, string scriptName, UpdateScriptRequest updateScriptRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string environmentId

    ID of the environment

    string scriptName

    Name of the script.

    UpdateScriptRequest updateScriptRequest

    Provide updated script code, parameters, or both. If you provide an empty parameters array, the present parameters will be removed. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    Implements

    ICloudCodeScriptsAdminApi
    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)