API Reference of GS2-Formation SDK for Game Engine
Model
Form Model
This entity represents the form status.
A slot
can be defined as an area that can be organized.
In the case of weapons and armor, a slot can be a part such as right hand',
left hand’, body',
arm’, etc., or it can be an area such as slot',
slot’, or `slot’, etc.
In the case of a party, positions such as “vanguard,” “middle guard,” and “rear guard” can be represented as slots.
| Type | Require | Default | Limitation | Description |
---|
name | string | ✓ | | ~ 128 chars | Form Name |
metadata | string | | | ~ 2048 chars | metadata |
slots | List<EzSlotModel> | ✓ | | | List of Slot Model |
EzMoldModel
Area for storing form
If it is a party composition, it is intended to be saved in the form of “fire attribute party” or “water attribute party”.
The number of areas that can be saved can be limited or expanded individually.
| Type | Require | Default | Limitation | Description |
---|
name | string | ✓ | | ~ 128 chars | Form Model Name |
metadata | string | | | ~ 2048 chars | metadata |
formModel | EzFormModel | ✓ | | | |
initialMaxCapacity | int | ✓ | | 1 ~ 2147483646 | Initial capacity to store forms |
maxCapacity | int | ✓ | | 1 ~ 2147483646 | Maximum capacity to store forms |
Form Model
This entity represents the form status.
A slot
can be defined as an area that can be organized.
In the case of weapons and armor, a slot can be a part such as right hand',
left hand’, body',
arm’, etc., or it can be an area such as slot',
slot’, or `slot’, etc.
In the case of a party, positions such as “vanguard,” “middle guard,” and “rear guard” can be represented as slots.
| Type | Require | Default | Limitation | Description |
---|
name | string | ✓ | | ~ 128 chars | Form Name |
metadata | string | | | ~ 2048 chars | metadata |
slots | List<EzSlotModel> | ✓ | | | List of Slot Model |
EzMold
Saved Form
An entity that holds information organized by the game player.
Each Mold can hold multiple Forms, and the capacity of how many Forms can be held can be set individually for each Mold.
| Type | Require | Default | Limitation | Description |
---|
name | string | ✓ | | ~ 128 chars | Form Name |
userId | string | ✓ | | ~ 128 chars | User Id |
capacity | int | ✓ | | ~ 2147483646 | Current Capacity |
Form
This entity represents the form status.
A slot
can be defined as an area that can be organized.
In the case of weapons and armor, a slot can be a part such as right hand',
left hand’, body',
arm’, etc., or it can be an area such as slot',
slot’, or `slot’, etc.
In the case of a party, positions such as “vanguard,” “middle guard,” and “rear guard” can be represented as slots.
| Type | Require | Default | Limitation | Description |
---|
name | string | ✓ | | ~ 128 chars | Form Name |
index | int | ✓ | | ~ 2147483646 | Index of storage area |
slots | List<EzSlot> | | | | List of Slots |
Property Form
| Type | Require | Default | Limitation | Description |
---|
name | string | ✓ | | ~ 128 chars | Form Name |
propertyId | string | ✓ | | ~ 1024 chars | Property Id |
slots | List<EzSlot> | | | | List of Slots |
EzSlot
| Type | Require | Default | Limitation | Description |
---|
name | string | ✓ | | ~ 128 chars | Slot model name |
propertyId | string | ✓ | | ~ 1024 chars | Property ID |
metadata | string | | | ~ 1024 chars | metadata |
EzSlotModel
| Type | Require | Default | Limitation | Description |
---|
name | string | ✓ | | ~ 128 chars | Slot model name |
propertyRegex | string | ✓ | “.*” | ~ 512 chars | Regular expressions for values that can be set as properties |
metadata | string | | | ~ 512 chars | metadata |
EzSlotWithSignature
| Type | Require | Default | Limitation | Description |
---|
name | string | ✓ | | ~ 128 chars | Slot model name |
propertyType | enum [‘gs2_inventory’, ‘gs2_simple_inventory’, ‘gs2_dictionary’] | ✓ | | ~ 128 chars | Property Type |
body | string | ✓ | | ~ 1048576 chars | payload |
signature | string | ✓ | | ~ 1024 chars | Signature that proves ownership of the resource for the property ID |
metadata | string | | | ~ 1024 chars | metadata |
EzAcquireActionConfig
| Type | Require | Default | Limitation | Description |
---|
name | enum [] | ✓ | | ~ 128 chars | Types of actions to be performed in the stamp sheet |
config | List<EzConfig> | | [] | | Config for use with stamp sheets |
EzConfig
| Type | Require | Default | Limitation | Description |
---|
key | string | ✓ | | ~ 64 chars | Name |
value | string | | | ~ 51200 chars | Value |
EzAcquireAction
| Type | Require | Default | Limitation | Description |
---|
action | enum [] | ✓ | | ~ 128 chars | Types of actions to be performed in the stamp sheet |
request | string | ✓ | | ~ 1048576 chars | JSON of request |
Methods
getMoldModel
Obtain form model information
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
moldModelName | string | ✓ | | ~ 128 chars | Form Model Name |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->MoldModel(
"mold-0001" // moldModelName
);
const auto Future = Domain.Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
listMoldModels
Obtain list of form model information
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var items = await domain.MoldModelsAsync(
).ToListAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.MoldModels(
);
List<EzMoldModel> items = new List<EzMoldModel>();
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->Formation->Namespace(
"namespace-0001" // namespaceName
);
const auto It = Domain->MoldModels(
);
for (auto Item : *It)
{
}
getMold
Get saved form information by specifying form storage area
and property ID
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
moldModelName | string | ✓ | | ~ 128 chars | Form Name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
)->Mold(
"mold-0001" // moldModelName
);
const auto Future = Domain.Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
listMolds
Obtain list of saved form information
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
pageToken | string | | | ~ 1024 chars | Token specifying the position from which to start acquiring data |
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
| Type | Description |
---|
items | List<EzMold> | List of Saved Forms |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.MoldsAsync(
).ToListAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.Molds(
);
List<EzMold> items = new List<EzMold>();
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->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
);
const auto It = Domain->Molds(
);
for (auto Item : *It)
{
}
Obtain form model information
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
moldModelName | string | ✓ | | ~ 128 chars | Form Model Name |
formModelName | string | ✓ | | ~ 128 chars | Form Name |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
).FormModel(
formModelName: "form-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
).FormModel(
formModelName: "form-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->MoldModel(
"mold-0001" // moldModelName
)->FormModel(
"form-0001" // formModelName
);
const auto Future = Domain.Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Get Form
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
moldModelName | string | ✓ | | ~ 128 chars | Mold Name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
index | int | ✓ | | ~ 2147483646 | Index of storage area |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var item = await domain.ModelAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
)->Mold(
"mold-0001" // moldModelName
)->Form(
0 // index
);
const auto Future = Domain.Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Get form with signature
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
moldModelName | string | ✓ | | ~ 128 chars | Mold Name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
index | int | ✓ | | ~ 2147483646 | Index of storage area |
keyId | string | ✓ | | ~ 1024 chars | encryption key GRN |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var result = await domain.GetFormWithSignatureAsync(
keyId: "key-0001"
);
var item = await result.ModelAsync();
var body = result.Body;
var signature = result.Signature;
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var future = domain.GetFormWithSignature(
keyId: "key-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
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->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
)->Mold(
"mold-0001" // moldModelName
)->Form(
0 // index
);
const auto Future = Domain->GetFormWithSignature(
"key-0001"
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (!TestFalse(WHAT, Future2->GetTask().IsError())) return false;
const auto Result = Future2->GetTask().Result();
const auto Body = Result->Body;
const auto Signature = Result->Signature;
Get list of forms
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
moldModelName | string | ✓ | | ~ 128 chars | Mold Name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
pageToken | string | | | ~ 1024 chars | Token specifying the position from which to start acquiring data |
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
| Type | Description |
---|
items | List<EzForm> | List of Form |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var items = await domain.FormsAsync(
).ToListAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var it = domain.Forms(
);
List<EzForm> items = new List<EzForm>();
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->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
)->Mold(
"mold-0001" // moldModelName
);
const auto It = Domain->Forms(
);
for (auto Item : *It)
{
}
Update Form
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
moldModelName | string | ✓ | | ~ 128 chars | Mold Name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
index | int | ✓ | | ~ 2147483646 | Index of storage area |
slots | List<EzSlotWithSignature> | ✓ | | | List of Slot |
keyId | string | ✓ | | ~ 1024 chars | encryption key GRN |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var result = await domain.SetFormAsync(
slots: new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature[] {
new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature
{
Name = "slot-0001",
PropertyType = "gs2_dictionary",
Body = "body",
Signature = "signature",
},
},
keyId: "key-0001"
);
var item = await result.ModelAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var future = domain.SetForm(
slots: new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature[] {
new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature
{
Name = "slot-0001",
PropertyType = "gs2_dictionary",
Body = "body",
Signature = "signature",
},
},
keyId: "key-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
)->Mold(
"mold-0001" // moldModelName
)->Form(
0 // index
);
const auto Future = Domain->SetForm(
[]
{
const auto v = MakeShared<TArray<TSharedPtr<Gs2::Formation::Model::FSlotWithSignature>>>();
v->Add({'name': 'slot-0001', 'propertyType': 'gs2_dictionary', 'body': 'body', 'signature': 'signature'});
return v;
}(),
"key-0001"
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (!TestFalse(WHAT, Future2->GetTask().IsError())) return false;
const auto Result = Future2->GetTask().Result();
Obtain form model information
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
propertyFormModelName | string | ✓ | | ~ 128 chars | Form Name |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).PropertyFormModel(
propertyFormModelName: "form-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).PropertyFormModel(
propertyFormModelName: "form-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->PropertyFormModel(
"form-0001" // propertyFormModelName
);
const auto Future = Domain.Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Obtain list of form model information
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var items = await domain.PropertyFormModelsAsync(
).ToListAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.PropertyFormModels(
);
List<EzPropertyFormModel> items = new List<EzPropertyFormModel>();
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->Formation->Namespace(
"namespace-0001" // namespaceName
);
const auto It = Domain->PropertyFormModels(
);
for (auto Item : *It)
{
}
Get PropertyForm
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
propertyFormModelName | string | ✓ | | ~ 128 chars | Mold Name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
propertyId | string | ✓ | | ~ 1024 chars | Property Id |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
)->PropertyForm(
"form-0001", // propertyFormModelName
"property-0001" // propertyId
);
const auto Future = Domain.Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Get form with signature
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
propertyFormModelName | string | ✓ | | ~ 128 chars | Mold Name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
propertyId | string | ✓ | | ~ 1024 chars | Property Id |
keyId | string | ✓ | | ~ 1024 chars | encryption key GRN |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var result = await domain.GetPropertyFormWithSignatureAsync(
keyId: "key-0001"
);
var item = await result.ModelAsync();
var body = result.Body;
var signature = result.Signature;
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var future = domain.GetPropertyFormWithSignature(
keyId: "key-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
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->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
)->PropertyForm(
"form-0001", // propertyFormModelName
"property-0001" // propertyId
);
const auto Future = Domain->GetPropertyFormWithSignature(
"key-0001"
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (!TestFalse(WHAT, Future2->GetTask().IsError())) return false;
const auto Result = Future2->GetTask().Result();
const auto Body = Result->Body;
const auto Signature = Result->Signature;
Get list of forms
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
propertyFormModelName | string | ✓ | | ~ 128 chars | Mold Name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
pageToken | string | | | ~ 1024 chars | Token specifying the position from which to start acquiring data |
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
| Type | Description |
---|
items | List<EzPropertyForm> | List of PropertyForm |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.PropertyFormsAsync(
).ToListAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.PropertyForms(
);
List<EzPropertyForm> items = new List<EzPropertyForm>();
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->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
);
const auto It = Domain->PropertyForms( // propertyFormModelName
);
for (auto Item : *It)
{
}
Update PropertyForm
Request
| Type | Require | Default | Limitation | Description |
---|
namespaceName | string | ✓ | | ~ 32 chars | Namespace name |
propertyFormModelName | string | ✓ | | ~ 128 chars | Mold Name |
accessToken | string | ✓ | | ~ 128 chars | User Id |
propertyId | string | ✓ | | ~ 1024 chars | Property Id |
slots | List<EzSlotWithSignature> | ✓ | | | List of Slot |
keyId | string | ✓ | | ~ 1024 chars | encryption key GRN |
Result
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var result = await domain.SetPropertyFormAsync(
slots: new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature[] {
new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature
{
Name = "slot-0001",
PropertyType = "gs2_dictionary",
Body = "body",
Signature = "signature",
},
},
keyId: "key-0001"
);
var item = await result.ModelAsync();
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var future = domain.SetPropertyForm(
slots: new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature[] {
new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature
{
Name = "slot-0001",
PropertyType = "gs2_dictionary",
Body = "body",
Signature = "signature",
},
},
keyId: "key-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
AccessToken
)->PropertyForm(
"form-0001", // propertyFormModelName
"property-0001" // propertyId
);
const auto Future = Domain->SetPropertyForm(
[]
{
const auto v = MakeShared<TArray<TSharedPtr<Gs2::Formation::Model::FSlotWithSignature>>>();
v->Add({'name': 'slot-0001', 'propertyType': 'gs2_dictionary', 'body': 'body', 'signature': 'signature'});
return v;
}(),
"key-0001"
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (!TestFalse(WHAT, Future2->GetTask().IsError())) return false;
const auto Result = Future2->GetTask().Result();