2023-01-27 03:22:44 -08:00
import type { ICredentialType , INodeProperties } from 'n8n-workflow' ;
2020-06-01 17:42:38 -07:00
export class TwitterOAuth1Api implements ICredentialType {
name = 'twitterOAuth1Api' ;
2022-12-02 12:54:28 -08:00
2022-07-24 08:36:17 -07:00
extends = [ 'oAuth1Api' ] ;
2022-12-02 12:54:28 -08:00
2023-09-15 06:04:16 -07:00
displayName = 'X OAuth API' ;
2022-12-02 12:54:28 -08:00
2020-08-17 05:42:09 -07:00
documentationUrl = 'twitter' ;
2022-12-02 12:54:28 -08:00
2021-06-12 09:39:55 -07:00
properties : INodeProperties [ ] = [
2020-06-01 17:42:38 -07:00
{
displayName : 'Request Token URL' ,
name : 'requestTokenUrl' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
2020-06-01 17:42:38 -07:00
default : 'https://api.twitter.com/oauth/request_token' ,
} ,
{
displayName : 'Authorization URL' ,
name : 'authUrl' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
2020-06-01 17:42:38 -07:00
default : 'https://api.twitter.com/oauth/authorize' ,
} ,
{
displayName : 'Access Token URL' ,
name : 'accessTokenUrl' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
2020-06-01 17:42:38 -07:00
default : 'https://api.twitter.com/oauth/access_token' ,
} ,
{
displayName : 'Signature Method' ,
name : 'signatureMethod' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
2020-06-01 17:42:38 -07:00
default : 'HMAC-SHA1' ,
} ,
2023-06-28 03:19:25 -07:00
{
displayName :
2023-09-15 06:04:16 -07:00
'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>' ,
2023-06-28 03:19:25 -07:00
name : 'apiPermissioms' ,
type : 'notice' ,
default : '' ,
} ,
2020-06-01 17:42:38 -07:00
] ;
}