Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoVideoFound = errors.New("no video found")
Functions ¶
This section is empty.
Types ¶
type ContentDetails ¶
type ContentDetails struct {
Duration string `json:"duration"`
RegionRestriction struct {
Allowed []string `json:"allowed"`
Blocked []string `json:"blocked"`
} `json:"regionRestriction"`
}
func (*ContentDetails) ParseDuration ¶
func (c *ContentDetails) ParseDuration() (*duration.Duration, error)
type DeArrowResponse ¶
type DeArrowResponse struct {
Titles []struct {
Title string `json:"title"`
Original bool `json:"original"`
Votes int `json:"votes"`
Locked bool `json:"locked"`
} `json:"titles"`
}
func (*DeArrowResponse) GetBestTitle ¶
func (d *DeArrowResponse) GetBestTitle() string
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func New ¶
func New(credentialService model.CredentialService) *Plugin
func (*Plugin) Commands ¶
func (p *Plugin) Commands() []gotgbot.BotCommand
func (*Plugin) OnYouTubeLink ¶
type SearchResponse ¶
type SearchResponse struct {
Items []struct {
ID struct {
VideoID string `json:"videoId"`
} `json:"id"`
} `json:"items"`
}
type Video ¶
type Video struct {
ID string `json:"id"`
Snippet struct {
PublishedAt time.Time `json:"publishedAt"`
ChannelID string `json:"channelId"`
Title string `json:"title"`
ChannelTitle string `json:"channelTitle"`
} `json:"snippet"`
ContentDetails ContentDetails `json:"contentDetails"`
Statistics struct {
ViewCount uint64 `json:"viewCount,string"`
LikeCount uint64 `json:"likeCount,string"`
CommentCount uint64 `json:"commentCount,string"`
} `json:"statistics"`
LiveStreamingDetails struct {
ActualStartTime time.Time `json:"actualStartTime"`
ActualEndTime time.Time `json:"actualEndTime"`
ConcurrentViewers uint64 `json:"concurrentViewers,string"`
ScheduledStartTime time.Time `json:"scheduledStartTime"`
ScheduledEndTime time.Time `json:"scheduledEndTime"`
} `json:"liveStreamingDetails"`
}
func (*Video) BlockedInGermany ¶
func (*Video) IsPremiere ¶
func (*Video) IsScheduledLive ¶
Click to show internal directories.
Click to hide internal directories.