diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-05-17 00:29:39 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-05-17 00:29:39 -0500 |
| commit | d4f8fc15b7e6a2204e8dda92a083684d93a5fa59 (patch) | |
| tree | 74196a63e31a244170c2e35863e655af8b06d008 /api.go | |
| parent | 1316aa7ca5e1668bbb7967264540bff3c8dbef86 (diff) | |
| download | embedtube-d4f8fc15b7e6a2204e8dda92a083684d93a5fa59.tar.xz embedtube-d4f8fc15b7e6a2204e8dda92a083684d93a5fa59.zip | |
refactor some and client side support for new api + cleanup client code and fix some server bugs
Diffstat (limited to 'api.go')
| -rw-r--r-- | api.go | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -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 { |
