Add "Likes" field

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian 2020-05-03 20:32:08 -04:00
parent ff75539620
commit a035c0d484

View file

@ -106,6 +106,10 @@ type Comment struct {
SubredditNamePrefixed string `json:"subreddit_name_prefixed,omitempty"`
SubredditID string `json:"subreddit_id,omitempty"`
// Indicates if the client has upvote/downvoted (true/false)
// If neither, it will be nil
Likes *bool `json:"likes"`
Score int `json:"score"`
Controversiality int `json:"controversiality"`
@ -149,6 +153,10 @@ type Link struct {
Title string `json:"title,omitempty"`
Body string `json:"selftext,omitempty"`
// Indicates if the client has upvote/downvoted (true/false)
// If neither, it will be nil
Likes *bool `json:"likes"`
Score int `json:"score"`
NumberOfComments int `json:"num_comments"`