Documentation
¶
Index ¶
- func ConvertTwitchLiveChatToVodChat(path string, channelName string, vID string, vExtID string, cID int, ...) error
- func CreateFolder(path string) error
- func DeleteFile(path string) error
- func DownloadFile(url, path, filename string) error
- func FileExists(path string) bool
- func MoveFile(sourcePath, destPath string) error
- func ReadLastLines(path string, lines int) ([]byte, error)
- func SendWebhook(webhookRequestBody WebhookRequestBody) error
- func WriteJson(j interface{}, path string, filename string) error
- type Comment
- type Commenter
- type CustomValidator
- type Emoticon
- type Fragment
- type LiveChat
- type LiveComment
- type Message
- type ParsedChat
- type PlaybackStatus
- type Role
- type Streamer
- type TaskStatus
- type UserBadge
- type UserNoticParams
- type VodPlatform
- type VodQuality
- type VodType
- type WebhookRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFolder ¶
CreateFolder - creates folder if it doesn't exist Adds base directory to path - supply with everything after /vods/
func DeleteFile ¶
func DownloadFile ¶
DownloadFile - downloads file from url to destination Adds base directory to path - supply with everything after /vods/ DownloadFile("http://img", "channel", "profile.png")
func FileExists ¶
func SendWebhook ¶
func SendWebhook(webhookRequestBody WebhookRequestBody) error
Types ¶
type CustomValidator ¶
type CustomValidator struct {
Validator *validator.Validate
}
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i interface{}) error
Validate Data
type LiveChat ¶
type LiveChat struct {
Comments []LiveComment `json:"comments"`
}
type LiveComment ¶
type LiveComment struct { ActionType string `json:"action_type"` Author struct { Badges []struct { ClickAction string `json:"click_action"` ClickURL string `json:"click_url"` Description string `json:"description"` Icons []struct { Height int `json:"height"` ID string `json:"id"` URL string `json:"url"` Width int `json:"width"` } `json:"icons"` ID string `json:"id"` Name string `json:"name"` Title string `json:"title"` Version int `json:"version"` } `json:"badges"` DisplayName string `json:"display_name"` ID string `json:"id"` IsModerator bool `json:"is_moderator"` IsSubscriber bool `json:"is_subscriber"` IsTurbo bool `json:"is_turbo"` Name string `json:"name"` } `json:"author"` ChannelID string `json:"channel_id"` ClientNonce string `json:"client_nonce"` Colour string `json:"colour"` Emotes []struct { ID string `json:"id"` Images []struct { Height int `json:"height"` ID string `json:"id"` URL string `json:"url"` Width int `json:"width"` } `json:"images"` Locations []string `json:"locations"` Name string `json:"name"` } `json:"emotes"` Flags string `json:"flags"` IsFirstMessage bool `json:"is_first_message"` Message string `json:"message"` MessageID string `json:"message_id"` MessageType string `json:"message_type"` ReturningChatter string `json:"returning_chatter"` Timestamp int64 `json:"timestamp"` UserType string `json:"user_type"` }
func OpenChatFile ¶
func OpenChatFile(path string) ([]LiveComment, error)
type ParsedChat ¶
type PlaybackStatus ¶ added in v0.0.2
type PlaybackStatus string
const ( InProgress PlaybackStatus = "in_progress" Finished PlaybackStatus = "finished" )
func (PlaybackStatus) Values ¶ added in v0.0.2
func (PlaybackStatus) Values() (kinds []string)
type TaskStatus ¶
type TaskStatus string
const ( Success TaskStatus = "success" Running TaskStatus = "running" Pending TaskStatus = "pending" Failed TaskStatus = "failed" )
func (TaskStatus) Values ¶
func (TaskStatus) Values() (kinds []string)
type UserNoticParams ¶
type UserNoticParams struct {
MsgID *string `json:"msg-id"`
}
type VodPlatform ¶
type VodPlatform string
const ( PlatformTwitch VodPlatform = "twitch" PlatformYoutube VodPlatform = "youtube" )
func (VodPlatform) Values ¶
func (VodPlatform) Values() (kinds []string)
type VodQuality ¶
type VodQuality string
const ( Best VodQuality = "best" Source VodQuality = "source" R720P60 VodQuality = "720p60" R480P30 VodQuality = "480p30" R360P30 VodQuality = "360p30" R160P30 VodQuality = "160p30" )
func (VodQuality) Values ¶
func (VodQuality) Values() (kinds []string)
type WebhookRequestBody ¶
Click to show internal directories.
Click to hide internal directories.