From a035c0d4840d9b309ef27e3181d6fcf2dab05ba1 Mon Sep 17 00:00:00 2001 From: Vartan Benohanian Date: Sun, 3 May 2020 20:32:08 -0400 Subject: [PATCH] Add "Likes" field Signed-off-by: Vartan Benohanian --- things.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/things.go b/things.go index 0c79ce5..71a12ed 100644 --- a/things.go +++ b/things.go @@ -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"`