mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-28 05:59:42 -08:00
107 lines
1.6 KiB
TypeScript
107 lines
1.6 KiB
TypeScript
import {
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export const allRedditOperations = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
default: 'get',
|
|
description: 'Operation to perform',
|
|
options: [
|
|
{
|
|
name: 'Get',
|
|
value: 'get',
|
|
},
|
|
],
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'allReddit',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
] as INodeProperties[];
|
|
|
|
export const allRedditFields = [
|
|
{
|
|
displayName: 'Information',
|
|
name: 'information',
|
|
type: 'options',
|
|
required: true,
|
|
default: 'trending',
|
|
description: 'All-Reddit information to retrieve',
|
|
options: [
|
|
{
|
|
name: 'Trending',
|
|
value: 'trending',
|
|
description: 'Currently trending subreddits',
|
|
},
|
|
{
|
|
name: 'Best',
|
|
value: 'best',
|
|
description: 'Top posts in all of Reddit',
|
|
},
|
|
],
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'allReddit',
|
|
],
|
|
operation: [
|
|
'get',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
default: false,
|
|
description: 'Return all results',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'allReddit',
|
|
],
|
|
operation: [
|
|
'get',
|
|
],
|
|
information: [
|
|
'best',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Limit',
|
|
name: 'limit',
|
|
type: 'number',
|
|
default: 5,
|
|
description: 'The number of results to return',
|
|
typeOptions: {
|
|
minValue: 1,
|
|
maxValue: 100,
|
|
},
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'allReddit',
|
|
],
|
|
operation: [
|
|
'get',
|
|
],
|
|
information: [
|
|
'best',
|
|
],
|
|
returnAll: [
|
|
false,
|
|
],
|
|
},
|
|
},
|
|
},
|
|
] as INodeProperties[];
|