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 {