n8n-nodes-base
Version:
Base nodes of n8n
152 lines (147 loc) • 3.44 kB
text/typescript
/**
* Reddit Node - Version 1
* Discriminator: resource=post, operation=getAll
*/
interface Credentials {
redditOAuth2Api: CredentialReference;
}
/** Retrieve many comments in a post */
export type RedditV1PostGetAllParams = {
resource: 'post';
operation: 'getAll';
/**
* The name of subreddit to retrieve the posts from
*/
subreddit?: string | Expression<string> | PlaceholderValue;
/**
* Whether to return all results or only up to a given limit
* @default false
*/
returnAll?: boolean | Expression<boolean>;
/**
* Max number of results to return
* @displayOptions.show { returnAll: [false] }
* @default 100
*/
limit?: number | Expression<number>;
/**
* Filters
* @default {}
*/
filters?: {
/** Category of the posts to retrieve
* @default top
*/
category?: 'top' | 'hot' | 'new' | 'rising' | Expression<string>;
};
};
export type RedditV1PostGetAllOutput = {
allow_live_comments?: boolean;
approved_at_utc?: null;
approved_by?: null;
archived?: boolean;
author?: string;
author_flair_richtext?: Array<{
a?: string;
e?: string;
t?: string;
u?: string;
}>;
author_flair_type?: string;
author_fullname?: string;
author_is_blocked?: boolean;
author_patreon_flair?: boolean;
author_premium?: boolean;
banned_at_utc?: null;
banned_by?: null;
can_gild?: boolean;
can_mod_post?: boolean;
category?: null;
clicked?: boolean;
contest_mode?: boolean;
created?: number;
created_utc?: number;
discussion_type?: null;
domain?: string;
downs?: number;
gilded?: number;
hidden?: boolean;
hide_score?: boolean;
id?: string;
is_created_from_ads_ui?: boolean;
is_crosspostable?: boolean;
is_meta?: boolean;
is_original_content?: boolean;
is_reddit_media_domain?: boolean;
is_robot_indexable?: boolean;
is_self?: boolean;
is_video?: boolean;
link_flair_richtext?: Array<{
e?: string;
t?: string;
}>;
link_flair_template_id?: string;
link_flair_type?: string;
locked?: boolean;
media_only?: boolean;
mod_note?: null;
mod_reason_by?: null;
mod_reason_title?: null;
name?: string;
no_follow?: boolean;
num_comments?: number;
num_crossposts?: number;
num_reports?: null;
over_18?: boolean;
permalink?: string;
pinned?: boolean;
post_hint?: string;
preview?: {
enabled?: boolean;
images?: Array<{
id?: string;
resolutions?: Array<{
height?: number;
url?: string;
width?: number;
}>;
source?: {
height?: number;
url?: string;
width?: number;
};
}>;
};
quarantine?: boolean;
removal_reason?: null;
removed_by?: null;
removed_by_category?: null;
report_reasons?: null;
saved?: boolean;
score?: number;
selftext?: string;
send_replies?: boolean;
spoiler?: boolean;
stickied?: boolean;
subreddit?: string;
subreddit_id?: string;
subreddit_name_prefixed?: string;
subreddit_subscribers?: number;
subreddit_type?: string;
thumbnail?: string;
title?: string;
top_awarded_type?: null;
total_awards_received?: number;
ups?: number;
url?: string;
url_overridden_by_dest?: string;
view_count?: null;
visited?: boolean;
};
export type RedditV1PostGetAllNode = {
type: 'n8n-nodes-base.reddit';
version: 1;
credentials?: Credentials;
config: NodeConfig<RedditV1PostGetAllParams>;
output?: Items<RedditV1PostGetAllOutput>;
};