2022-08-17 08:50:24 -07:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
2021-02-04 00:37:03 -08:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const profileOperations: INodeProperties[] = [
|
2021-02-04 00:37:03 -08:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2021-02-04 00:37:03 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['profile'],
|
2021-02-04 00:37:03 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a profile',
|
2021-02-04 00:37:03 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'get',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2021-02-04 00:37:03 -08:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const profileFields: INodeProperties[] = [
|
2021-02-04 00:37:03 -08:00
|
|
|
{
|
|
|
|
displayName: 'Details',
|
|
|
|
name: 'details',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
default: 'identity',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Details of my account to retrieve',
|
2021-02-04 00:37:03 -08:00
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Blocked Users',
|
|
|
|
value: 'blockedUsers',
|
|
|
|
description: 'Return the blocked users of the logged-in user',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Friends',
|
|
|
|
value: 'friends',
|
|
|
|
description: 'Return the friends of the logged-in user',
|
|
|
|
},
|
2022-06-03 10:23:49 -07:00
|
|
|
{
|
|
|
|
name: 'Identity',
|
|
|
|
value: 'identity',
|
|
|
|
description: 'Return the identity of the logged-in user',
|
|
|
|
},
|
2021-02-04 00:37:03 -08:00
|
|
|
{
|
|
|
|
name: 'Karma',
|
|
|
|
value: 'karma',
|
|
|
|
description: 'Return the subreddit karma for the logged-in user',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Preferences',
|
|
|
|
value: 'prefs',
|
|
|
|
description: 'Return the settings preferences of the logged-in user',
|
|
|
|
},
|
2022-03-27 01:57:45 -07:00
|
|
|
{
|
|
|
|
name: 'Saved',
|
|
|
|
value: 'saved',
|
|
|
|
description: 'Return the saved posts for the user',
|
|
|
|
},
|
2021-02-04 00:37:03 -08:00
|
|
|
{
|
|
|
|
name: 'Trophies',
|
|
|
|
value: 'trophies',
|
|
|
|
description: 'Return the trophies of the logged-in user',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['profile'],
|
|
|
|
operation: ['get'],
|
2021-02-04 00:37:03 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-27 01:57:45 -07:00
|
|
|
{
|
|
|
|
displayName: 'Return All',
|
|
|
|
name: 'returnAll',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Whether to return all results or only up to a given limit',
|
2022-03-27 01:57:45 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['profile'],
|
|
|
|
operation: ['get'],
|
|
|
|
details: ['saved'],
|
2022-03-27 01:57:45 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Limit',
|
|
|
|
name: 'limit',
|
|
|
|
type: 'number',
|
|
|
|
default: 100,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Max number of results to return',
|
2022-03-27 01:57:45 -07:00
|
|
|
typeOptions: {
|
|
|
|
minValue: 1,
|
|
|
|
maxValue: 100,
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['profile'],
|
|
|
|
operation: ['get'],
|
|
|
|
details: ['saved'],
|
|
|
|
returnAll: [false],
|
2022-03-27 01:57:45 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|