aboutsummaryrefslogtreecommitdiff
path: root/api.go
diff options
context:
space:
mode:
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 {