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>,
pub native_video: Option<bool>,
pub videogif: Option<bool>,
pub video_poster_url: Option<String>,
}Expand description
RedditPlatformData : Posts are either link (with URL/media), native video (via nativeVideo), 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.
native_video: Option<bool>Controls Reddit’s native video upload flow. When true (default for video mediaItems), the video is uploaded to Reddit’s CDN and submitted with kind=video so it renders as an embedded Reddit video player. Reddit transcodes server-side (1080p/30fps cap). Set to false to fall back to a legacy link post. If the subreddit blocks video posts, the upload falls back to a link post automatically.
videogif: Option<bool>When true (and nativeVideo is active), submits the video as a silent videogif (kind=videogif). Use for short looping clips without audio.
video_poster_url: Option<String>Optional poster/thumbnail image URL for native video posts. If omitted, the first frame of the video is extracted and used automatically.
Implementations§
Source§impl RedditPlatformData
impl RedditPlatformData
Sourcepub fn new() -> RedditPlatformData
pub fn new() -> RedditPlatformData
Posts are either link (with URL/media), native video (via nativeVideo), 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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RedditPlatformData
impl Debug for RedditPlatformData
Source§impl Default for RedditPlatformData
impl Default for RedditPlatformData
Source§fn default() -> RedditPlatformData
fn default() -> RedditPlatformData
Source§impl<'de> Deserialize<'de> for RedditPlatformData
impl<'de> Deserialize<'de> for RedditPlatformData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for RedditPlatformData
impl PartialEq for RedditPlatformData
Source§fn eq(&self, other: &RedditPlatformData) -> bool
fn eq(&self, other: &RedditPlatformData) -> bool
self and other values to be equal, and is used by ==.