mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 22:54:05 -08:00
af45a07f21
* fixed send media (photo, document, video etc.) issues on Telegram Node * fixed send media (photo, document, video etc.) issues on Telegram Node * file name is optional now * ⚡ lock file and linter fix * ⚡ improvements * ⚡ fixes * ⚡ Improvements * ⚡ Add placeholder to File Name * ⚡ Add error message * 🔥 Remove requestWithAuthentication * ⚡ Fix typo * 👕 Fix linting issues Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
29 lines
657 B
TypeScript
29 lines
657 B
TypeScript
import {
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
export class TelegramApi implements ICredentialType {
|
|
name = 'telegramApi';
|
|
displayName = 'Telegram API';
|
|
documentationUrl = 'telegram';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Access Token',
|
|
name: 'accessToken',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Chat with the <a href="https://telegram.me/botfather">bot father</a> to obtain the access token',
|
|
},
|
|
];
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: `=https://api.telegram.org/bot{{$credentials?.accessToken}}`,
|
|
url: '/getMe',
|
|
method: 'GET',
|
|
},
|
|
};
|
|
}
|