Transaction Action of GS2-Schedule

ConsumeAction

Gs2Schedule:DeleteTriggerByUserId

Delete trigger by specifying user ID

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
userIdstring
Set #{userId} to replace the currently logged in user ID.
triggerNamestringTrigger Name
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Schedule:DeleteTriggerByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "triggerName": "[string]Trigger Name",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Schedule:DeleteTriggerByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  triggerName: "[string]Trigger Name"
  timeOffsetToken: "[string]Time offset token"
transaction.service("schedule").consume.delete_trigger_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    triggerName="[string]Trigger Name",
    timeOffsetToken="[string]Time offset token",
})

Gs2Schedule:VerifyEventByUserId

Verify whether it is the event holding period by specifying user ID

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
userIdstring
Set #{userId} to replace the currently logged in user ID.
eventNamestringEvent Type Name
verifyTypeenum [
“inSchedule”,
“notInSchedule”
]
Type of verification
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Schedule:VerifyEventByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "eventName": "[string]Event Type Name",
        "verifyType": "[string]Type of verification",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Schedule:VerifyEventByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  eventName: "[string]Event Type Name"
  verifyType: "[string]Type of verification"
  timeOffsetToken: "[string]Time offset token"
transaction.service("schedule").consume.verify_event_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    eventName="[string]Event Type Name",
    verifyType="[string]Type of verification",
    timeOffsetToken="[string]Time offset token",
})

AcquireAction

Gs2Schedule:TriggerByUserId

Trigger by specifying a user ID

Actions for which quantity can be specified: NO

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
triggerNamestringTrigger Name
userIdstringSet #{userId} to replace the currently logged in user ID.
triggerStrategyenum [
“renew”,
“extend”,
“drop”
]
Trigger Pulling Policy
ttlintTrigger expiration time (seconds)
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Schedule:TriggerByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "triggerName": "[string]Trigger Name",
        "userId": "[string]User Id",
        "triggerStrategy": "[string]Trigger Pulling Policy",
        "ttl": "[int]Trigger expiration time (seconds)",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Schedule:TriggerByUserId
request:
  namespaceName: "[string]Namespace name"
  triggerName: "[string]Trigger Name"
  userId: "[string]User Id"
  triggerStrategy: "[string]Trigger Pulling Policy"
  ttl: "[int]Trigger expiration time (seconds)"
  timeOffsetToken: "[string]Time offset token"
transaction.service("schedule").acquire.trigger_by_user_id({
    namespaceName="[string]Namespace name",
    triggerName="[string]Trigger Name",
    userId="[string]User Id",
    triggerStrategy="[string]Trigger Pulling Policy",
    ttl="[int]Trigger expiration time (seconds)",
    timeOffsetToken="[string]Time offset token",
})