1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
*
* The version of the OpenAPI document: 1.0.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// 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.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RedditPlatformData {
/// Target subreddit name (without \"r/\" prefix). Overrides the default. Use GET /v1/accounts/{id}/reddit-subreddits to list options.
#[serde(rename = "subreddit", skip_serializing_if = "Option::is_none")]
pub subreddit: Option<String>,
/// Post title. Defaults to the first line of content, truncated to 300 characters.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// URL for link posts. If provided (and forceSelf is not true), creates a link post instead of a text post.
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// When true, creates a text/self post even when a URL or media is provided.
#[serde(rename = "forceSelf", skip_serializing_if = "Option::is_none")]
pub force_self: Option<bool>,
/// Flair ID for the post. Required by some subreddits. Use GET /v1/accounts/{id}/reddit-flairs?subreddit=name to list flairs.
#[serde(rename = "flairId", skip_serializing_if = "Option::is_none")]
pub flair_id: Option<String>,
}
impl 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.
pub fn new() -> RedditPlatformData {
RedditPlatformData {
subreddit: None,
title: None,
url: None,
force_self: None,
flair_id: None,
}
}
}