pub struct RedditPlatformData {
pub subreddit: Option<String>,
pub title: Option<String>,
pub url: Option<String>,
pub force_self: Option<bool>,
pub flair_id: Option<String>,
}Expand description
RedditPlatformData : Posts are either link (with URL/media) or self (text-only). Use forceSelf to override. Subreddit defaults to the account’s configured one. Some subreddits require a flair.
Fields§
§subreddit: Option<String>Target subreddit name (without "r/" prefix). Overrides the default. Use GET /v1/accounts/{id}/reddit-subreddits to list options.
title: Option<String>Post title. Defaults to the first line of content, truncated to 300 characters.
url: Option<String>URL for link posts. If provided (and forceSelf is not true), creates a link post instead of a text post.
force_self: Option<bool>When true, creates a text/self post even when a URL or media is provided.
flair_id: Option<String>Flair ID for the post. Required by some subreddits. Use GET /v1/accounts/{id}/reddit-flairs?subreddit=name to list flairs.
Implementations§
Source§impl RedditPlatformData
impl RedditPlatformData
Sourcepub fn new() -> RedditPlatformData
pub fn new() -> RedditPlatformData
Posts are either link (with URL/media) or self (text-only). Use forceSelf to override. Subreddit defaults to the account’s configured one. Some subreddits require a flair.
Trait Implementations§
Source§impl Clone for RedditPlatformData
impl Clone for RedditPlatformData
Source§fn clone(&self) -> RedditPlatformData
fn clone(&self) -> RedditPlatformData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more