Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Arguments

Hierarchy

  • Arguments

Properties

Methods

Properties

parsed

parsed: Parsed

raw

raw: Raw

status

status: Status

Methods

__@iterator

  • Returns IterableIterator<GoogleActionsV2Argument>

get

  • get<TName>(name: TName): ArgumentsNamed[TName]
  • get(name: string): Argument
  • Get the argument value by name from the current intent. The first property value not named name or status will be returned. Will retrieve textValue last. If there is no other properties, return undefined.

    example
    
    // Actions SDK
    app.intent('actions.intent.PERMISSION', conv => {
      const granted = conv.arguments.get('PERMISSION') // boolean true if granted, false if not
    })
    
    // Dialogflow
    // Create a Dialogflow intent with the `actions_intent_PERMISSION` event
    app.intent('Get Permission', conv => {
      const granted = conv.arguments.get('PERMISSION') // boolean true if granted, false if not
    })
    
    example
    
    // Actions SDK
    app.intent('actions.intent.PERMISSION', conv => {
      const granted = conv.arguments.get('PERMISSION') // boolean true if granted, false if not
    })
    
    // Dialogflow
    // Create a Dialogflow intent with the `actions_intent_PERMISSION` event
    app.intent('Get Permission', conv => {
      const granted = conv.arguments.get('PERMISSION') // boolean true if granted, false if not
    })
    

    Type parameters

    • TName: keyof ArgumentsNamed

    Parameters

    • name: TName

    Returns ArgumentsNamed[TName]

    First property not named 'name' or 'status' with 'textValue' given last priority or undefined if no other properties.

  • Parameters

    • name: string

    Returns Argument

Generated using TypeDoc