From 0599835374adc19a56c38a3e060d6b2de1df15c8 Mon Sep 17 00:00:00 2001 From: long Date: Sun, 15 Feb 2026 21:09:15 -0600 Subject: [PATCH] added poll data and selftext html to post --- reddit/things.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/reddit/things.go b/reddit/things.go index ca357b3..90d15c1 100644 --- a/reddit/things.go +++ b/reddit/things.go @@ -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 {