mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Twitter doc updates and rate limit fixes
This commit is contained in:
parent
9104b4200a
commit
cb8a3f064e
@ -129,7 +129,11 @@
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="twitter in">
|
||||
<p>Twitter input node. Watches either the public or the user's stream for tweets containing the configured search term.</p>
|
||||
<p>Twitter input node. Can be used to search either:
|
||||
<ul><li>the public or a user's stream for tweets containing the configured search term</li>
|
||||
<li>all tweets by specific users</li>
|
||||
<li>direct messages received by the authenticated user</li>
|
||||
</ul></p>
|
||||
<p>Use space for <i>and</i> and comma , for <i>or</i> when searching for multiple terms.</p>
|
||||
<p>Sets the <b>msg.topic</b> to <i>tweets/</i> and then appends the senders screen name.</p>
|
||||
<p>Sets <b>msg.location</b> to the tweeters location if known.</p>
|
||||
@ -151,7 +155,16 @@
|
||||
outputs:1,
|
||||
icon: "twitter.png",
|
||||
label: function() {
|
||||
return this.name||this.tags;
|
||||
if (this.name) {
|
||||
return this.name;
|
||||
}
|
||||
if (this.user == "dm") {
|
||||
var user = RED.nodes.node(this.twitter);
|
||||
return (user?user.label()+" ":"")+"DMs";
|
||||
} else if (this.user == "user") {
|
||||
return this.tags+" tweets";
|
||||
}
|
||||
return this.tags;
|
||||
},
|
||||
labelStyle: function() {
|
||||
return this.name?"node_label_italic":"";
|
||||
|
@ -43,6 +43,14 @@ function TwitterInNode(n) {
|
||||
access_token_secret: credentials.access_token_secret
|
||||
});
|
||||
|
||||
|
||||
//setInterval(function() {
|
||||
// twit.get("/application/rate_limit_status.json",null,function(err,cb) {
|
||||
// console.log("direct_messages:",cb["resources"]["direct_messages"]);
|
||||
// });
|
||||
//
|
||||
//},10000);
|
||||
|
||||
var node = this;
|
||||
if (this.user === "user") {
|
||||
node.poll_ids = [];
|
||||
@ -132,7 +140,7 @@ function TwitterInNode(n) {
|
||||
node.error(err);
|
||||
}
|
||||
});
|
||||
},65000));
|
||||
},120000));
|
||||
});
|
||||
|
||||
} else if (this.tags !== "") {
|
||||
|
Loading…
Reference in New Issue
Block a user