aboutsummaryrefslogtreecommitdiff
path: root/api.go
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2026-05-17 00:29:39 -0500
committerTim Keller <tjk@tjkeller.xyz>2026-05-17 00:29:39 -0500
commitd4f8fc15b7e6a2204e8dda92a083684d93a5fa59 (patch)
tree74196a63e31a244170c2e35863e655af8b06d008 /api.go
parent1316aa7ca5e1668bbb7967264540bff3c8dbef86 (diff)
downloadembedtube-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.go27
1 files changed, 14 insertions, 13 deletions
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 {