Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Reddit node to fetch user Saved posts #2575

Closed
wants to merge 12 commits into from
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.18.0
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Reddit/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function redditApiRequest(

const resource = this.getNodeParameter('resource', 0) as string;

const authRequired = ['profile', 'post', 'postComment'].includes(resource);
const authRequired = ['profile', 'post', 'postComment', 'user'].includes(resource);

qs.api_type = 'json';

Expand Down
1 change: 1 addition & 0 deletions packages/nodes-base/nodes/Reddit/Reddit.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class Reddit implements INodeType {
'postComment',
'post',
'profile',
'user'
],
},
},
Expand Down
6 changes: 6 additions & 0 deletions packages/nodes-base/nodes/Reddit/UserDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export const userFields: INodeProperties[] = [
name: 'Gilded',
value: 'gilded',
},
{
name: 'Saved',
value: 'saved',
},
{
name: 'Overview',
value: 'overview',
Expand Down Expand Up @@ -103,6 +107,7 @@ export const userFields: INodeProperties[] = [
'submitted',
'comments',
'gilded',
'saved',
],
},
},
Expand Down Expand Up @@ -130,6 +135,7 @@ export const userFields: INodeProperties[] = [
'gilded',
'overview',
'submitted',
'saved',
],
returnAll: [
false,
Expand Down