n8n-nodes-evolution-api
Advanced tools
Comparing version 0.1.17 to 0.1.18
@@ -1,4 +0,5 @@ | ||
import { INodeType, INodeTypeDescription } from 'n8n-workflow'; | ||
import { INodeType, INodeTypeDescription, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; | ||
export declare class HttpBin implements INodeType { | ||
description: INodeTypeDescription; | ||
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>; | ||
} |
@@ -57,4 +57,25 @@ "use strict"; | ||
} | ||
async execute() { | ||
const resource = this.getNodeParameter('resource', 0); | ||
const operation = this.getNodeParameter('operation', 0); | ||
let responseData; | ||
if (resource === 'fetch-instances' && operation === 'fetch-instances') { | ||
const credentials = await this.getCredentials('httpbinApi'); | ||
const serverUrl = credentials['server-url']; | ||
const apiKey = credentials.apikey; | ||
const instanceName = this.getNodeParameter('instanceName', 0); | ||
const options = { | ||
method: 'GET', | ||
headers: { | ||
apikey: apiKey, | ||
}, | ||
uri: `${serverUrl}/instance/fetchInstances${instanceName ? `?instanceName=${instanceName}` : ''}`, | ||
json: true, | ||
}; | ||
responseData = await this.helpers.request(options); | ||
} | ||
return [this.helpers.returnJsonArray(responseData)]; | ||
} | ||
} | ||
exports.HttpBin = HttpBin; | ||
//# sourceMappingURL=HttpBin.node.js.map |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.17", | ||
"version": "0.1.18", | ||
"description": "Api não oficial do WhatsApp", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.17", | ||
"version": "0.1.18", | ||
"description": "Api não oficial do WhatsApp", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57457
575