Handle listings better by using custom unmarshaling

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-05-03 17:31:35 -04:00
parent 460554e19e
commit 7922711d51
9 changed files with 988 additions and 345 deletions
+2 -3
View File
@@ -6,6 +6,7 @@ import (
"net/url"
"reflect"
"testing"
"time"
)
var expectedCommentSubmitOrEdit = &Comment{
@@ -15,7 +16,6 @@ var expectedCommentSubmitOrEdit = &Comment{
Permalink: "/r/subreddit/comments/test1/some_thread/test2/",
Body: "test comment",
BodyHTML: "<div class=\"md\"><p>test comment</p>\n</div>",
Author: "reddit_username",
AuthorID: "t2_user1",
AuthorFlairText: "Flair",
@@ -27,8 +27,7 @@ var expectedCommentSubmitOrEdit = &Comment{
Score: 1,
Controversiality: 0,
Created: 1588147787,
CreatedUTC: 1588118987,
Created: &Timestamp{time.Date(2020, 4, 28, 20, 9, 47, 0, time.UTC)},
LinkID: "t3_link1",
}