From d4f8fc15b7e6a2204e8dda92a083684d93a5fa59 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sun, 17 May 2026 00:29:39 -0500 Subject: refactor some and client side support for new api + cleanup client code and fix some server bugs --- api.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'api.go') diff --git a/api.go b/api.go index 21a2b5f..f6e0044 100644 --- a/api.go +++ b/api.go @@ -8,22 +8,23 @@ import ( ) type VideoDetails struct { - Channel string `json:"channel"` - DatePublished time.Time `json:"datePublished"` - Description string `json:"description"` - NumComments int `json:"comments"` - NumLikes int `json:"likes"` - NumViews int `json:"views"` - Tags []string `json:"tags"` + Author string `json:"author"` + Channel string `json:"channel"` + Published time.Time `json:"published"` + Description string `json:"description"` + Comments int `json:"comments"` // nunber of comments + Likes int `json:"likes"` + Views int `json:"views"` + Tags []string `json:"tags"` } type Comment struct { - Author string `json:"a"` - Body string `json:"b"` - DatePublished time.Time `json:"p"` - DateUpdated time.Time `json:"u"` - Likes int `json:"l"` - Replies []*Comment `json:"r,omitempty"` + Author string `json:"author"` + Body string `json:"body"` + Published time.Time `json:"published"` + Updated time.Time `json:"updated,omitempty"` + Likes int `json:"likes"` + Replies []*Comment `json:"replies,omitempty"` } type APISource interface { -- cgit v1.2.3