n8n-nodes-placid
Version:
n8n node to interact with Placid API for creative generation
26 lines • 859 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVideoById = getVideoById;
exports.execute = execute;
async function getVideoById(executeFunctions, videoId) {
const options = {
method: 'GET',
url: `https://api.placid.app/api/rest/videos/${videoId}`,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
};
return await executeFunctions.helpers.httpRequestWithAuthentication.call(executeFunctions, 'placidApi', options);
}
async function execute(i) {
const videoId = this.getNodeParameter('videoId', i);
if (!videoId) {
throw new Error('Video ID is required');
}
const response = await getVideoById(this, videoId);
return {
json: response,
};
}
//# sourceMappingURL=get.operation.js.map