Transaction Action of GS2-Inbox
VerifyAction
ConsumeAction
Gs2Inbox:OpenMessageByUserId
Marking messages as opened by specifying user ID
Actions for which quantity can be specified: NO
Reversible action: NO
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
userId | string | Set #{userId} to replace the currently logged in user ID. |
messageName | string | Message Name |
timeOffsetToken | string | Time offset token |
{
"action": "Gs2Inbox:OpenMessageByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User Id",
"messageName": "[string]Message Name",
"timeOffsetToken": "[string]Time offset token"
}
}
action: Gs2Inbox:OpenMessageByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User Id"
messageName: "[string]Message Name"
timeOffsetToken: "[string]Time offset token"
transaction.service("inbox").consume.open_message_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User Id",
messageName="[string]Message Name",
timeOffsetToken="[string]Time offset token",
})
Gs2Inbox:DeleteMessageByUserId
Delete message by specifying user ID
Actions for which quantity can be specified: NO
Reversible action: NO
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
userId | string | Set #{userId} to replace the currently logged in user ID. |
messageName | string | Message Name |
timeOffsetToken | string | Time offset token |
{
"action": "Gs2Inbox:DeleteMessageByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User Id",
"messageName": "[string]Message Name",
"timeOffsetToken": "[string]Time offset token"
}
}
action: Gs2Inbox:DeleteMessageByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User Id"
messageName: "[string]Message Name"
timeOffsetToken: "[string]Time offset token"
transaction.service("inbox").consume.delete_message_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User Id",
messageName="[string]Message Name",
timeOffsetToken="[string]Time offset token",
})
AcquireAction
Gs2Inbox:SendMessageByUserId
Send a message by specifying user ID
Actions for which quantity can be specified: NO
Reversible action: NO
Type | Description | |
---|---|---|
namespaceName | string | Namespace name |
userId | string | Set #{userId} to replace the currently logged in user ID. |
metadata | string | Metadata corresponding to the content of the message |
readAcquireActions | AcquireAction[] | Obtain actions to be performed upon opening |
expiresAt | long | Datetime of ttl |
expiresTimeSpan | TimeSpan_ | Difference up to the expiration date of the message |
timeOffsetToken | string | Time offset token |
{
"action": "Gs2Inbox:SendMessageByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User Id",
"metadata": "[string]Metadata corresponding to the content of the message",
"readAcquireActions": [
{
"action": "[string]Types of actions to be performed in the acquire action",
"request": "[string]JSON of request"
}
],
"expiresAt": "[long]Datetime of ttl",
"expiresTimeSpan": {
"days": "[int]Number of days from current time",
"hours": "[int]Hours from current time",
"minutes": "[int]Minutes from current time"
},
"timeOffsetToken": "[string]Time offset token"
}
}
action: Gs2Inbox:SendMessageByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User Id"
metadata: "[string]Metadata corresponding to the content of the message"
readAcquireActions:
- action: "[string]Types of actions to be performed in the acquire action"
request: "[string]JSON of request"
expiresAt: "[long]Datetime of ttl"
expiresTimeSpan:
days: "[int]Number of days from current time"
hours: "[int]Hours from current time"
minutes: "[int]Minutes from current time"
timeOffsetToken: "[string]Time offset token"
transaction.service("inbox").acquire.send_message_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User Id",
metadata="[string]Metadata corresponding to the content of the message",
readAcquireActions={
{
action="[string]Types of actions to be performed in the acquire action",
request="[string]JSON of request"
}
},
expiresAt="[long]Datetime of ttl",
expiresTimeSpan={
days="[int]Number of days from current time",
hours="[int]Hours from current time",
minutes="[int]Minutes from current time"
},
timeOffsetToken="[string]Time offset token",
})