Loading...
Searching...
No Matches
AccelByte.Api.CloudSave Class Reference

Provide an API to access CloudSave service. More...

Inheritance diagram for AccelByte.Api.CloudSave:

Public Member Functions

void SaveUserRecord (string key, Dictionary< string, object > recordRequest, bool isPublic, ResultCallback callback)
 Save a user-level record. If the record doesn't exist, it will create and save the record, if already exists, it will append to the existing one.
void SaveUserRecord (string key, Dictionary< string, object > recordRequest, ResultCallback callback, bool isPublic=false)
 Save a user-level record. If the record doesn't exist, it will create and save the record, if already exists, it will append to the existing one.
void GetUserRecord (string key, ResultCallback< UserRecord > callback)
 Get a record (arbitrary JSON data) by its key in user-level.
void GetPublicUserRecord (string key, string userId, ResultCallback< UserRecord > callback)
 Get other user's public record (arbitrary JSON data) by its key in user-level.
void ReplaceUserRecord (string key, Dictionary< string, object > recordRequest, bool isPublic, ResultCallback callback)
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.
void ReplaceUserRecord (string key, Dictionary< string, object > recordRequest, ResultCallback callback, bool isPublic=false)
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.
void ReplaceUserRecord (string key, bool setPublic, Dictionary< string, object > recordRequest, ResultCallback callback)
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.
void ReplaceUserRecordCheckLatest (string key, DateTime lastUpdated, Dictionary< string, object > recordRequest, ResultCallback callback)
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one, but will failed if lastUpdated is not up-to-date.
void ReplaceUserRecordCheckLatest (int tryAttempt, string key, Dictionary< string, object > recordRequest, ResultCallback callback, Func< Dictionary< string, object >, Dictionary< string, object > > payloadModifier)
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one. Beware: Function will try to get the latest value, put it in the custom modifier and request to replace the record. will retry it again when the record is updated by other user, until exhaust all the attempt.
void ReplaceUserRecordCheckLatestWithResponse (string key, DateTime lastUpdated, Dictionary< string, object > recordRequest, ResultCallback< ConcurrentReplaceUserRecordResponse > callback)
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one, but will failed if lastUpdated is not up-to-date.
void ReplaceUserRecordCheckLatestWithResponse (int tryAttempt, string key, Dictionary< string, object > recordRequest, ResultCallback< ConcurrentReplaceUserRecordResponse > callback, Func< Dictionary< string, object >, Dictionary< string, object > > payloadModifier)
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one. Beware: Function will try to get the latest value, put it in the custom modifier and request to replace the record. will retry it again when the record is updated by other user, until exhaust all the attempt.
void DeleteUserRecord (string key, ResultCallback callback)
 Delete a record under the given key in user-level.
void SaveGameRecord (string key, Dictionary< string, object > recordRequest, ResultCallback callback)
 Save a namespace-level record. If the record doesn't exist, it will create and save the record, if already exists, it will append to the existing one.
void GetGameRecord (string key, ResultCallback< GameRecord > callback)
 Get a record by its key in namespace-level.
void ReplaceGameRecord (string key, Dictionary< string, object > recordRequest, ResultCallback callback)
 Replace a record in namespace-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.
void ReplaceGameRecordCheckLatest (string key, DateTime lastUpdated, Dictionary< string, object > recordRequest, ResultCallback callback)
 Replace a record in namespace-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one, but will failed if lastUpdated is not up-to-date.
void ReplaceGameRecordCheckLatest (int tryAttempt, string key, Dictionary< string, object > recordRequest, ResultCallback callback, Func< Dictionary< string, object >, Dictionary< string, object > > payloadModifier)
 Replace a record in namespace-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one. Beware: Function will try to get the latest value, put it in the custom modifier and request to replace the record. will retry it again when the record is updated by other user, until exhaust all the attempt.
void DeleteGameRecord (string key, ResultCallback callback)
 Delete a record under the given key in namespace-level.
void BulkGetUserRecords (string[] keys, ResultCallback< UserRecords > callback)
 Bulk get user records by keys.
void BulkGetPublicUserRecord (string key, string[] userIds, ResultCallback< UserRecords > callback)
 Bulk get public user records by multiple userIds and keys.
void BulkGetGameRecords (string[] keys, ResultCallback< GameRecords > callback)
 Bulk get game records by keys.
void BulkGetOtherPlayerPublicRecordKeys (string userId, ResultCallback< PaginatedBulkGetPublicUserRecordKeys > callback, int offset=0, int limit=20)
 Bulk get other user public record keys.
void BulkGetOtherPlayerPublicRecords (string userId, BulkGetRecordsByKeyRequest data, ResultCallback< UserRecords > callback)
 Bulk get other user public records by keys.

Additional Inherited Members

Properties inherited from AccelByte.Core.WrapperBase
Utils.AccelByteIdValidator IdValidator [get]

Detailed Description

Provide an API to access CloudSave service.

Member Function Documentation

◆ BulkGetGameRecords()

void AccelByte.Api.CloudSave.BulkGetGameRecords ( string[] keys,
ResultCallback< GameRecords > callback )
inline

Bulk get game records by keys.

Parameters
keysKeys of records
callbackReturns a Result that contains GameRecords via callback when completed

◆ BulkGetOtherPlayerPublicRecordKeys()

void AccelByte.Api.CloudSave.BulkGetOtherPlayerPublicRecordKeys ( string userId,
ResultCallback< PaginatedBulkGetPublicUserRecordKeys > callback,
int offset = 0,
int limit = 20 )
inline

Bulk get other user public record keys.

Parameters
userIdUserId of the record owner
callbackReturns a Result that contains GameRecords via callback when completed
offsetThe offset of the public record keys. Default value is 0.
limitThe limit of the public record keys. Default value is 20.

◆ BulkGetOtherPlayerPublicRecords()

void AccelByte.Api.CloudSave.BulkGetOtherPlayerPublicRecords ( string userId,
BulkGetRecordsByKeyRequest data,
ResultCallback< UserRecords > callback )
inline

Bulk get other user public records by keys.

Parameters
userIdUserId of the record owner
dataData struct to list Key of record
callbackReturns a Result that contains GameRecords via callback when completed

◆ BulkGetPublicUserRecord()

void AccelByte.Api.CloudSave.BulkGetPublicUserRecord ( string key,
string[] userIds,
ResultCallback< UserRecords > callback )
inline

Bulk get public user records by multiple userIds and keys.

Parameters
keyKeys of records
userIdsCollection of AccelByte Ids
callbackReturns a result that contains UserRecords

◆ BulkGetUserRecords()

void AccelByte.Api.CloudSave.BulkGetUserRecords ( string[] keys,
ResultCallback< UserRecords > callback )
inline

Bulk get user records by keys.

Parameters
keysKeys of records
callbackReturns a Result that contains UserRecords via callback when completed

◆ DeleteGameRecord()

void AccelByte.Api.CloudSave.DeleteGameRecord ( string key,
ResultCallback callback )
inline

Delete a record under the given key in namespace-level.

Parameters
keyKey of record
callbackReturns a Result via callback when completed

◆ DeleteUserRecord()

void AccelByte.Api.CloudSave.DeleteUserRecord ( string key,
ResultCallback callback )
inline

Delete a record under the given key in user-level.

Parameters
keyKey of record
callbackReturns a Result via callback when completed

◆ GetGameRecord()

void AccelByte.Api.CloudSave.GetGameRecord ( string key,
ResultCallback< GameRecord > callback )
inline

Get a record by its key in namespace-level.

Parameters
keyKey of record
callbackReturns a Result that contains GameRecord via callback when completed

◆ GetPublicUserRecord()

void AccelByte.Api.CloudSave.GetPublicUserRecord ( string key,
string userId,
ResultCallback< UserRecord > callback )
inline

Get other user's public record (arbitrary JSON data) by its key in user-level.

Parameters
keyKey of record
userIdUserId of the record owner
callbackReturns a Result that contains UserRecord via callback when completed

◆ GetUserRecord()

void AccelByte.Api.CloudSave.GetUserRecord ( string key,
ResultCallback< UserRecord > callback )
inline

Get a record (arbitrary JSON data) by its key in user-level.

Parameters
keyKey of record
callbackReturns a Result that contains UserRecord via callback when completed

◆ ReplaceGameRecord()

void AccelByte.Api.CloudSave.ReplaceGameRecord ( string key,
Dictionary< string, object > recordRequest,
ResultCallback callback )
inline

Replace a record in namespace-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.

Parameters
keyKey of record
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed

◆ ReplaceGameRecordCheckLatest() [1/2]

void AccelByte.Api.CloudSave.ReplaceGameRecordCheckLatest ( int tryAttempt,
string key,
Dictionary< string, object > recordRequest,
ResultCallback callback,
Func< Dictionary< string, object >, Dictionary< string, object > > payloadModifier )
inline

Replace a record in namespace-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one. Beware: Function will try to get the latest value, put it in the custom modifier and request to replace the record. will retry it again when the record is updated by other user, until exhaust all the attempt.

Parameters
tryAttemptAttempt to try to replace the game record.
keyKey of record
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed
payloadModifierFunction to modify the latest record value with your customized modifier.

◆ ReplaceGameRecordCheckLatest() [2/2]

void AccelByte.Api.CloudSave.ReplaceGameRecordCheckLatest ( string key,
DateTime lastUpdated,
Dictionary< string, object > recordRequest,
ResultCallback callback )
inline

Replace a record in namespace-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one, but will failed if lastUpdated is not up-to-date.

Parameters
keyKey of record
lastUpdatedlast time the record is updated. Retrieve it from GetGameRecord.
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed

◆ ReplaceUserRecord() [1/3]

void AccelByte.Api.CloudSave.ReplaceUserRecord ( string key,
bool setPublic,
Dictionary< string, object > recordRequest,
ResultCallback callback )
inline

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.

Parameters
keyKey of record
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed
setPublicUsing metadata, True if you want the record can be accessed by other user. Default is false

◆ ReplaceUserRecord() [2/3]

void AccelByte.Api.CloudSave.ReplaceUserRecord ( string key,
Dictionary< string, object > recordRequest,
bool isPublic,
ResultCallback callback )
inline

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.

Parameters
keyKey of record
recordRequestThe request of the record with JSON formatted.
isPublicTrue if you want the record can be accessed by other user
callbackReturns a Result via callback when completed

◆ ReplaceUserRecord() [3/3]

void AccelByte.Api.CloudSave.ReplaceUserRecord ( string key,
Dictionary< string, object > recordRequest,
ResultCallback callback,
bool isPublic = false )
inline

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.

Parameters
keyKey of record
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed

◆ ReplaceUserRecordCheckLatest() [1/2]

void AccelByte.Api.CloudSave.ReplaceUserRecordCheckLatest ( int tryAttempt,
string key,
Dictionary< string, object > recordRequest,
ResultCallback callback,
Func< Dictionary< string, object >, Dictionary< string, object > > payloadModifier )
inline

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one. Beware: Function will try to get the latest value, put it in the custom modifier and request to replace the record. will retry it again when the record is updated by other user, until exhaust all the attempt.

Parameters
tryAttemptAttempt to try to replace the game record.
keyKey of record
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed
payloadModifierFunction to modify the latest record value with your customized modifier.

◆ ReplaceUserRecordCheckLatest() [2/2]

void AccelByte.Api.CloudSave.ReplaceUserRecordCheckLatest ( string key,
DateTime lastUpdated,
Dictionary< string, object > recordRequest,
ResultCallback callback )
inline

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one, but will failed if lastUpdated is not up-to-date.

Parameters
keyKey of record
lastUpdatedlast time the record is updated. Retrieve it from GetGameRecord.
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed

◆ ReplaceUserRecordCheckLatestWithResponse() [1/2]

void AccelByte.Api.CloudSave.ReplaceUserRecordCheckLatestWithResponse ( int tryAttempt,
string key,
Dictionary< string, object > recordRequest,
ResultCallback< ConcurrentReplaceUserRecordResponse > callback,
Func< Dictionary< string, object >, Dictionary< string, object > > payloadModifier )
inline

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one. Beware: Function will try to get the latest value, put it in the custom modifier and request to replace the record. will retry it again when the record is updated by other user, until exhaust all the attempt.

Parameters
tryAttemptAttempt to try to replace the game record.
keyKey of record
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed
payloadModifierFunction to modify the latest record value with your customized modifier.

◆ ReplaceUserRecordCheckLatestWithResponse() [2/2]

void AccelByte.Api.CloudSave.ReplaceUserRecordCheckLatestWithResponse ( string key,
DateTime lastUpdated,
Dictionary< string, object > recordRequest,
ResultCallback< ConcurrentReplaceUserRecordResponse > callback )
inline

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one, but will failed if lastUpdated is not up-to-date.

Parameters
keyKey of record
lastUpdatedlast time the record is updated. Retrieve it from GetGameRecord.
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed

◆ SaveGameRecord()

void AccelByte.Api.CloudSave.SaveGameRecord ( string key,
Dictionary< string, object > recordRequest,
ResultCallback callback )
inline

Save a namespace-level record. If the record doesn't exist, it will create and save the record, if already exists, it will append to the existing one.

Parameters
keyKey of record
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed

◆ SaveUserRecord() [1/2]

void AccelByte.Api.CloudSave.SaveUserRecord ( string key,
Dictionary< string, object > recordRequest,
bool isPublic,
ResultCallback callback )
inline

Save a user-level record. If the record doesn't exist, it will create and save the record, if already exists, it will append to the existing one.

Parameters
keyKey of record
recordRequestThe request of the record with JSON formatted.
isPublicTrue if you want the record can be accessed by other user
callbackReturns a Result via callback when completed

◆ SaveUserRecord() [2/2]

void AccelByte.Api.CloudSave.SaveUserRecord ( string key,
Dictionary< string, object > recordRequest,
ResultCallback callback,
bool isPublic = false )
inline

Save a user-level record. If the record doesn't exist, it will create and save the record, if already exists, it will append to the existing one.

Parameters
keyKey of record
recordRequestThe request of the record with JSON formatted.
callbackReturns a Result via callback when completed
isPublicTrue if you want the record can be accessed by other user. Default is false