mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
Update space indentation to tab
This commit is contained in:
@@ -11,7 +11,7 @@ export class DisqusApi implements ICredentialType {
|
|||||||
displayName: 'Access Token',
|
displayName: 'Access Token',
|
||||||
name: 'accessToken',
|
name: 'accessToken',
|
||||||
type: 'string' as NodePropertyTypes,
|
type: 'string' as NodePropertyTypes,
|
||||||
default: '',
|
default: '',
|
||||||
description: 'Visit your account details page, and grab the Access Token. See <a href="https://disqus.com/api/docs/auth/">Disqus auth</a>.'
|
description: 'Visit your account details page, and grab the Access Token. See <a href="https://disqus.com/api/docs/auth/">Disqus auth</a>.'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -63,16 +63,16 @@ export class Disqus implements INodeType {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'Get',
|
name: 'Get',
|
||||||
value: 'get',
|
value: 'get',
|
||||||
description: 'Returns forum details.',
|
description: 'Returns forum details.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Get All Categories',
|
name: 'Get All Categories',
|
||||||
value: 'getCategories',
|
value: 'getCategories',
|
||||||
description: 'Returns a list of categories within a forum.',
|
description: 'Returns a list of categories within a forum.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Get All Threads',
|
name: 'Get All Threads',
|
||||||
value: 'getThreads',
|
value: 'getThreads',
|
||||||
@@ -194,43 +194,43 @@ export class Disqus implements INodeType {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
default: '[]',
|
default: '[]',
|
||||||
description: 'You may specify relations to include with your response. Choices `author`',
|
description: 'You may specify relations to include with your response. Choices `author`',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Cursor',
|
displayName: 'Cursor',
|
||||||
name: 'cursor',
|
name: 'cursor',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
default: '',
|
||||||
description: 'You may specify cursor for your response.',
|
description: 'You may specify cursor for your response.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Limit',
|
displayName: 'Limit',
|
||||||
name: 'limit',
|
name: 'limit',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 25,
|
default: 25,
|
||||||
description: 'You may specify relations maximum number of posts to return. Maximum value is 100',
|
description: 'You may specify relations maximum number of posts to return. Maximum value is 100',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Filters',
|
displayName: 'Filters',
|
||||||
name: 'filters',
|
name: 'filters',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '[]',
|
default: '[]',
|
||||||
description: 'You may specify filters for your response. Choices: `Is_Anonymous`, `Has_Link`, `Has_Low_Rep_Author`, `Has_Bad_Word`, `Is_Flagged`, `No_Issue`, `Is_Toxic`, `Modified_By_Rule`, `Shadow_Banned`, `Has_Media`, `Is_At_Flag_Limit`',
|
description: 'You may specify filters for your response. Choices: `Is_Anonymous`, `Has_Link`, `Has_Low_Rep_Author`, `Has_Bad_Word`, `Is_Flagged`, `No_Issue`, `Is_Toxic`, `Modified_By_Rule`, `Shadow_Banned`, `Has_Media`, `Is_At_Flag_Limit`',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Query',
|
displayName: 'Query',
|
||||||
name: 'query',
|
name: 'query',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
default: '',
|
||||||
description: 'You may specify query for your response.',
|
description: 'You may specify query for your response.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Include',
|
displayName: 'Include',
|
||||||
name: 'include',
|
name: 'include',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: false,
|
default: false,
|
||||||
description: 'You may specify relations to include with your response. Choices `author`',
|
description: 'You may specify relations to include with your response. Choices `author`',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Order',
|
displayName: 'Order',
|
||||||
name: 'order',
|
name: 'order',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@@ -238,9 +238,9 @@ export class Disqus implements INodeType {
|
|||||||
description: 'You may specify order to sort your response.Choices: asc, desc',
|
description: 'You may specify order to sort your response.Choices: asc, desc',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// forum:getCategories
|
// forum:getCategories
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
{
|
{
|
||||||
@@ -285,14 +285,14 @@ export class Disqus implements INodeType {
|
|||||||
default: `[]`,
|
default: `[]`,
|
||||||
description: 'You may specify cursor since_id for your response.',
|
description: 'You may specify cursor since_id for your response.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Cursor',
|
displayName: 'Cursor',
|
||||||
name: 'cursor',
|
name: 'cursor',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
default: '',
|
||||||
description: 'You may specify cursor for your response.',
|
description: 'You may specify cursor for your response.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Order',
|
displayName: 'Order',
|
||||||
name: 'order',
|
name: 'order',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@@ -300,9 +300,9 @@ export class Disqus implements INodeType {
|
|||||||
description: 'You may specify order to sort your response.Choices: asc, desc',
|
description: 'You may specify order to sort your response.Choices: asc, desc',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// forum:getThreads
|
// forum:getThreads
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
{
|
{
|
||||||
@@ -339,8 +339,8 @@ export class Disqus implements INodeType {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: {},
|
default: {},
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
displayName: 'Thread',
|
displayName: 'Thread',
|
||||||
name: 'threadId',
|
name: 'threadId',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@@ -360,29 +360,29 @@ export class Disqus implements INodeType {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
default: '[]',
|
default: '[]',
|
||||||
description: 'You may specify relations to include with your response. Choices `author`',
|
description: 'You may specify relations to include with your response. Choices `author`',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Cursor',
|
displayName: 'Cursor',
|
||||||
name: 'cursor',
|
name: 'cursor',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
default: '',
|
||||||
description: 'You may specify cursor for your response.',
|
description: 'You may specify cursor for your response.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Limit',
|
displayName: 'Limit',
|
||||||
name: 'limit',
|
name: 'limit',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 25,
|
default: 25,
|
||||||
description: 'You may specify relations maximum number of posts to return. Maximum value is 100',
|
description: 'You may specify relations maximum number of posts to return. Maximum value is 100',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Include',
|
displayName: 'Include',
|
||||||
name: 'include',
|
name: 'include',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
default: '',
|
||||||
description: 'You may specify relations to include with your response. Choices: open, closed, killed',
|
description: 'You may specify relations to include with your response. Choices: open, closed, killed',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Order',
|
displayName: 'Order',
|
||||||
name: 'order',
|
name: 'order',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@@ -390,7 +390,7 @@ export class Disqus implements INodeType {
|
|||||||
description: 'You may specify order to sort your response.Choices: asc, desc',
|
description: 'You may specify order to sort your response.Choices: asc, desc',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -415,7 +415,7 @@ export class Disqus implements INodeType {
|
|||||||
|
|
||||||
|
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
body = {};
|
body = {};
|
||||||
qs = {};
|
qs = {};
|
||||||
|
|
||||||
if (resource === 'forum') {
|
if (resource === 'forum') {
|
||||||
@@ -426,10 +426,10 @@ export class Disqus implements INodeType {
|
|||||||
|
|
||||||
requestMethod = 'GET';
|
requestMethod = 'GET';
|
||||||
|
|
||||||
endpoint = 'forums/details.json';
|
endpoint = 'forums/details.json';
|
||||||
|
|
||||||
const id = this.getNodeParameter('id', i) as string;
|
const id = this.getNodeParameter('id', i) as string;
|
||||||
qs.forum = id;
|
qs.forum = id;
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||||
|
|
||||||
@@ -442,10 +442,10 @@ export class Disqus implements INodeType {
|
|||||||
|
|
||||||
requestMethod = 'GET';
|
requestMethod = 'GET';
|
||||||
|
|
||||||
endpoint = 'forums/listPosts.json';
|
endpoint = 'forums/listPosts.json';
|
||||||
|
|
||||||
const id = this.getNodeParameter('id', i) as string;
|
const id = this.getNodeParameter('id', i) as string;
|
||||||
qs.forum = id;
|
qs.forum = id;
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||||
|
|
||||||
@@ -458,10 +458,10 @@ export class Disqus implements INodeType {
|
|||||||
|
|
||||||
requestMethod = 'GET';
|
requestMethod = 'GET';
|
||||||
|
|
||||||
endpoint = 'forums/listCategories.json';
|
endpoint = 'forums/listCategories.json';
|
||||||
|
|
||||||
const id = this.getNodeParameter('id', i) as string;
|
const id = this.getNodeParameter('id', i) as string;
|
||||||
qs.forum = id;
|
qs.forum = id;
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||||
|
|
||||||
@@ -474,10 +474,10 @@ export class Disqus implements INodeType {
|
|||||||
|
|
||||||
requestMethod = 'GET';
|
requestMethod = 'GET';
|
||||||
|
|
||||||
endpoint = 'forums/listThreads.json';
|
endpoint = 'forums/listThreads.json';
|
||||||
|
|
||||||
const id = this.getNodeParameter('id', i) as string;
|
const id = this.getNodeParameter('id', i) as string;
|
||||||
qs.forum = id;
|
qs.forum = id;
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||||
|
|
||||||
@@ -485,14 +485,14 @@ export class Disqus implements INodeType {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`The operation "${operation}" is not known!`);
|
throw new Error(`The operation "${operation}" is not known!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`The resource "${resource}" is not known!`);
|
throw new Error(`The resource "${resource}" is not known!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
qs.api_key = credentials.accessToken;
|
qs.api_key = credentials.accessToken;
|
||||||
endpoint = `https://disqus.com/api/3.0/${endpoint}`;
|
endpoint = `https://disqus.com/api/3.0/${endpoint}`;
|
||||||
|
|
||||||
const options: OptionsWithUri = {
|
const options: OptionsWithUri = {
|
||||||
method: requestMethod,
|
method: requestMethod,
|
||||||
@@ -527,6 +527,6 @@ export class Disqus implements INodeType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [this.helpers.returnJsonArray(returnData)];
|
return [this.helpers.returnJsonArray(returnData)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user