Transaction Action of GS2-Lottery
VerifyAction
ConsumeAction
AcquireAction
Gs2Lottery:DrawByUserId
Drawing lots by specifying user IDs
Actions for which quantity can be specified: YES
Reversible action: NO
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
lotteryName | string | Name of lottery model type |
userId | string | Set #{userId} to replace the currently logged in user ID. |
count | int | Number of draws |
config | Config[] | Stamp sheet placeholder applied settings values |
timeOffsetToken | string | Time offset token |
{
"action": "Gs2Lottery:DrawByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"lotteryName": "[string]Name of lottery model type",
"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]Name of lottery model type"
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]Name of lottery model type",
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
Actions for which quantity can be specified: NO
Reversible action: NO
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
prizeTableName | string | Name of prize table |
userId | string | Set #{userId} to replace the currently logged in 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"
}
}
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",
})