2021-01-15 16:34:46 -08:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
2021-01-22 14:35:12 -08:00
|
|
|
export const profileOperations = [
|
2021-01-15 16:34:46 -08:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
2021-01-22 14:35:12 -08:00
|
|
|
'profile',
|
2021-01-15 16:34:46 -08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
2021-01-17 10:11:03 -08:00
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
2021-01-17 10:11:03 -08:00
|
|
|
],
|
|
|
|
default: 'get',
|
|
|
|
description: 'Operation to perform',
|
|
|
|
},
|
|
|
|
] as INodeProperties[];
|
|
|
|
|
|
|
|
|
2021-01-22 14:35:12 -08:00
|
|
|
export const profileFields = [
|
2021-01-17 10:11:03 -08:00
|
|
|
{
|
|
|
|
displayName: 'Details',
|
|
|
|
name: 'details',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
default: 'identity',
|
2021-01-29 06:44:02 -08:00
|
|
|
description: 'Details of my account to retrieve.',
|
2021-01-17 10:11:03 -08:00
|
|
|
options: [
|
2021-01-15 16:34:46 -08:00
|
|
|
{
|
2021-01-17 10:11:03 -08:00
|
|
|
name: 'Identity',
|
|
|
|
value: 'identity',
|
2021-01-29 06:44:02 -08:00
|
|
|
description: 'Return the identity of the logged-in user.',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
|
|
|
{
|
2021-01-22 12:56:52 -08:00
|
|
|
name: 'Blocked Users',
|
2021-01-17 10:11:03 -08:00
|
|
|
value: 'blockedUsers',
|
2021-01-29 06:44:02 -08:00
|
|
|
description: 'Return the blocked users of the logged-in user.',
|
2021-01-17 10:11:03 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Friends',
|
|
|
|
value: 'friends',
|
2021-01-29 06:44:02 -08:00
|
|
|
description: 'Return the friends of the logged-in user.',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
|
|
|
{
|
2021-01-17 10:11:03 -08:00
|
|
|
name: 'Karma',
|
|
|
|
value: 'karma',
|
2021-01-29 06:44:02 -08:00
|
|
|
description: 'Return the subreddit karma for the logged-in user.',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
|
|
|
{
|
2021-01-19 07:48:15 -08:00
|
|
|
name: 'Preferences',
|
2021-01-17 10:11:03 -08:00
|
|
|
value: 'prefs',
|
|
|
|
description: 'Return the settings preferences of the logged-in user',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
|
|
|
{
|
2021-01-17 10:11:03 -08:00
|
|
|
name: 'Trophies',
|
|
|
|
value: 'trophies',
|
2021-01-29 06:44:02 -08:00
|
|
|
description: 'Return the trophies of the logged-in user.',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
|
|
|
],
|
2021-01-17 10:11:03 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
2021-01-22 14:35:12 -08:00
|
|
|
'profile',
|
2021-01-17 10:11:03 -08:00
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'get',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
2021-01-17 12:18:17 -08:00
|
|
|
] as INodeProperties[];
|