Add Google Translate node (#1086)

*  Add Google Translate node

* 🔨 Add autoload for target languages

*  Small improvements

Co-authored-by: Tanay Pant <tanaypant@protonmail.com>
This commit is contained in:
Ricardo Espinoza
2020-10-22 05:36:42 -04:00
committed by GitHub
parent 3e56d5fc08
commit b2e3b8de16
5 changed files with 384 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
const scopes = [
'https://www.googleapis.com/auth/cloud-translation',
];
export class GoogleTranslateOAuth2Api implements ICredentialType {
name = 'googleTranslateOAuth2Api';
extends = [
'googleOAuth2Api',
];
displayName = 'Google Translate OAuth2 API';
documentationUrl = 'google';
properties = [
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: scopes.join(' '),
},
];
}