added poll data and selftext html to post
This commit is contained in:
@@ -533,6 +533,7 @@ type Post struct {
|
||||
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user