mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Allow twitter out node to specify extra parameters
to close #119. Thanks @sacbhale
This commit is contained in:
parent
059c7a2d67
commit
d782a5afb6
@ -205,6 +205,8 @@
|
||||
<p>To send a Direct Message (DM) - use a payload like "D {username} {message}"</p>
|
||||
<p>If <b>msg.media</b> exists and is a Buffer object, this node will treat it
|
||||
as an image and attach it to the tweet.</p>
|
||||
<p>If <b>msg.params</b> exists and is an object of name:value pairs,
|
||||
this node will treat it as parameters for the update request.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -313,7 +313,8 @@ module.exports = function(RED) {
|
||||
form.append("media[]",msg.media,{filename:"image"});
|
||||
|
||||
} else {
|
||||
twit.updateStatus(msg.payload, function (err, data) {
|
||||
if (typeof msg.params === 'undefined') { msg.params = {}; }
|
||||
+ twit.updateStatus(msg.payload, msg.params, function (err, data) {
|
||||
if (err) {
|
||||
node.status({fill:"red",shape:"ring",text:"twitter.status.failed"});
|
||||
node.error(err,msg);
|
||||
|
@ -54,3 +54,5 @@ To send a Direct Message (DM) - use a payload like.
|
||||
D {username} {message}
|
||||
|
||||
If **msg.media** exists and is a Buffer object, this node will treat it as an image and attach it to the tweet.
|
||||
|
||||
If **msg.params** exists and is an object of name:value pairs, this node will treat it as parameters for the update request.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-twitter",
|
||||
"version" : "0.1.1",
|
||||
"version" : "0.1.2",
|
||||
"description" : "A Node-RED node to talk to Twitter",
|
||||
"dependencies" : {
|
||||
"twitter-ng": "0.6.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user