Transaction Action of GS2-Lottery
Specification of verify/consume/acquire transaction actions
AcquireAction
Gs2Lottery:DrawByUserId
Execute a lottery by specifying a User ID
Whether the action allows quantity specification: YES
Whether the action is reversible: NO
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| lotteryName | string | ✓ | ~ 128 chars | Lottery Model name Lottery model-specific name. Specified using alphanumeric characters, hyphen (-), underscore (_), and period (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| count | int | ✓ | 1 ~ 1000 | Number of draws | ||
| config | List<Config> | [] | 0 ~ 1000 items | Settings applied to the placeholder on the stamp sheet | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
{
"action": "Gs2Lottery:DrawByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"lotteryName": "[string]Lottery Model name",
"userId": "[string]User ID",
"count": "[int]Number of draws",
"config": [
{
"key": "[string]Name",
"value": "[string]Value"
}
],
"timeOffsetToken": "[string]Time offset token"
}
}action: Gs2Lottery:DrawByUserId
request:
namespaceName: "[string]Namespace name"
lotteryName: "[string]Lottery Model name"
userId: "[string]User ID"
count: "[int]Number of draws"
config:
- key: "[string]Name"
value: "[string]Value"
timeOffsetToken: "[string]Time offset token"transaction.service("lottery").acquire.draw_by_user_id({
namespaceName="[string]Namespace name",
lotteryName="[string]Lottery Model name",
userId="[string]User ID",
count="[int]Number of draws",
config={
{
key="[string]Name",
value="[string]Value"
}
},
timeOffsetToken="[string]Time offset token",
})Gs2Lottery:ResetBoxByUserId
Reset box with specified user ID
Whether the action allows quantity specification: NO
Whether the action is reversible: NO
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| prizeTableName | string | ✓ | ~ 128 chars | Name of prize table | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
{
"action": "Gs2Lottery:ResetBoxByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"prizeTableName": "[string]Name of prize table",
"userId": "[string]User ID",
"timeOffsetToken": "[string]Time offset token"
}
}action: Gs2Lottery:ResetBoxByUserId
request:
namespaceName: "[string]Namespace name"
prizeTableName: "[string]Name of prize table"
userId: "[string]User ID"
timeOffsetToken: "[string]Time offset token"transaction.service("lottery").acquire.reset_box_by_user_id({
namespaceName="[string]Namespace name",
prizeTableName="[string]Name of prize table",
userId="[string]User ID",
timeOffsetToken="[string]Time offset token",
})