docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CloudSaveDataApi

    Represents a collection of functions to interact with the API endpoints

    Inheritance
    object
    CloudSaveDataApi
    Implements
    ICloudSaveDataApi
    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.CloudSave
    Assembly: solution.dll
    Syntax
    public class CloudSaveDataApi : ICloudSaveDataApi, IApiAccessor

    Constructors

    CloudSaveDataApi(IApiClient)

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

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

    The client interface for synchronous API access.

    CloudSaveDataApi(IApiClient, IApiConfiguration)

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

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

    DeleteCustomItem(string, string, string, string, CancellationToken)

    Delete Custom Item Deletes a data item by the specified key for the specified custom ID. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation DeleteCustomItem(string key, string projectId, string customId, string writeLock = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string key

    Item key.

    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    string writeLock

    Enforces conflict checking when deleting an existing data item. Omitting this field ignores write conflicts. When present, an error response will be returned if the writeLock in the request does not match the stored writeLock. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeleteCustomItems(string, string, CancellationToken)

    Delete Custom Items Deletes all default access level data associated with a given custom ID. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation DeleteCustomItems(string projectId, string customId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeleteItem(string, string, string, string, CancellationToken)

    Delete Player Item Deletes a data item by the specified key for the given player.

    Declaration
    public ApiOperation DeleteItem(string key, string projectId, string playerId, string writeLock = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string key

    Item key.

    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    string writeLock

    Enforces conflict checking when deleting an existing data item. Omitting this field ignores write conflicts. When present, an error response will be returned if the writeLock in the request does not match the stored writeLock. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeleteItems(string, string, CancellationToken)

    Delete Player Items Deletes all default access level data associated with a given player.

    Declaration
    public ApiOperation DeleteItems(string projectId, string playerId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeletePrivateCustomItem(string, string, string, string, CancellationToken)

    Delete Private Custom Item Deletes a private data item by the specified key for the specified custom ID. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation DeletePrivateCustomItem(string key, string projectId, string customId, string writeLock = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string key

    Item key.

    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    string writeLock

    Enforces conflict checking when deleting an existing data item. Omitting this field ignores write conflicts. When present, an error response will be returned if the writeLock in the request does not match the stored writeLock. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeletePrivateCustomItems(string, string, CancellationToken)

    Delete Private Custom Items Deletes all private data associated with a given custom ID. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation DeletePrivateCustomItems(string projectId, string customId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeleteProtectedItem(string, string, string, string, CancellationToken)

    Delete Protected Player Item Deletes a protected data item by the specified key for the given player. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation DeleteProtectedItem(string key, string projectId, string playerId, string writeLock = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string key

    Item key.

    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    string writeLock

    Enforces conflict checking when deleting an existing data item. Omitting this field ignores write conflicts. When present, an error response will be returned if the writeLock in the request does not match the stored writeLock. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeleteProtectedItems(string, string, CancellationToken)

    Delete Protected Player Items Deletes all protected data associated with a given player. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation DeleteProtectedItems(string projectId, string playerId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeletePublicItem(string, string, string, string, CancellationToken)

    Delete Public Player Item Deletes a public data item by the specified key for the given player.

    Declaration
    public ApiOperation DeletePublicItem(string key, string projectId, string playerId, string writeLock = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string key

    Item key.

    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    string writeLock

    Enforces conflict checking when deleting an existing data item. Omitting this field ignores write conflicts. When present, an error response will be returned if the writeLock in the request does not match the stored writeLock. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeletePublicItems(string, string, CancellationToken)

    Delete Public Player Items Deletes all public data associated with a given player.

    Declaration
    public ApiOperation DeletePublicItems(string projectId, string playerId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    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

    GetCustomItems(string, string, List<string>, string, CancellationToken)

    Get Custom Items Retrieves saved data values for all keys specified, ordered alphabetically in pages of 20. If no keys are supplied then returns all keys, ordered alphabetically in pages of 20.

    Declaration
    public ApiOperation<GetItemsResponse> GetCustomItems(string projectId, string customId, List<string> keys = null, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    List<string> keys

    The keys to retrieve, in exploded form style, e.g. keys=KEY1&keys=KEY2&keys=KEY3. (optional)

    string after

    The key after which to retrieve the next page of keys. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetItemsResponse>

    The operation

    GetCustomKeys(string, string, string, CancellationToken)

    Get Custom Keys Gets a paged list of keys for the given custom ID, ordered alphabetically in pages of 100.

    Declaration
    public ApiOperation<GetKeysResponse> GetCustomKeys(string projectId, string customId, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    string after

    Returns the page of results after the key specified. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetKeysResponse>

    The operation

    GetItems(string, string, List<string>, string, CancellationToken)

    Get Player Items Retrieves saved data values for all keys specified, ordered alphabetically in pages of 20. If no keys are supplied then returns all keys, ordered alphabetically in pages of 20.

    Declaration
    public ApiOperation<GetItemsResponse> GetItems(string projectId, string playerId, List<string> keys = null, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    List<string> keys

    The keys to retrieve, in exploded form style, e.g. keys=KEY1&keys=KEY2&keys=KEY3. (optional)

    string after

    The key after which to retrieve the next page of keys. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetItemsResponse>

    The operation

    GetKeys(string, string, string, CancellationToken)

    Get Player Keys Gets a paged list of keys for the given player, ordered alphabetically in pages of 100.

    Declaration
    public ApiOperation<GetKeysResponse> GetKeys(string projectId, string playerId, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    string after

    Returns the page of results after the key specified. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetKeysResponse>

    The operation

    GetPrivateCustomItems(string, string, List<string>, string, CancellationToken)

    Get Private Custom Items Retrieves private save data values for all keys specified, ordered alphabetically in pages of 20. If no keys are supplied then returns all keys, ordered alphabetically in pages of 20. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation<GetItemsResponse> GetPrivateCustomItems(string projectId, string customId, List<string> keys = null, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    List<string> keys

    The keys to retrieve, in exploded form style, e.g. keys=KEY1&keys=KEY2&keys=KEY3. (optional)

    string after

    The key after which to retrieve the next page of keys. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetItemsResponse>

    The operation

    GetPrivateCustomKeys(string, string, string, CancellationToken)

    Get Private Custom Keys Gets a paged list of private keys for the given custom ID, ordered alphabetically in pages of 100. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation<GetKeysResponse> GetPrivateCustomKeys(string projectId, string customId, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    string after

    Returns the page of results after the key specified. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetKeysResponse>

    The operation

    GetProtectedItems(string, string, List<string>, string, CancellationToken)

    Get Protected Player Items Retrieves protected save data values for all keys specified, ordered alphabetically in pages of 20. If no keys are supplied then returns all keys, ordered alphabetically in pages of 20.

    Declaration
    public ApiOperation<GetItemsResponse> GetProtectedItems(string projectId, string playerId, List<string> keys = null, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    List<string> keys

    The keys to retrieve, in exploded form style, e.g. keys=KEY1&keys=KEY2&keys=KEY3. (optional)

    string after

    The key after which to retrieve the next page of keys. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetItemsResponse>

    The operation

    GetProtectedKeys(string, string, string, CancellationToken)

    Get Protected Player Keys Gets a paged list of protected keys for the given player, ordered alphabetically in pages of 100.

    Declaration
    public ApiOperation<GetKeysResponse> GetProtectedKeys(string projectId, string playerId, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    string after

    Returns the page of results after the key specified. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetKeysResponse>

    The operation

    GetPublicItems(string, string, List<string>, string, CancellationToken)

    Get Public Player Items Retrieves saved data values for all keys specified, ordered alphabetically in pages of 20. If no keys are supplied then returns all keys, ordered alphabetically in pages of 20. Accessible by any player for any other player's data.

    Declaration
    public ApiOperation<GetItemsResponse> GetPublicItems(string projectId, string playerId, List<string> keys = null, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    List<string> keys

    The keys to retrieve, in exploded form style, e.g. keys=KEY1&keys=KEY2&keys=KEY3. (optional)

    string after

    The key after which to retrieve the next page of keys. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetItemsResponse>

    The operation

    GetPublicKeys(string, string, string, CancellationToken)

    Get Public Player Keys Gets a paged list of public keys for the given player, ordered alphabetically in pages of 100. Accessible by any player for any other player's data.

    Declaration
    public ApiOperation<GetKeysResponse> GetPublicKeys(string projectId, string playerId, string after = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    string after

    Returns the page of results after the key specified. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<GetKeysResponse>

    The operation

    QueryDefaultCustomData(string, QueryIndexBody, CancellationToken)

    Query Default Custom Data Query custom data with the default access class. If no index is available to fulfil the query then the query will fail

    Declaration
    public ApiOperation<QueryIndexResponse> QueryDefaultCustomData(string projectId, QueryIndexBody queryIndexBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    QueryIndexBody queryIndexBody

    Query object with an array of conditions to query the data with. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<QueryIndexResponse>

    The operation

    QueryDefaultPlayerData(string, QueryIndexBody, CancellationToken)

    Query Default Player Data Query player data with the default access class. If no index is available to fulfil the query then the query will fail.

    Declaration
    public ApiOperation<QueryIndexResponse> QueryDefaultPlayerData(string projectId, QueryIndexBody queryIndexBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    QueryIndexBody queryIndexBody

    Query object with an array of conditions to query the data with. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<QueryIndexResponse>

    The operation

    QueryPrivateCustomData(string, QueryIndexBody, CancellationToken)

    Query Private Custom Data Query custom data with the private access class. If no index is available to fulfil the query then the query will fail.

    Declaration
    public ApiOperation<QueryIndexResponse> QueryPrivateCustomData(string projectId, QueryIndexBody queryIndexBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    QueryIndexBody queryIndexBody

    Query object with an array of conditions to query the data with. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<QueryIndexResponse>

    The operation

    QueryProtectedPlayerData(string, QueryIndexBody, CancellationToken)

    Query Protected Player Data Query player data with the protected access class. If no index is available to fulfil the query then the query will fail.

    Declaration
    public ApiOperation<QueryIndexResponse> QueryProtectedPlayerData(string projectId, QueryIndexBody queryIndexBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    QueryIndexBody queryIndexBody

    Query object with an array of conditions to query the data with. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<QueryIndexResponse>

    The operation

    QueryPublicPlayerData(string, QueryIndexBody, CancellationToken)

    Query Public Player Data Query player data with the public access class. If no index is available to fulfil the query then the query will fail.

    Declaration
    public ApiOperation<QueryIndexResponse> QueryPublicPlayerData(string projectId, QueryIndexBody queryIndexBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    QueryIndexBody queryIndexBody

    Query object with an array of conditions to query the data with. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<QueryIndexResponse>

    The operation

    SetCustomItem(string, string, SetItemBody, CancellationToken)

    Set Custom Item Set a data item with a given key and value for the specified custom ID. The value is limited to a maximum size of 5 MB across all default access level slots. The entire default access level saved state for a custom ID is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation<SetItemResponse> SetCustomItem(string projectId, string customId, SetItemBody setItemBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    SetItemBody setItemBody

    Add a data item to store for a custom ID. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemResponse>

    The operation

    SetCustomItemBatch(string, string, SetItemBatchBody, CancellationToken)

    Set Custom Item Batch Set up to 20 data items with key, value and optional writeLock against the custom ID. The values are limited to a maximum size of 5 MB across all default access level slots for the custom ID. The entire default access level saved state for a custom ID is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. The batch set operation is considered atomic and if any of the set key operation fails, the entire operation is failed. Error responses should identify the affected key operations that failed. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation<SetItemBatchResponse> SetCustomItemBatch(string projectId, string customId, SetItemBatchBody setItemBatchBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    SetItemBatchBody setItemBatchBody

    Set batch data items for a custom ID. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemBatchResponse>

    The operation

    SetItem(string, string, SetItemBody, CancellationToken)

    Set Player Item Set a data item with a given key and value for the specified player. The value is limited to a maximum size of 5 MB across all default access level slots. The entire default access level saved state for a player is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error.

    Declaration
    public ApiOperation<SetItemResponse> SetItem(string projectId, string playerId, SetItemBody setItemBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    SetItemBody setItemBody

    Add a data item to store for a player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemResponse>

    The operation

    SetItemBatch(string, string, SetItemBatchBody, CancellationToken)

    Set Player Item Batch Set up to 20 data items with key, value and optional writeLock for the given player. The values are limited to a maximum size of 5 MB across all default access level slots for the player. The entire default access level saved state for a player is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. The batch set operation is considered atomic and if any of the set key operation fails, the entire operation is failed. Error responses should identify the affected key operations that failed.

    Declaration
    public ApiOperation<SetItemBatchResponse> SetItemBatch(string projectId, string playerId, SetItemBatchBody setItemBatchBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    SetItemBatchBody setItemBatchBody

    Set batch data items for a player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemBatchResponse>

    The operation

    SetPrivateCustomItem(string, string, SetItemBody, CancellationToken)

    Set Private Custom Item Set a private data item with a given key and value for the specified custom ID. The value is limited to a maximum size of 5 MB across all private access level slots. The entire private saved state for a custom ID is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation<SetItemResponse> SetPrivateCustomItem(string projectId, string customId, SetItemBody setItemBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    SetItemBody setItemBody

    Add a data item to store for a custom ID. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemResponse>

    The operation

    SetPrivateCustomItemBatch(string, string, SetItemBatchBody, CancellationToken)

    Set Private Custom Item Batch Set up to 20 private data items with key, value and optional writeLock against the custom ID. The values are limited to a maximum size of 5 MB across all private access level slots for the custom ID. The entire private saved state for a custom ID is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. The batch set operation is considered atomic and if any of the set key operation fails, the entire operation is failed. Error responses should identify the affected key operations that failed. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation<SetItemBatchResponse> SetPrivateCustomItemBatch(string projectId, string customId, SetItemBatchBody setItemBatchBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string customId

    The custom data ID specified by the user. Must be between 1 and 50 characters long and contain only alphanumeric characters, underscores, and hyphens.

    SetItemBatchBody setItemBatchBody

    Set batch data items for a custom ID. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemBatchResponse>

    The operation

    SetProtectedItem(string, string, SetItemBody, CancellationToken)

    Set Protected Player Item Set a protected data item with a given key and value for the specified player. The value is limited to a maximum size of 5 MB across all protected access level slots. The entire protected saved state for a player is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation<SetItemResponse> SetProtectedItem(string projectId, string playerId, SetItemBody setItemBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    SetItemBody setItemBody

    Add a data item to store for a player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemResponse>

    The operation

    SetProtectedItemBatch(string, string, SetItemBatchBody, CancellationToken)

    Set Protected Player Item Batch Set up to 20 protected data items with key, value and optional writeLock for the given player. The values are limited to a maximum size of 5 MB across all slots for the player. The entire protected saved state for a player is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. The batch set operation is considered atomic and if any of the set key operation fails, the entire operation is failed. Error responses should identify the affected key operations that failed. Only accessible via an authenticated server authority.

    Declaration
    public ApiOperation<SetItemBatchResponse> SetProtectedItemBatch(string projectId, string playerId, SetItemBatchBody setItemBatchBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    SetItemBatchBody setItemBatchBody

    Set batch data items for a player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemBatchResponse>

    The operation

    SetPublicItem(string, string, SetItemBody, CancellationToken)

    Set Public Player Item Set a public data item with a given key and value for the specified player. The value is limited to a maximum size of 5 MB across all public access level slots. The entire public saved state for a player is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. The value set will be publicly readable by any player.

    Declaration
    public ApiOperation<SetItemResponse> SetPublicItem(string projectId, string playerId, SetItemBody setItemBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    SetItemBody setItemBody

    Add a data item to store for a player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemResponse>

    The operation

    SetPublicItemBatch(string, string, SetItemBatchBody, CancellationToken)

    Set Public Player Item Batch Set up to 20 public data items with key, value and optional writeLock for the given player. The values are limited to a maximum size of 5 MB across all slots for the player. The entire public saved state for a player is limited to 2000 keys. Attempting to set a new key beyond this limit will result in an error. The batch set operation is considered atomic and if any of the set key operation fails, the entire operation is failed. Error responses should identify the affected key operations that failed.

    Declaration
    public ApiOperation<SetItemBatchResponse> SetPublicItemBatch(string projectId, string playerId, SetItemBatchBody setItemBatchBody = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    The player ID supplied by the Authorization service.

    SetItemBatchBody setItemBatchBody

    Set batch data items for a player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<SetItemBatchResponse>

    The operation

    Implements

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