Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateLanguage(videoID, langCode string) (*Language, error)
- func (c *Client) CreateSubtitles(videoID, langCode, format string, params url.Values) (*SubtitleInfo, error)
- func (c *Client) CreateVideo(params url.Values) (*Video, error)
- func (c *Client) DisableRateLimitProtection()
- func (c *Client) EditorLogin(videoID, langCode, userName string) (*EditorLoginSession, error)
- func (c *Client) EnableRateLimitProtection()
- func (c *Client) GetLanguage(videoID, langCode string) (*Language, error)
- func (c *Client) GetRawSubtitles(videoID, langCode string, captionFormat string) ([]byte, error)
- func (c *Client) GetSubtitleInfo(videoID, langCode string) (*SubtitleInfo, error)
- func (c *Client) GetVideo(id string) (*Video, error)
- func (c *Client) SetRateLimitProtection(rlp RateLimitProtection)
- func (c *Client) UpdateLanguage(videoID, langCode string, complete bool) (*Language, error)
- type EditorLoginSession
- type Language
- type RateLimitProtection
- type SubtitleInfo
- type Video
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) CreateLanguage ¶
func (*Client) CreateSubtitles ¶
func (*Client) DisableRateLimitProtection ¶ added in v0.4.0
func (c *Client) DisableRateLimitProtection()
func (*Client) EditorLogin ¶
func (c *Client) EditorLogin(videoID, langCode, userName string) (*EditorLoginSession, error)
func (*Client) EnableRateLimitProtection ¶ added in v0.4.0
func (c *Client) EnableRateLimitProtection()
func (*Client) GetLanguage ¶
func (*Client) GetRawSubtitles ¶ added in v0.3.0
func (*Client) GetSubtitleInfo ¶ added in v0.3.0
func (c *Client) GetSubtitleInfo(videoID, langCode string) (*SubtitleInfo, error)
func (*Client) SetRateLimitProtection ¶ added in v0.4.0
func (c *Client) SetRateLimitProtection(rlp RateLimitProtection)
type EditorLoginSession ¶
type EditorLoginSession struct {
URL string `json:"url"`
}
type Language ¶
type Language struct { Created time.Time `json:"created"` LanguageCode string `json:"language_code"` OriginalLanguageCode interface{} `json:"original_language_code"` Name string `json:"name"` Title string `json:"title"` Description string `json:"description"` Metadata struct { SpeakerName string `json:"speaker-name"` Location string `json:"location"` } `json:"metadata"` Versions []struct { Author struct { Username string `json:"username"` ID string `json:"id"` URI string `json:"uri"` } `json:"author"` Published bool `json:"published"` VersionNo int `json:"version_no"` } `json:"versions"` SubtitlesURI string `json:"subtitles_uri"` ResourceURI string `json:"resource_uri"` SubtitleCount int `json:"subtitle_count"` SubtitlesComplete bool `json:"subtitles_complete"` IsPrimaryAudioLanguage bool `json:"is_primary_audio_language"` IsRtl bool `json:"is_rtl"` Published bool `json:"published"` }
type RateLimitProtection ¶ added in v0.4.0
type SubtitleInfo ¶ added in v0.3.0
type SubtitleInfo struct { VersionNumber int `json:"version_number"` SubFormat string `json:"sub_format"` Subtitles string `json:"subtitles"` Author struct { Username string `json:"username"` ID string `json:"id"` URI string `json:"uri"` } `json:"author"` Language struct { Code string `json:"code"` Name string `json:"name"` Dir string `json:"dir"` } `json:"language"` Title string `json:"title"` Description string `json:"description"` Metadata struct { SpeakerName string `json:"speaker-name"` Location string `json:"location"` } `json:"metadata"` VideoTitle string `json:"video_title"` VideoDescription string `json:"video_description"` ActionsURI string `json:"actions_uri"` NotesURI string `json:"notes_uri"` ResourceURI string `json:"resource_uri"` SiteURI string `json:"site_uri"` Video string `json:"video"` VersionNo int `json:"version_no"` }
type Video ¶
type Video struct { ID string `json:"id"` VideoType string `json:"video_type"` PrimaryAudioLanguageCode string `json:"primary_audio_language_code"` Title string `json:"title"` Description string `json:"description"` Duration int `json:"duration"` Thumbnail string `json:"thumbnail"` Created time.Time `json:"created"` Team interface{} `json:"team"` TeamType interface{} `json:"team_type"` Project interface{} `json:"project"` AllUrls []string `json:"all_urls"` Metadata struct { SpeakerName string `json:"speaker-name"` Location string `json:"location"` } `json:"metadata"` Languages []struct { Code string `json:"code"` Name string `json:"name"` Published bool `json:"published"` Dir string `json:"dir"` SubtitlesURI string `json:"subtitles_uri"` ResourceURI string `json:"resource_uri"` } `json:"languages"` ActivityURI string `json:"activity_uri"` UrlsURI string `json:"urls_uri"` SubtitleLanguagesURI string `json:"subtitle_languages_uri"` ResourceURI string `json:"resource_uri"` }
Click to show internal directories.
Click to hide internal directories.