Skip to content

Commit

Permalink
fix(X (Formerly Twitter) Node): Rename Twitter to X (keep Twitter ali…
Browse files Browse the repository at this point in the history
…as) (#7179)

Github issue / Community forum post (link here to close automatically):
  • Loading branch information
elsmr authored Sep 15, 2023
1 parent 240b2f0 commit d317e09
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export class TwitterOAuth1Api implements ICredentialType {

extends = ['oAuth1Api'];

displayName = 'Twitter OAuth API';
displayName = 'X OAuth API';

documentationUrl = 'twitter';

Expand Down Expand Up @@ -36,7 +36,7 @@ export class TwitterOAuth1Api implements ICredentialType {
},
{
displayName:
'Some operations requires a Basic or a Pro API for more informations see <a href="https://developer.twitter.com/en/products/twitter-api" target="_blank">Twitter Api Doc</a>',
'Some operations requires a Basic or a Pro API for more informations see <a href="https://developer.twitter.com/en/products/twitter-api" target="_blank">X API Docs</a>',
name: 'apiPermissioms',
type: 'notice',
default: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://developer.twitter.com/en/products/twitter-api" target="_blank">Twitter Api Doc</a>',
'Some operations requires a Basic or a Pro API for more informations see <a href="https://developer.twitter.com/en/products/twitter-api" target="_blank">X API Docs</a>',
name: 'apiPermissioms',
type: 'notice',
default: '',
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Twitter/Twitter.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
}
]
},
"alias": ["Tweet"]
"alias": ["Tweet", "Twitter", "X", "X API"]
}
6 changes: 3 additions & 3 deletions packages/nodes-base/nodes/Twitter/Twitter.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
10 changes: 5 additions & 5 deletions packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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'],
Expand Down
1 change: 0 additions & 1 deletion packages/nodes-base/nodes/Twitter/twitter.svg

This file was deleted.

1 change: 1 addition & 0 deletions packages/nodes-base/nodes/Twitter/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d317e09

Please sign in to comment.