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 :
2024-08-08 07:44:19 -07:00
'Some operations require a Basic or Pro API. Refer to <a href="https://developer.x.com/en/docs/twitter-api" target="_blank">X API Docs</a> for more information.' ,
name : 'apiPermissions' ,
2023-06-28 03:19:25 -07:00
type : 'notice' ,
default : '' ,
} ,
2020-06-01 17:42:38 -07:00
] ;
}