n8n-nodes-base
Version:
Base nodes of n8n
139 lines (134 loc) • 3.3 kB
text/typescript
/**
* Reddit Node - Version 1
* Discriminator: resource=post, operation=search
*/
interface Credentials {
redditOAuth2Api: CredentialReference;
}
/** Search posts in a subreddit or in all of Reddit */
export type RedditV1PostSearchParams = {
resource: 'post';
operation: 'search';
/**
* Location where to search for posts
* @default subreddit
*/
location?: 'allReddit' | 'subreddit' | Expression<string>;
/**
* The name of subreddit to search in
* @displayOptions.show { location: ["subreddit"] }
*/
subreddit?: string | Expression<string> | PlaceholderValue;
/**
* The keyword for the search
*/
keyword?: 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>;
/**
* Additional Fields
* @default {}
*/
additionalFields?: {
/** The category to sort results by
* @default relevance
*/
sort?: 'comments' | 'hot' | 'new' | 'relevance' | 'top' | Expression<string>;
};
};
export type RedditV1PostSearchOutput = {
allow_live_comments?: boolean;
approved_at_utc?: null;
approved_by?: null;
archived?: boolean;
author?: string;
author_flair_richtext?: Array<{
e?: string;
t?: 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_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;
over_18?: boolean;
permalink?: string;
pinned?: boolean;
quarantine?: boolean;
removal_reason?: null;
removed_by?: null;
removed_by_category?: 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;
view_count?: null;
visited?: boolean;
};
export type RedditV1PostSearchNode = {
type: 'n8n-nodes-base.reddit';
version: 1;
credentials?: Credentials;
config: NodeConfig<RedditV1PostSearchParams>;
output?: Items<RedditV1PostSearchOutput>;
};