added poll data and selftext html to post
This commit is contained in:
+17
-2
@@ -531,8 +531,9 @@ type Post struct {
|
|||||||
RemovedByCategory *string `json:"removed_by_category"`
|
RemovedByCategory *string `json:"removed_by_category"`
|
||||||
CrosspostParentList []Post `json:"crosspost_parent_list"`
|
CrosspostParentList []Post `json:"crosspost_parent_list"`
|
||||||
|
|
||||||
Title string `json:"title,omitempty"`
|
Title string `json:"title,omitempty"`
|
||||||
Body string `json:"selftext,omitempty"`
|
Body string `json:"selftext,omitempty"`
|
||||||
|
SelftextHtml *string `json:"selftext_html"`
|
||||||
|
|
||||||
// Indicates if you've upvoted/downvoted (true/false).
|
// Indicates if you've upvoted/downvoted (true/false).
|
||||||
// If neither, it will be nil.
|
// If neither, it will be nil.
|
||||||
@@ -564,6 +565,20 @@ type Post struct {
|
|||||||
|
|
||||||
Preview *Preview `json:"preview,omitempty"`
|
Preview *Preview `json:"preview,omitempty"`
|
||||||
SecureMedia *SecureMedia `json:"secure_media,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 {
|
type SecureMedia struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user