mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
add resource
This commit is contained in:
@@ -17,10 +17,12 @@ export class Zoom implements INodeType {
|
|||||||
group: ['input'],
|
group: ['input'],
|
||||||
version: 1,
|
version: 1,
|
||||||
description: 'Consume Zoom API',
|
description: 'Consume Zoom API',
|
||||||
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: 'Zoom',
|
name: 'Zoom',
|
||||||
color: '#772244'
|
color: '#772244'
|
||||||
},
|
},
|
||||||
|
icon: 'file:zoom.png',
|
||||||
inputs: ['main'],
|
inputs: ['main'],
|
||||||
outputs: ['main'],
|
outputs: ['main'],
|
||||||
credentials: [
|
credentials: [
|
||||||
@@ -60,6 +62,19 @@ export class Zoom implements INodeType {
|
|||||||
],
|
],
|
||||||
default: 'accessToken',
|
default: 'accessToken',
|
||||||
description: 'The resource to operate on.'
|
description: 'The resource to operate on.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Resource',
|
||||||
|
name: 'resource',
|
||||||
|
type: 'options',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'meeting',
|
||||||
|
value: 'meeting'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
default: 'meeting',
|
||||||
|
description: 'The resource to operate on.'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@@ -72,26 +87,27 @@ export class Zoom implements INodeType {
|
|||||||
let responseData;
|
let responseData;
|
||||||
const authentication = this.getNodeParameter('authentication', 0) as string;
|
const authentication = this.getNodeParameter('authentication', 0) as string;
|
||||||
const resource = this.getNodeParameter('resource', 0) as string;
|
const resource = this.getNodeParameter('resource', 0) as string;
|
||||||
const operation = this.getNodeParameter('operation', 0) as string;
|
// const operation = this.getNodeParameter('operation', 0) as string;
|
||||||
for (let i = 0; i < length; i++) {
|
console.log(this.getCredentials('zoomOAuth2Api'));
|
||||||
qs = {};
|
// for (let i = 0; i < length; i++) {
|
||||||
if (resource === 'channel') {
|
// qs = {};
|
||||||
//https://api.slack.com/methods/conversations.archive
|
// if (resource === 'channel') {
|
||||||
if (operation === 'archive') {
|
// //https://api.slack.com/methods/conversations.archive
|
||||||
const channel = this.getNodeParameter('channelId', i) as string;
|
// if (operation === 'archive') {
|
||||||
const body: IDataObject = {
|
// const channel = this.getNodeParameter('channelId', i) as string;
|
||||||
channel
|
// const body: IDataObject = {
|
||||||
};
|
// channel
|
||||||
responseData = await zoomApiRequest.call(
|
// };
|
||||||
this,
|
// responseData = await zoomApiRequest.call(
|
||||||
'POST',
|
// this,
|
||||||
'/conversations.archive',
|
// 'POST',
|
||||||
body,
|
// '/conversations.archive',
|
||||||
qs
|
// body,
|
||||||
);
|
// qs
|
||||||
}
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
if (Array.isArray(responseData)) {
|
if (Array.isArray(responseData)) {
|
||||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user