Transaction Action of GS2-Dictionary

VerifyAction

Gs2Dictionary:VerifyEntryByUserId

Verify entry by user ID

Actions for which quantity can be specified: NO

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
entryModelNamestringEntry Name
verifyTypeenum [
    “havent”,
    “have”
]
Type of verification
timeOffsetTokenstringTime offset token

Enumeration type definition to specify as verifyType

Enumerator String DefinitionDescription
haventThe specified entry must not be held
haveThe specified entry must be held
{
    "action": "Gs2Dictionary:VerifyEntryByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "entryModelName": "[string]Entry Name",
        "verifyType": "[string]Type of verification",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Dictionary:VerifyEntryByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  entryModelName: "[string]Entry Name"
  verifyType: "[string]Type of verification"
  timeOffsetToken: "[string]Time offset token"
transaction.service("dictionary").consume.verify_entry_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    entryModelName="[string]Entry Name",
    verifyType="[string]Type of verification",
    timeOffsetToken="[string]Time offset token",
})

ConsumeAction

Gs2Dictionary:DeleteEntriesByUserId

Delete entries by specifying a user ID

Actions for which quantity can be specified: NO

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
entryModelNamesstring[]List of Entry Names
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Dictionary:DeleteEntriesByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "entryModelNames": [
            "[string]Entry Name"
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Dictionary:DeleteEntriesByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  entryModelNames: 
  - "[string]Entry Name"
  timeOffsetToken: "[string]Time offset token"
transaction.service("dictionary").consume.delete_entries_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    entryModelNames={
        "[string]Entry Name"
    },
    timeOffsetToken="[string]Time offset token",
})

AcquireAction

Gs2Dictionary:AddEntriesByUserId

Add entries by specifying a user ID

Actions for which quantity can be specified: NO

Reversible action: YES

TypeDescription
namespaceNamestringNamespace name
userIdstringSet #{userId} to replace the currently logged in user ID.
entryModelNamesstring[]List of Entry Names
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Dictionary:AddEntriesByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User Id",
        "entryModelNames": [
            "[string]Entry Name"
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Dictionary:AddEntriesByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User Id"
  entryModelNames: 
    - "[string]Entry Name"
  timeOffsetToken: "[string]Time offset token"
transaction.service("dictionary").acquire.add_entries_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User Id",
    entryModelNames={
        "[string]Entry Name"
    },
    timeOffsetToken="[string]Time offset token",
})