Loading...
Searching...
No Matches
AccelByte::Api::BinaryCloudSave Class Reference

CloudSave API for storing binaries. More...

#include <AccelByteBinaryCloudSaveApi.h>

Inheritance diagram for AccelByte::Api::BinaryCloudSave:

Public Member Functions

 BinaryCloudSave (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr)
 BinaryCloudSave (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
FAccelByteTaskWPtr SaveUserBinaryRecord (FString const &Key, FString const &FileType, bool bIsPublic, FVoidHandler const &OnSuccess, FErrorHandler const &OnError)
 Save a namespace-level user binary. If the binary doesn't exist, it will create the binary save, if already exists, it will append to the existing one.
FAccelByteTaskWPtr SaveUserBinaryRecord (FString const &Key, EAccelByteFileType FileType, bool bIsPublic, FVoidHandler const &OnSuccess, FErrorHandler const &OnError)
 Save a namespace-level user binary. If the binary doesn't exist, it will create the binary save, if already exists, it will append to the existing one.
FAccelByteTaskWPtr GetCurrentUserBinaryRecord (FString const &Key, THandler< FAccelByteModelsUserBinaryRecord > const &OnSuccess, FErrorHandler const &OnError)
 Get current user's binary record by its key in namespace-level.
FAccelByteTaskWPtr GetPublicUserBinaryRecord (FString const &Key, FString const &UserId, THandler< FAccelByteModelsUserBinaryRecord > const &OnSuccess, FErrorHandler const &OnError)
 Get a user's public binary record by its key and the owner's UserId in namespace-level.
FAccelByteTaskWPtr BulkGetCurrentUserBinaryRecords (const TArray< FString > &Keys, THandler< FAccelByteModelsListUserBinaryRecords > const &OnSuccess, FErrorHandler const &OnError)
 Bulk get current user's binary records by their keys.
FAccelByteTaskWPtr BulkGetPublicUserBinaryRecords (const TArray< FString > &Keys, FString const &UserId, THandler< FAccelByteModelsListUserBinaryRecords > const &OnSuccess, FErrorHandler const &OnError)
 Bulk get multiple public binary records from a single user by their keys.
FAccelByteTaskWPtr BulkGetPublicUserBinaryRecords (FString const &Key, const TArray< FString > &UserIds, THandler< FAccelByteModelsListUserBinaryRecords > const &OnSuccess, FErrorHandler const &OnError)
 Bulk get public binary records with the same key from multiple users.
FAccelByteTaskWPtr BulkQueryCurrentUserBinaryRecords (FString const &Query, THandler< FAccelByteModelsPaginatedUserBinaryRecords > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20)
 Bulk query current user's binary records.
FAccelByteTaskWPtr BulkQueryPublicUserBinaryRecords (FString const &UserId, THandler< FAccelByteModelsPaginatedUserBinaryRecords > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20)
 Bulk query all of a user's public binary records.
FAccelByteTaskWPtr UpdateUserBinaryRecordFile (FString const &Key, FString const &FileType, FString const &FileLocation, THandler< FAccelByteModelsUserBinaryRecord > const &OnSuccess, FErrorHandler const &OnError)
 Update current user's binary record to point to an uploaded file.
FAccelByteTaskWPtr UpdateUserBinaryRecordFile (FString const &Key, EAccelByteFileType ContentType, FString const &FileLocation, THandler< FAccelByteModelsUserBinaryRecord > const &OnSuccess, FErrorHandler const &OnError)
 Update current user's binary record to point to an uploaded file.
FAccelByteTaskWPtr UpdateUserBinaryRecordMetadata (FString const &Key, bool bIsPublic, THandler< FAccelByteModelsUserBinaryRecord > const &OnSuccess, FErrorHandler const &OnError)
 Update current user's binary record's metadata in namespace-level.
FAccelByteTaskWPtr DeleteUserBinaryRecord (FString const &Key, FVoidHandler const &OnSuccess, FErrorHandler const &OnError)
 Delete current user's binary record under the given key in namespace-level.
FAccelByteTaskWPtr RequestUserBinaryRecordPresignedUrl (FString const &Key, FString const &FileType, THandler< FAccelByteModelsBinaryInfo > const &OnSuccess, FErrorHandler const &OnError)
 Request a presigned url to upload current user's binary record file.
FAccelByteTaskWPtr RequestUserBinaryRecordPresignedUrl (FString const &Key, EAccelByteFileType FileType, THandler< FAccelByteModelsBinaryInfo > const &OnSuccess, FErrorHandler const &OnError)
 Request a presigned url to upload current user's binary record file.
FAccelByteTaskWPtr GetGameBinaryRecord (FString const &Key, THandler< FAccelByteModelsGameBinaryRecord > const &OnSuccess, FErrorHandler const &OnError)
 Get a game binary record by its key.
FAccelByteTaskWPtr BulkGetGameBinaryRecords (TArray< FString > const &Keys, THandler< FAccelByteModelsListGameBinaryRecords > const &OnSuccess, FErrorHandler const &OnError)
 Bulk get game binary records by their keys.
FAccelByteTaskWPtr BulkQueryGameBinaryRecords (FString const &Query, THandler< FAccelByteModelsPaginatedGameBinaryRecords > const &OnSuccess, FErrorHandler const &OnError, int32 const &Offset=0, int32 const &Limit=20)
 Bulk query game binary records.
Public Member Functions inherited from AccelByte::FApiBase
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
void SetApiClient (TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)

Additional Inherited Members

Protected Member Functions inherited from AccelByte::FApiBase
template<typename T>
bool ValidateAccelByteId (FString const &Id, EAccelByteIdHypensRule HypenRule, FString const &ErrorMessage, T const &OnError)
Protected Attributes inherited from AccelByte::FApiBase
TSharedRef< Credentials const, ESPMode::ThreadSafe > CredentialsRef
Settings const & SettingsRef
FHttpRetrySchedulerBaseHttpRef
FHttpClient HttpClient
FAccelBytePlatformPtr AccelBytePlatformPtr

Detailed Description

CloudSave API for storing binaries.

Member Function Documentation

◆ BulkGetCurrentUserBinaryRecords()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::BulkGetCurrentUserBinaryRecords ( const TArray< FString > & Keys,
THandler< FAccelByteModelsListUserBinaryRecords > const & OnSuccess,
FErrorHandler const & OnError )

Bulk get current user's binary records by their keys.

Parameters
KeysList of keys of the binary records.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsListUserBinaryRecords&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ BulkGetGameBinaryRecords()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::BulkGetGameBinaryRecords ( TArray< FString > const & Keys,
THandler< FAccelByteModelsListGameBinaryRecords > const & OnSuccess,
FErrorHandler const & OnError )

Bulk get game binary records by their keys.

Parameters
KeysList of keys of the binary record.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsListGameBinaryRecords&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ BulkGetPublicUserBinaryRecords() [1/2]

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::BulkGetPublicUserBinaryRecords ( const TArray< FString > & Keys,
FString const & UserId,
THandler< FAccelByteModelsListUserBinaryRecords > const & OnSuccess,
FErrorHandler const & OnError )

Bulk get multiple public binary records from a single user by their keys.

Parameters
KeysList of key(s) of the binary record.
UserIdUserId of the binary record owner.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsListUserBinaryRecords&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ BulkGetPublicUserBinaryRecords() [2/2]

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::BulkGetPublicUserBinaryRecords ( FString const & Key,
const TArray< FString > & UserIds,
THandler< FAccelByteModelsListUserBinaryRecords > const & OnSuccess,
FErrorHandler const & OnError )

Bulk get public binary records with the same key from multiple users.

Parameters
KeyKey of the binary record.
UserIdsUserId list of the binary record owner(s).
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsListUserBinaryRecords&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ BulkQueryCurrentUserBinaryRecords()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::BulkQueryCurrentUserBinaryRecords ( FString const & Query,
THandler< FAccelByteModelsPaginatedUserBinaryRecords > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20 )

Bulk query current user's binary records.

Parameters
QueryString that will be used to query the user's keys.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedUserBinaryRecords&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the result. Default value is 0.
LimitThe limit of the result. Default value is 20.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ BulkQueryGameBinaryRecords()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::BulkQueryGameBinaryRecords ( FString const & Query,
THandler< FAccelByteModelsPaginatedGameBinaryRecords > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20 )

Bulk query game binary records.

Parameters
QueryString that will be used to query the game's binary record keys.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedGameBinaryRecords&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the result. Default value is 0.
LimitThe limit of the result. Default value is 20.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ BulkQueryPublicUserBinaryRecords()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::BulkQueryPublicUserBinaryRecords ( FString const & UserId,
THandler< FAccelByteModelsPaginatedUserBinaryRecords > const & OnSuccess,
FErrorHandler const & OnError,
int32 const & Offset = 0,
int32 const & Limit = 20 )

Bulk query all of a user's public binary records.

Parameters
UserIdUserId of the binary record owner.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPaginatedUserBinaryRecords&.
OnErrorThis will be called when the operation failed.
OffsetThe offset of the result. Default value is 0.
LimitThe limit of the result. Default value is 20.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ DeleteUserBinaryRecord()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::DeleteUserBinaryRecord ( FString const & Key,
FVoidHandler const & OnSuccess,
FErrorHandler const & OnError )

Delete current user's binary record under the given key in namespace-level.

Parameters
KeyKey of the binary record.
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetCurrentUserBinaryRecord()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::GetCurrentUserBinaryRecord ( FString const & Key,
THandler< FAccelByteModelsUserBinaryRecord > const & OnSuccess,
FErrorHandler const & OnError )

Get current user's binary record by its key in namespace-level.

Parameters
KeyKey of the binary record.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsUserBinaryRecord&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetGameBinaryRecord()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::GetGameBinaryRecord ( FString const & Key,
THandler< FAccelByteModelsGameBinaryRecord > const & OnSuccess,
FErrorHandler const & OnError )

Get a game binary record by its key.

Parameters
KeyKey of the binary record.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsGameBinaryRecord&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetPublicUserBinaryRecord()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::GetPublicUserBinaryRecord ( FString const & Key,
FString const & UserId,
THandler< FAccelByteModelsUserBinaryRecord > const & OnSuccess,
FErrorHandler const & OnError )

Get a user's public binary record by its key and the owner's UserId in namespace-level.

Parameters
KeyKey of the binary record.
UserIdUserId of the binary record owner.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsUserBinaryRecord&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ RequestUserBinaryRecordPresignedUrl() [1/2]

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::RequestUserBinaryRecordPresignedUrl ( FString const & Key,
EAccelByteFileType FileType,
THandler< FAccelByteModelsBinaryInfo > const & OnSuccess,
FErrorHandler const & OnError )

Request a presigned url to upload current user's binary record file.

Parameters
KeyKey of the binary record.
FileTypeFile type of the binary (supported file types are jpeg, jpg, png, bmp, gif, mp3, webp, and bin).
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ RequestUserBinaryRecordPresignedUrl() [2/2]

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::RequestUserBinaryRecordPresignedUrl ( FString const & Key,
FString const & FileType,
THandler< FAccelByteModelsBinaryInfo > const & OnSuccess,
FErrorHandler const & OnError )

Request a presigned url to upload current user's binary record file.

Parameters
KeyKey of the binary record.
FileTypeFile type of the binary (supported file types are jpeg, jpg, png, bmp, gif, mp3, webp, and bin).
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ SaveUserBinaryRecord() [1/2]

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::SaveUserBinaryRecord ( FString const & Key,
EAccelByteFileType FileType,
bool bIsPublic,
FVoidHandler const & OnSuccess,
FErrorHandler const & OnError )

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

Parameters
KeyKey of the binary record.
FileTypeFile type of the binary (supported file types are jpeg, jpg, png, bmp, gif, mp3, webp, and bin).
bIsPublicWhether to save the binary as a public or private record.
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ SaveUserBinaryRecord() [2/2]

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::SaveUserBinaryRecord ( FString const & Key,
FString const & FileType,
bool bIsPublic,
FVoidHandler const & OnSuccess,
FErrorHandler const & OnError )

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

Parameters
KeyKey of the binary record.
FileTypeFile type of the binary (supported file types are jpeg, jpg, png, bmp, gif, mp3, webp, and bin).
bIsPublicWhether to save the binary as a public or private record.
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UpdateUserBinaryRecordFile() [1/2]

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::UpdateUserBinaryRecordFile ( FString const & Key,
EAccelByteFileType ContentType,
FString const & FileLocation,
THandler< FAccelByteModelsUserBinaryRecord > const & OnSuccess,
FErrorHandler const & OnError )

Update current user's binary record to point to an uploaded file.

Parameters
KeyKey of the binary record.
ContentTypeThe specific type of the binary record created.
FileLocationLocation of the uploaded binary file.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsUserBinaryRecord&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UpdateUserBinaryRecordFile() [2/2]

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::UpdateUserBinaryRecordFile ( FString const & Key,
FString const & FileType,
FString const & FileLocation,
THandler< FAccelByteModelsUserBinaryRecord > const & OnSuccess,
FErrorHandler const & OnError )

Update current user's binary record to point to an uploaded file.

Parameters
KeyKey of the binary record.
FileTypeFile type of the uploaded binary (supported file types are jpeg, jpg, png, bmp, gif, mp3, webp, and bin).
FileLocationLocation of the uploaded binary file.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsUserBinaryRecord&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ UpdateUserBinaryRecordMetadata()

FAccelByteTaskWPtr AccelByte::Api::BinaryCloudSave::UpdateUserBinaryRecordMetadata ( FString const & Key,
bool bIsPublic,
THandler< FAccelByteModelsUserBinaryRecord > const & OnSuccess,
FErrorHandler const & OnError )

Update current user's binary record's metadata in namespace-level.

Parameters
KeyKey of the binary record.
IsPublicWhether to update the binary into a public or private record.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsUserBinaryRecord&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.