GS2-Dictionary SDK for Game Engine API リファレンス
モデル
EzEntryModel
エントリーモデル
エントリーモデルとは図鑑に記録するエンティティです。
ここではどんなエンティティが図鑑に記録可能かを定義します。
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128文字 | エントリー名 | ||
| metadata | string | ~ 2048文字 | メタデータ |
EzEntry
ゲームプレイヤーが入手したエントリー
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| entryId | string | ~ 1024文字 | エントリーGRN | |||
| userId | string | ~ 128文字 | ユーザーID | |||
| name | string | ✓ | ~ 128文字 | エントリー名 | ||
| acquiredAt | long | ✓ | 現在時刻 | 入手日時 (UNIX時間 単位:ミリ秒) |
EzLike
お気に入りに登録したエントリー
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| likeId | string | ~ 1024文字 | お気に入りエントリーGRN | |||
| userId | string | ~ 128文字 | ユーザーID | |||
| name | string | ✓ | ~ 128文字 | エントリー名 |
EzConfig
コンフィグ設定
トランザクションの変数に適用する設定値
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| key | string | ✓ | ~ 64文字 | 名前 | ||
| value | string | ~ 51200文字 | 値 |
メソッド
getEntryModel
エントリーモデル情報を取得
Request
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128文字 | ネームスペース名 | ||
| entryName | string | ✓ | ~ 128文字 | エントリー名 |
Result
| 型 | 説明 | |
|---|---|---|
| item | EzEntryModel | エントリーモデル |
実装例
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).EntryModel(
entryModelName: null
);
var item = await domain.ModelAsync(); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).EntryModel(
entryModelName: null
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->EntryModel(
nullptr // entryModelName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}値の変更イベントハンドリング
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).EntryModel(
entryModelName: null
);
// イベントハンドリングを開始
var callbackId = domain.Subscribe(
value => {
// 値が変化した時に呼び出される
// value には変更後の値が渡ってくる
}
);
// イベントハンドリングを停止
domain.Unsubscribe(callbackId); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).EntryModel(
entryModelName: null
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->EntryModel(
nullptr // entryModelName
);
// イベントハンドリングを開始
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Dictionary::Model::FEntryModel> value) {
// 値が変化した時に呼び出される
// value には変更後の値が渡ってくる
}
);
// イベントハンドリングを停止
Domain->Unsubscribe(CallbackId);Warning
このイベントはSDKがもつローカルキャッシュの値が変更された時に呼び出されます。
ローカルキャッシュは SDK が持つ API の実行、または GS2-Gateway の通知を有効にした GS2-Distributor 経由でのスタンプシートの実行、または GS2-Gateway の通知を有効にした GS2-JobQueue の実行によって変化したもののみが対象となります。
そのため、これらの方法以外で値が変更されてもコールバックは呼び出されません。
listEntryModels
エントリーモデル情報の一覧を取得
Request
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128文字 | ネームスペース名 |
Result
| 型 | 説明 | |
|---|---|---|
| items | List<EzEntryModel> | エントリーモデルのリスト |
実装例
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
);
var items = await domain.EntryModelsAsync(
).ToListAsync(); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.EntryModels(
);
List<EzEntryModel> items = new List<EzEntryModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
);
const auto It = Domain->EntryModels(
);
TArray<Gs2::UE5::Dictionary::Model::FEzEntryModelPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}値の変更イベントハンドリング
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
);
// イベントハンドリングを開始
var callbackId = domain.SubscribeEntryModels(
() => {
// リストの要素が変化した時に呼び出される
}
);
// イベントハンドリングを停止
domain.UnsubscribeEntryModels(callbackId); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.EntryModels(
);
List<EzEntryModel> items = new List<EzEntryModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
);
// イベントハンドリングを開始
const auto CallbackId = Domain->SubscribeEntryModels(
[]() {
// リストの要素が変化した時に呼び出される
}
);
// イベントハンドリングを停止
Domain->UnsubscribeEntryModels(CallbackId);Warning
このイベントはSDKがもつローカルキャッシュの値が変更された時に呼び出されます。
ローカルキャッシュは SDK が持つ API の実行、または GS2-Gateway の通知を有効にした GS2-Distributor 経由でのスタンプシートの実行、または GS2-Gateway の通知を有効にした GS2-JobQueue の実行によって変化したもののみが対象となります。
そのため、これらの方法以外で値が変更されてもコールバックは呼び出されません。
getEntry
エントリーを取得
Request
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128文字 | ネームスペース名 | ||
| accessToken | string | ✓ | ~ 128文字 | アクセストークン | ||
| entryModelName | string | ✓ | ~ 128文字 | エントリー名 |
Result
| 型 | 説明 | |
|---|---|---|
| item | EzEntry | エントリー |
実装例
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Entry(
entryModelName: "entry-0001"
);
var item = await domain.ModelAsync(); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Entry(
entryModelName: "entry-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Entry(
"entry-0001" // entryModelName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}値の変更イベントハンドリング
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Entry(
entryModelName: "entry-0001"
);
// イベントハンドリングを開始
var callbackId = domain.Subscribe(
value => {
// 値が変化した時に呼び出される
// value には変更後の値が渡ってくる
}
);
// イベントハンドリングを停止
domain.Unsubscribe(callbackId); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Entry(
entryModelName: "entry-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Entry(
"entry-0001" // entryModelName
);
// イベントハンドリングを開始
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Dictionary::Model::FEntry> value) {
// 値が変化した時に呼び出される
// value には変更後の値が渡ってくる
}
);
// イベントハンドリングを停止
Domain->Unsubscribe(CallbackId);Warning
このイベントはSDKがもつローカルキャッシュの値が変更された時に呼び出されます。
ローカルキャッシュは SDK が持つ API の実行、または GS2-Gateway の通知を有効にした GS2-Distributor 経由でのスタンプシートの実行、または GS2-Gateway の通知を有効にした GS2-JobQueue の実行によって変化したもののみが対象となります。
そのため、これらの方法以外で値が変更されてもコールバックは呼び出されません。
getEntryWithSignature
署名と一緒にエントリーを取得
Request
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128文字 | ネームスペース名 | ||
| accessToken | string | ✓ | ~ 128文字 | アクセストークン | ||
| entryModelName | string | ✓ | ~ 128文字 | エントリー名 | ||
| keyId | string | ✓ | “grn:gs2:{region}:{ownerId}:key:default:key:default” | ~ 1024文字 | 暗号鍵GRN |
Result
| 型 | 説明 | |
|---|---|---|
| item | EzEntry | エントリー |
| body | string | 署名対象のエントリー情報 |
| signature | string | 署名 |
実装例
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Entry(
entryModelName: "entry-0001"
);
var result = await domain.GetEntryWithSignatureAsync(
keyId: "key-0001"
);
var item = await result.ModelAsync();
var body = result.Body;
var signature = result.Signature; var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Entry(
entryModelName: "entry-0001"
);
var future = domain.GetEntryWithSignatureFuture(
keyId: "key-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.ModelFuture();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
var body = future.Result.Body;
var signature = future.Result.Signature; const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Entry(
"entry-0001" // entryModelName
);
const auto Future = Domain->GetEntryWithSignature(
"key-0001" // keyId
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();
const auto Body = Result->Body;
const auto Signature = Result->Signature;listEntries
エントリーの一覧を取得
Request
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128文字 | ネームスペース名 | ||
| accessToken | string | ✓ | ~ 128文字 | アクセストークン | ||
| limit | int | ✓ | 30 | 1 ~ 10000 | データの取得件数 | |
| pageToken | string | ~ 1024文字 | データの取得を開始する位置を指定するトークン |
Result
| 型 | 説明 | |
|---|---|---|
| items | List<EzEntry> | エントリーのリスト |
| nextPageToken | string | リストの続きを取得するためのページトークン |
実装例
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.EntriesAsync(
).ToListAsync(); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.Entries(
);
List<EzEntry> items = new List<EzEntry>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->Entries(
);
TArray<Gs2::UE5::Dictionary::Model::FEzEntryPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}値の変更イベントハンドリング
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// イベントハンドリングを開始
var callbackId = domain.SubscribeEntries(
() => {
// リストの要素が変化した時に呼び出される
}
);
// イベントハンドリングを停止
domain.UnsubscribeEntries(callbackId); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.Entries(
);
List<EzEntry> items = new List<EzEntry>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// イベントハンドリングを開始
const auto CallbackId = Domain->SubscribeEntries(
[]() {
// リストの要素が変化した時に呼び出される
}
);
// イベントハンドリングを停止
Domain->UnsubscribeEntries(CallbackId);Warning
このイベントはSDKがもつローカルキャッシュの値が変更された時に呼び出されます。
ローカルキャッシュは SDK が持つ API の実行、または GS2-Gateway の通知を有効にした GS2-Distributor 経由でのスタンプシートの実行、または GS2-Gateway の通知を有効にした GS2-JobQueue の実行によって変化したもののみが対象となります。
そのため、これらの方法以外で値が変更されてもコールバックは呼び出されません。
addLikes
お気に入りエントリーを登録
Request
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128文字 | ネームスペース名 | ||
| accessToken | string | ✓ | ~ 128文字 | アクセストークン | ||
| entryModelNames | List<string> | [] | 0 ~ 100 items | お気に入りエントリー名のリスト |
Result
| 型 | 説明 | |
|---|---|---|
| items | List<EzLike> | 登録したお気に入りエントリーのリスト |
実装例
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var result = await domain.AddLikesAsync(
entryModelNames: new List<string> {
"entry-0001",
"like-0002",
"like-0003",
}
);
var item = await result.ModelAsync(); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var future = domain.AddLikesFuture(
entryModelNames: new List<string> {
"entry-0001",
"like-0002",
"like-0003",
}
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.ModelFuture();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result; const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto Future = Domain->AddLikes(
[]
{
auto v = TOptional<TArray<FString>>();
v->Add("entry-0001");
v->Add("like-0002");
v->Add("like-0003");
return v;
}() // entryModelNames
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();deleteLikes
お気に入りエントリーを削除
Request
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128文字 | ネームスペース名 | ||
| accessToken | string | ✓ | ~ 128文字 | アクセストークン | ||
| entryModelNames | List<string> | [] | 0 ~ 100 items | お気に入りエントリー名のリスト |
Result
| 型 | 説明 | |
|---|---|---|
| items | List<EzLike> | 削除したお気に入りエントリーのリスト |
実装例
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var result = await domain.DeleteLikesAsync(
entryModelNames: new List<string> {
"entry-0001",
"like-0002",
"like-0003",
}
); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var future = domain.DeleteLikesFuture(
entryModelNames: new List<string> {
"entry-0001",
"like-0002",
"like-0003",
}
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
} const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto Future = Domain->DeleteLikes(
[]
{
auto v = TOptional<TArray<FString>>();
v->Add("entry-0001");
v->Add("like-0002");
v->Add("like-0003");
return v;
}() // entryModelNames
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();getLike
お気に入りエントリーを取得
Request
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128文字 | ネームスペース名 | ||
| accessToken | string | ✓ | ~ 128文字 | アクセストークン | ||
| entryModelName | string | ✓ | ~ 128文字 | エントリー名 |
Result
| 型 | 説明 | |
|---|---|---|
| item | EzLike | お気に入りエントリー |
実装例
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Like(
entryModelName: "entry-0001"
);
var item = await domain.ModelAsync(); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Like(
entryModelName: "entry-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Like(
"entry-0001" // entryModelName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}値の変更イベントハンドリング
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Like(
entryModelName: "entry-0001"
);
// イベントハンドリングを開始
var callbackId = domain.Subscribe(
value => {
// 値が変化した時に呼び出される
// value には変更後の値が渡ってくる
}
);
// イベントハンドリングを停止
domain.Unsubscribe(callbackId); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Like(
entryModelName: "entry-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Like(
"entry-0001" // entryModelName
);
// イベントハンドリングを開始
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Dictionary::Model::FLike> value) {
// 値が変化した時に呼び出される
// value には変更後の値が渡ってくる
}
);
// イベントハンドリングを停止
Domain->Unsubscribe(CallbackId);Warning
このイベントはSDKがもつローカルキャッシュの値が変更された時に呼び出されます。
ローカルキャッシュは SDK が持つ API の実行、または GS2-Gateway の通知を有効にした GS2-Distributor 経由でのスタンプシートの実行、または GS2-Gateway の通知を有効にした GS2-JobQueue の実行によって変化したもののみが対象となります。
そのため、これらの方法以外で値が変更されてもコールバックは呼び出されません。
listLikes
お気に入りエントリーの一覧を取得
Request
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128文字 | ネームスペース名 | ||
| accessToken | string | ✓ | ~ 128文字 | アクセストークン | ||
| limit | int | ✓ | 30 | 1 ~ 1000 | データの取得件数 | |
| pageToken | string | ~ 1024文字 | データの取得を開始する位置を指定するトークン |
Result
| 型 | 説明 | |
|---|---|---|
| items | List<EzLike> | お気に入りエントリーのリスト |
| nextPageToken | string | リストの続きを取得するためのページトークン |
実装例
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.LikesAsync(
).ToListAsync(); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.Likes(
);
List<EzLike> items = new List<EzLike>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->Likes(
);
TArray<Gs2::UE5::Dictionary::Model::FEzLikePtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}値の変更イベントハンドリング
var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// イベントハンドリングを開始
var callbackId = domain.SubscribeLikes(
() => {
// リストの要素が変化した時に呼び出される
}
);
// イベントハンドリングを停止
domain.UnsubscribeLikes(callbackId); var domain = gs2.Dictionary.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.Likes(
);
List<EzLike> items = new List<EzLike>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Dictionary->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// イベントハンドリングを開始
const auto CallbackId = Domain->SubscribeLikes(
[]() {
// リストの要素が変化した時に呼び出される
}
);
// イベントハンドリングを停止
Domain->UnsubscribeLikes(CallbackId);Warning
このイベントはSDKがもつローカルキャッシュの値が変更された時に呼び出されます。
ローカルキャッシュは SDK が持つ API の実行、または GS2-Gateway の通知を有効にした GS2-Distributor 経由でのスタンプシートの実行、または GS2-Gateway の通知を有効にした GS2-JobQueue の実行によって変化したもののみが対象となります。
そのため、これらの方法以外で値が変更されてもコールバックは呼び出されません。