mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
fix(X (Formerly Twitter) Node): Rename Twitter to X (keep Twitter alias) (#7179)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
parent
240b2f075e
commit
d317e09c59
|
@ -5,7 +5,7 @@ export class TwitterOAuth1Api implements ICredentialType {
|
||||||
|
|
||||||
extends = ['oAuth1Api'];
|
extends = ['oAuth1Api'];
|
||||||
|
|
||||||
displayName = 'Twitter OAuth API';
|
displayName = 'X OAuth API';
|
||||||
|
|
||||||
documentationUrl = 'twitter';
|
documentationUrl = 'twitter';
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ export class TwitterOAuth1Api implements ICredentialType {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName:
|
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',
|
name: 'apiPermissioms',
|
||||||
type: 'notice',
|
type: 'notice',
|
||||||
default: '',
|
default: '',
|
||||||
|
|
|
@ -21,14 +21,14 @@ export class TwitterOAuth2Api implements ICredentialType {
|
||||||
|
|
||||||
extends = ['oAuth2Api'];
|
extends = ['oAuth2Api'];
|
||||||
|
|
||||||
displayName = 'Twitter OAuth2 API';
|
displayName = 'X OAuth2 API';
|
||||||
|
|
||||||
documentationUrl = 'twitter';
|
documentationUrl = 'twitter';
|
||||||
|
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
displayName:
|
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',
|
name: 'apiPermissioms',
|
||||||
type: 'notice',
|
type: 'notice',
|
||||||
default: '',
|
default: '',
|
||||||
|
|
|
@ -32,5 +32,5 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"alias": ["Tweet"]
|
"alias": ["Tweet", "Twitter", "X", "X API"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,12 @@ import { TwitterV2 } from './V2/TwitterV2.node';
|
||||||
export class Twitter extends VersionedNodeType {
|
export class Twitter extends VersionedNodeType {
|
||||||
constructor() {
|
constructor() {
|
||||||
const baseDescription: INodeTypeBaseDescription = {
|
const baseDescription: INodeTypeBaseDescription = {
|
||||||
displayName: 'Twitter',
|
displayName: 'X (Formerly Twitter)',
|
||||||
name: 'twitter',
|
name: 'twitter',
|
||||||
icon: 'file:twitter.svg',
|
icon: 'file:x.svg',
|
||||||
group: ['output'],
|
group: ['output'],
|
||||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||||
description: 'Consume Twitter API',
|
description: 'Consume the X API',
|
||||||
defaultVersion: 2,
|
defaultVersion: 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -11,19 +11,19 @@ import type {
|
||||||
JsonObject,
|
JsonObject,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import { directMessageOperations, directMessageFields } from './DirectMessageDescription';
|
import { directMessageFields, directMessageOperations } from './DirectMessageDescription';
|
||||||
import { listOperations, listFields } from './ListDescription';
|
import { listFields, listOperations } from './ListDescription';
|
||||||
import { tweetFields, tweetOperations } from './TweetDescription';
|
import { tweetFields, tweetOperations } from './TweetDescription';
|
||||||
import { userOperations, userFields } from './UserDescription';
|
import { userFields, userOperations } from './UserDescription';
|
||||||
|
|
||||||
import ISO6391 from 'iso-639-1';
|
import ISO6391 from 'iso-639-1';
|
||||||
|
import { DateTime } from 'luxon';
|
||||||
import {
|
import {
|
||||||
returnId,
|
returnId,
|
||||||
returnIdFromUsername,
|
returnIdFromUsername,
|
||||||
twitterApiRequest,
|
twitterApiRequest,
|
||||||
twitterApiRequestAllItems,
|
twitterApiRequestAllItems,
|
||||||
} from './GenericFunctions';
|
} from './GenericFunctions';
|
||||||
import { DateTime } from 'luxon';
|
|
||||||
|
|
||||||
export class TwitterV2 implements INodeType {
|
export class TwitterV2 implements INodeType {
|
||||||
description: INodeTypeDescription;
|
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',
|
'Post, like, and search tweets, send messages, search users, and add users to lists',
|
||||||
subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
|
subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: 'Twitter',
|
name: 'X',
|
||||||
},
|
},
|
||||||
inputs: ['main'],
|
inputs: ['main'],
|
||||||
outputs: ['main'],
|
outputs: ['main'],
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 257 210" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><use xlink:href="#a" x=".5" y=".5"/><symbol id="a" overflow="visible"><path d="M80.507 208.013c96.604 0 149.442-80.036 149.442-149.442 0-2.274 0-4.537-.153-6.8A106.874 106.874 0 00256 24.595a104.84 104.84 0 01-30.167 8.264 52.709 52.709 0 0023.091-29.05 105.26 105.26 0 01-33.352 12.748C199.291-.754 173.422-4.991 152.469 6.223s-31.777 35.088-26.404 58.238A149.117 149.117 0 0117.818 9.583c-13.941 23.999-6.821 54.7 16.26 70.113a52.13 52.13 0 01-23.838-6.574v.665c.007 25.002 17.631 46.537 42.138 51.487a52.44 52.44 0 01-23.716.901c6.881 21.396 26.599 36.053 49.07 36.475a105.39 105.39 0 01-65.229 22.528A106.844 106.844 0 010 184.42a148.695 148.695 0 0080.507 23.552" stroke="none" fill="#1da1f2" fill-rule="nonzero"/></symbol></svg>
|
|
Before Width: | Height: | Size: 932 B |
1
packages/nodes-base/nodes/Twitter/x.svg
Normal file
1
packages/nodes-base/nodes/Twitter/x.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg>
|
After Width: | Height: | Size: 240 B |
Loading…
Reference in a new issue