UNPKG

clip-magic

Version:

n8n node for ClipMagic API - Video and audio processing tools

60 lines (59 loc) 1.85 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ClipMagicApi = void 0; class ClipMagicApi { constructor() { this.name = 'clipMagicApi'; this.displayName = 'ClipMagic API'; this.documentationUrl = 'https://clipmagic.pro/docs'; this.properties = [ { displayName: 'API Key', name: 'apiKey', type: 'string', typeOptions: { password: true }, default: '', description: 'The API key for ClipMagic API', required: true, }, { displayName: 'Base URL', name: 'baseUrl', type: 'string', default: 'https://api.clipmagic.pro', description: 'Base URL for the ClipMagic API', required: true, }, ]; this.authenticate = { type: 'generic', properties: { headers: { 'X-Api-Key': '={{$credentials.apiKey}}', }, }, }; this.test = { request: { baseURL: '={{$credentials.baseUrl}}', url: '/convert', method: 'GET', qs: { url: 'https://www.w3schools.com/html/mov_bbb.mp4', output_format: 'mp3', }, }, rules: [ { type: 'responseSuccessBody', properties: { key: 'error', value: 'Invalid API key', message: 'Invalid API key provided', }, }, ], }; } } exports.ClipMagicApi = ClipMagicApi;