0.0.7 • Published 8 years ago
node-red-contrib-wws-example1 v0.0.7
node-red-contrib-www-example1
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
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