From c3e3d9d46eede64ad0b08cf3afac814905371d1f Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Tue, 19 Oct 2021 00:16:52 -0400 Subject: [PATCH] :zap: Add Twitter mode parameter to tweet:search (#2326) * :zap: Add Twitter mode parameter to tweet:search * :zap: Minor improvements Co-authored-by: Jan Oberhauser --- .../nodes/Twitter/TweetDescription.ts | 17 +++++++++++++++++ .../nodes-base/nodes/Twitter/Twitter.node.ts | 2 ++ 2 files changed, 19 insertions(+) diff --git a/packages/nodes-base/nodes/Twitter/TweetDescription.ts b/packages/nodes-base/nodes/Twitter/TweetDescription.ts index aece462828..254f600b48 100644 --- a/packages/nodes-base/nodes/Twitter/TweetDescription.ts +++ b/packages/nodes-base/nodes/Twitter/TweetDescription.ts @@ -357,6 +357,23 @@ export const tweetFields = [ default: 'mixed', description: 'Specifies what type of search results you would prefer to receive', }, + { + displayName: 'Tweet Mode', + name: 'tweetMode', + type: 'options', + options: [ + { + name: 'Compatibility', + value: 'compat', + }, + { + name: 'Extended', + value: 'extended', + }, + ], + default: 'compat', + description: 'When the extended mode is selected, the response contains the entire untruncated text of the Tweet', + }, { displayName: 'Until', name: 'until', diff --git a/packages/nodes-base/nodes/Twitter/Twitter.node.ts b/packages/nodes-base/nodes/Twitter/Twitter.node.ts index 7d8aab996e..c3218d7326 100644 --- a/packages/nodes-base/nodes/Twitter/Twitter.node.ts +++ b/packages/nodes-base/nodes/Twitter/Twitter.node.ts @@ -235,6 +235,8 @@ export class Twitter implements INodeType { } } + qs.tweet_mode = additionalFields.tweetMode || 'compat'; + if (returnAll) { responseData = await twitterApiRequestAllItems.call(this, 'statuses', 'GET', '/search/tweets.json', {}, qs); } else {