From b2c1d70d69b846c52d4ca65a91d3249693710184 Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Thu, 14 Sep 2023 17:32:28 +0200 Subject: [PATCH] Rename Twitter to X (keep Twitter alias) --- .../credentials/TwitterOAuth1Api.credentials.ts | 4 ++-- .../credentials/TwitterOAuth2Api.credentials.ts | 4 ++-- packages/nodes-base/nodes/Twitter/Twitter.node.json | 2 +- packages/nodes-base/nodes/Twitter/Twitter.node.ts | 6 +++--- packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts | 10 +++++----- packages/nodes-base/nodes/Twitter/twitter.svg | 1 - packages/nodes-base/nodes/Twitter/x.svg | 1 + 7 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 packages/nodes-base/nodes/Twitter/twitter.svg create mode 100644 packages/nodes-base/nodes/Twitter/x.svg diff --git a/packages/nodes-base/credentials/TwitterOAuth1Api.credentials.ts b/packages/nodes-base/credentials/TwitterOAuth1Api.credentials.ts index 63c50e001b2ec..218e312be7be7 100644 --- a/packages/nodes-base/credentials/TwitterOAuth1Api.credentials.ts +++ b/packages/nodes-base/credentials/TwitterOAuth1Api.credentials.ts @@ -5,7 +5,7 @@ export class TwitterOAuth1Api implements ICredentialType { extends = ['oAuth1Api']; - displayName = 'Twitter OAuth API'; + displayName = 'X OAuth API'; documentationUrl = 'twitter'; @@ -36,7 +36,7 @@ export class TwitterOAuth1Api implements ICredentialType { }, { displayName: - 'Some operations requires a Basic or a Pro API for more informations see Twitter Api Doc', + 'Some operations requires a Basic or a Pro API for more informations see X API Docs', name: 'apiPermissioms', type: 'notice', default: '', diff --git a/packages/nodes-base/credentials/TwitterOAuth2Api.credentials.ts b/packages/nodes-base/credentials/TwitterOAuth2Api.credentials.ts index e948daad39d92..5850d1409de13 100644 --- a/packages/nodes-base/credentials/TwitterOAuth2Api.credentials.ts +++ b/packages/nodes-base/credentials/TwitterOAuth2Api.credentials.ts @@ -21,14 +21,14 @@ export class TwitterOAuth2Api implements ICredentialType { extends = ['oAuth2Api']; - displayName = 'Twitter OAuth2 API'; + displayName = 'X OAuth2 API'; documentationUrl = 'twitter'; properties: INodeProperties[] = [ { displayName: - 'Some operations requires a Basic or a Pro API for more informations see Twitter Api Doc', + 'Some operations requires a Basic or a Pro API for more informations see X API Docs', name: 'apiPermissioms', type: 'notice', default: '', diff --git a/packages/nodes-base/nodes/Twitter/Twitter.node.json b/packages/nodes-base/nodes/Twitter/Twitter.node.json index 693c9a98362e0..1d862cb20fe74 100644 --- a/packages/nodes-base/nodes/Twitter/Twitter.node.json +++ b/packages/nodes-base/nodes/Twitter/Twitter.node.json @@ -32,5 +32,5 @@ } ] }, - "alias": ["Tweet"] + "alias": ["Tweet", "Twitter", "X", "X API"] } diff --git a/packages/nodes-base/nodes/Twitter/Twitter.node.ts b/packages/nodes-base/nodes/Twitter/Twitter.node.ts index 3e35c6a0f5c85..922b29f4a220e 100644 --- a/packages/nodes-base/nodes/Twitter/Twitter.node.ts +++ b/packages/nodes-base/nodes/Twitter/Twitter.node.ts @@ -8,12 +8,12 @@ import { TwitterV2 } from './V2/TwitterV2.node'; export class Twitter extends VersionedNodeType { constructor() { const baseDescription: INodeTypeBaseDescription = { - displayName: 'Twitter', + displayName: 'X (Formerly Twitter)', name: 'twitter', - icon: 'file:twitter.svg', + icon: 'file:x.svg', group: ['output'], subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', - description: 'Consume Twitter API', + description: 'Consume the X API', defaultVersion: 2, }; diff --git a/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts b/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts index b0e6f850ffbb9..19b2d5950475a 100644 --- a/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts +++ b/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts @@ -11,19 +11,19 @@ import type { JsonObject, } from 'n8n-workflow'; -import { directMessageOperations, directMessageFields } from './DirectMessageDescription'; -import { listOperations, listFields } from './ListDescription'; +import { directMessageFields, directMessageOperations } from './DirectMessageDescription'; +import { listFields, listOperations } from './ListDescription'; import { tweetFields, tweetOperations } from './TweetDescription'; -import { userOperations, userFields } from './UserDescription'; +import { userFields, userOperations } from './UserDescription'; import ISO6391 from 'iso-639-1'; +import { DateTime } from 'luxon'; import { returnId, returnIdFromUsername, twitterApiRequest, twitterApiRequestAllItems, } from './GenericFunctions'; -import { DateTime } from 'luxon'; export class TwitterV2 implements INodeType { description: INodeTypeDescription; @@ -36,7 +36,7 @@ export class TwitterV2 implements INodeType { 'Post, like, and search tweets, send messages, search users, and add users to lists', subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}', defaults: { - name: 'Twitter', + name: 'X', }, inputs: ['main'], outputs: ['main'], diff --git a/packages/nodes-base/nodes/Twitter/twitter.svg b/packages/nodes-base/nodes/Twitter/twitter.svg deleted file mode 100644 index 59c4d9b6b0e88..0000000000000 --- a/packages/nodes-base/nodes/Twitter/twitter.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/nodes-base/nodes/Twitter/x.svg b/packages/nodes-base/nodes/Twitter/x.svg new file mode 100644 index 0000000000000..7c152ac8acc97 --- /dev/null +++ b/packages/nodes-base/nodes/Twitter/x.svg @@ -0,0 +1 @@ +