pub struct Post {Show 16 fields
pub no: u32,
pub resto: u32,
pub now: String,
pub time: u64,
pub author: String,
pub trip: Option<String>,
pub author_id: Option<String>,
pub capcode: Option<Capcode>,
pub country: Option<String>,
pub country_name: Option<String>,
pub board_flag: Option<String>,
pub flag_name: Option<String>,
pub comment: Option<String>,
pub attachment: Option<Attachment>,
pub file_deleted: bool,
pub since_4pass: Option<i32>,
}Fields§
§no: u32The number of the post.
resto: u32For replies: this is the ID of the thread being replied to. For OP: this value is zero.
now: StringMM/DD/YY(Day)HH:MM (:SS on some boards), EST/EDT timezone.
time: u64UNIX timestamp the post was created.
The name user posted with, defaults to anonymous.
trip: Option<String>The user’s tripcode, in format: !tripcode or !!securetripcode.
The posters ID.
capcode: Option<Capcode>The caption code of the post, if any.
country: Option<String>Poster’s ISO 3166-1 alpha-2 country code. Only available in certain boards.
country_name: Option<String>Posters country name. Only available in some boards.
board_flag: Option<String>Posters board flag code. Only available in certain boards.
flag_name: Option<String>Posters board flag name. Only available in certain boards.
comment: Option<String>The body of the post, if any. The comment is HTML escaped.
attachment: Option<Attachment>Attachment metadata for this post, if any.
file_deleted: booltrue if the post had an attachment but was deleted.
since_4pass: Option<i32>The year 4chan pass was bought.
Implementations§
Source§impl Post
impl Post
Sourcepub fn attachment_url(&self, board: &str) -> Option<String>
pub fn attachment_url(&self, board: &str) -> Option<String>
Returns a URL where the media of this posts attachment can be retreived from.
§Arguments
board: The abbreviation of the board name this post was posted in. E.g."mu".
§Notes
There is no clean way of storing the board name in a Post
therefore this is currently an argument.
Calling this method with an invalid board name results in an invalid URL, not None.