跳到主要内容

Server PlayerBlobData API Reference

PGOS provides blob type PlayData to support the use of binary large objects in game.

API List

APIDescription
GetPBDInfoGet the player blob data information of the specified key.
UpdatePBDFromFileUpdate the player blob data from a local file.
CancelPBDUpdateCancel the update operation of the player blob data.

API Details

GetPBDInfo

Get the player blob data information of the specified key.

/// <summary>Get the player blob data information of the specified key.</summary>
/// <param name="player_id">The player to query.</param>
/// <param name="blob_key">The blob key to query.</param>
public void GetPBDInfo(string player_id, string blob_key, OnGetPBDInfo callback);

Parameters:

ParamTypeDescription
player_idstringThe player to query.
blob_keystringThe blob key to query.
callbackOnGetPBDInfo

Return: void

UpdatePBDFromFile

Update the player blob data from a local file.

/// <summary>Update the player blob data from a local file.</summary>
/// <param name="player_id">The player to update blob data.</param>
/// <param name="blob_key">The blob key to update.</param>
/// <param name="file_path">The full path to the file to upload. If it is not a UE project (FString), please pass in a full local path (not in utf8 format).</param>
/// <param name="progress_callback">Data transfer progress callback, which will be called in an ASYNCHRONOUS CHILD THREAD.</param>
public void UpdatePBDFromFile(string player_id, string blob_key, string file_path, OnUpdatePBDPro progress_callback, OnUpdatePBDFromFile callback);

Parameters:

ParamTypeDescription
player_idstringThe player to update blob data.
blob_keystringThe blob key to update.
file_pathstringThe full path to the file to upload. If it is not a UE project (FString), please pass in a full local path (not in utf8 format).
progress_callbackOnUpdatePBDProData transfer progress callback, which will be called in an ASYNCHRONOUS CHILD THREAD.
callbackOnUpdatePBDFromFile

Return: void

CancelPBDUpdate

Cancel the update operation of the player blob data.

/// <summary>Cancel the update operation of the player blob data.</summary>
/// <param name="player_id">The player to be cancelled from updating blob data.</param>
/// <param name="blob_key">The blob key to cancel the update.</param>
public void CancelPBDUpdate(string player_id, string blob_key, OnCancelPBDUpdate callback);

Parameters:

ParamTypeDescription
player_idstringThe player to be cancelled from updating blob data.
blob_keystringThe blob key to cancel the update.
callbackOnCancelPBDUpdate

Return: void

All Delegates

public delegate void OnGetPBDInfo(PgosResult a0, PlayerBlobDataInfo a1);
public delegate void OnUpdatePBDFromFile(PgosResult a0);
public delegate void OnUpdatePBDPro();
public delegate void OnCancelPBDUpdate(PgosResult a0);

Type Reference: