node-red-contrib-wws-example1 0.0.7

This node of Node-RED nodes is for Watson Workspace Action Fulfillment. This node use with node-red-contrib-wwsNodes.

npm install node-red-contrib-wws-example1

Version: 0.0.7

Overview

This node of Node-RED nodes is for Watson Workspace Action Fulfillment.

This node use with node-red-contrib-wwsNodes.

Node

wws action fulfillment

  • This node post query of createTargetedMessage.
  • This node adds '"x-graphql-view": "PUBLIC, BETA"' in headers.

Usage: annotations setting

There are two ways to set annotations.

When setting to the property of the node

annotations property:

[{genericAnnotation: {title: "Sample Title", text: "Sample Body", buttons: [{postbackButton: {title: "Sample Button", id: "Sample_Button", style: PRIMARY}}]}}]

When setting with the previous function node msg.annotations

msg.annotations = [{
    genericAnnotation: {
        title: "Sample Title", 
        text: "Sample Body", 
        buttons: [{
            postbackButton: {
                title: "Sample Button", 
                id: "Sample_Button",
                style: "PRIMARY"
            }
        }]
    }
}];

Usage: attachments setting

There are two ways to set attachments.

When setting to the property of the node

attachments property:

[{type: CARD, cardInput: {type: INFORMATION, informationCardInput: {title: "Sample Title", subtitle: "Sample Subtitle", text: "Sample Text", date: "1500573338000", buttons: [{text: "Sample Button Text", payload: "Sample Button Payload",style: PRIMARY}]}}}]

When setting with the previous function node msg.attachments

msg.attachments = [{
    type: "CARD", 
    cardInput: { 
        type: "INFORMATION", 
        informationCardInput: { 
            title: "Sample Title", 
            subtitle: "Sample Subtitle", 
            text: "Sample Text", 
            date: "1500573338000", 
            buttons: [{ 
                text: "Sample Button Text", 
                payload: "Sample Button Payload", 
                style: "PRIMARY" 
            }] 
        } 
    } 
}];

Licence

Apache License Version 2.0.

This software includes the work that is distributed in the Apache License 2.0.

Author

Takeshi Yoshida

Releace

2017/11/09 v0.0.7 fix

2017/11/09 v0.0.6 fix

2017/11/09 v0.0.5 fix

2017/09/22 v0.0.4 fix

2017/09/22 v0.0.3 bug fix

2017/09/22 v0.0.2 add parameter of attachments

2017/09/02 v0.0.1 Initial

Node Info

Version: 0.0.7
Updated 1 week, 6 days ago
License: Apache-2.0

Downloads

5 in the last day
66 in the last week
325 in the last month

Nodes

  • actionfulfillment

Keywords

  • node-red
  • wws

Maintainers

  • tyoshida