added poll data and selftext html to post

This commit is contained in:
2026-02-15 21:09:15 -06:00
parent e10177f710
commit 0599835374
+17 -2
View File
@@ -531,8 +531,9 @@ type Post struct {
RemovedByCategory *string `json:"removed_by_category"`
CrosspostParentList []Post `json:"crosspost_parent_list"`
Title string `json:"title,omitempty"`
Body string `json:"selftext,omitempty"`
Title string `json:"title,omitempty"`
Body string `json:"selftext,omitempty"`
SelftextHtml *string `json:"selftext_html"`
// Indicates if you've upvoted/downvoted (true/false).
// If neither, it will be nil.
@@ -564,6 +565,20 @@ type Post struct {
Preview *Preview `json:"preview,omitempty"`
SecureMedia *SecureMedia `json:"secure_media,omitempty"`
PollData *PollData `json:"poll_data"`
}
type PollData struct {
Timestamp int `json:"voting_end_timestamp"`
Options []PollOption `json:"options"`
IsPrediction bool `json:"is_prediction"`
TotalVoteCount int `json:"total_vote_count"`
}
type PollOption struct {
Text string `json:"text"`
Id string `json:"id"`
}
type SecureMedia struct {