Documentation ¶
Index ¶
- Variables
- type Article
- type Course
- type CourseList
- type Error
- type ErrorInfo
- type Product
- type ProductAll
- type Result
- type Service
- func (s *Service) Articles(id int) ([]*Article, error)
- func (s *Service) BuyProductAll() (*ProductAll, error)
- func (s *Service) Columns() ([]*Course, error)
- func (s *Service) Cookies() map[string]string
- func (s *Service) ShowCourse(id int) (*Course, error)
- func (s *Service) User() (*User, Error)
- func (s *Service) VideoPlayAuth(aid int, videoID string) (*VideoPlayAuth, error)
- func (s *Service) VideoPlayInfo(playAuth string) (*VideoPlayInfo, error)
- func (s *Service) Videos() ([]*Course, error)
- type User
- type VideoPlayAuth
- type VideoPlayInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrNotLogin not login ErrNotLogin = errors.New("当前未登录获取登录已失效,请先登录") //ErrLoginOffline not login ErrLoginOffline = errors.New("该账号已在其他同类设备登录,如非本人操作,则密码可能已经泄露,建议立即更换密码") )
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { ID int `json:"id"` ArticleTitle string `json:"article_title"` ArticleSummary string `json:"article_summary"` ArticleCover string `json:"article_cover"` ArticleTime int `json:"article_ctime"` ChapterID int `json:"chapter_id string"` IncludeAudio bool `json:"include_audio"` //Is can preview ColumnHadSub bool `json:"column_had_sub"` ArticleCouldPreview bool `json:"article_could_preview"` //Audio info AudioDownloadURL string `json:"audio_download_url"` AudioSize int `json:"audio_size"` //Viode info VideoMediaMap json.RawMessage `json:"video_media_map"` VideoID string `json:"video_id"` VideoCover string `json:"video_cover"` }
Article 课程文章信息
type Course ¶
type Course struct { ID int `json:"id"` Authorintro string `json:"author_intro"` AuthorName string `json:"author_name"` ChannelBackAmount int `json:"channel_back_amount"` ColumnBgcolor string `json:"column_bgcolor"` ColumnCover string `json:"column_cover"` ColumnCtime int `json:"column_ctime"` ColumnPrice int `json:"column_price"` ColumnPriceMarket int `json:"column_price_market"` ColumnPriceSale int `json:"column_price_sale"` ColumnSku int `json:"column_sku"` ColumnSubtitle string `json:"column_subtitle"` ColumnTitle string `json:"column_title"` ColumnType int `json:"column_type"` ColumnTnit string `json:"column_unit"` HadSub bool `json:"had_sub"` IsChannel bool `json:"is_channel"` IsExperience bool `json:"is_experience"` IsOnboard bool `json:"is_onboard"` PriceType int `json:"price_type"` SubCount int `json:"sub_count"` ShowChapter bool `json:"show_chapter"` UpdateFrequency string `json:"update_frequency"` }
Course 课程信息
type CourseList ¶
type CourseList struct { List []struct { ID int `json:"id"` ColumnCtime int `json:"column_ctime"` ColumnGroupbuy int `json:"column_groupbuy"` ColumnPrice int `json:"column_price"` ColumnPriceMarket int `json:"column_price_market"` ColumnSku int `json:"column_sku"` ColumnType int `json:"column_type"` HadSub bool `json:"had_sub"` IsChannel int `json:"is_channel"` IsExperience bool `json:"is_experience"` LastAid int `json:"last_aid"` LastChapterID int `json:"last_chapter_id"` PriceType int `json:"price_type"` SubCount int `json:"sub_count"` } `json:"list"` }
CourseList 课程列表基础信息
type Product ¶
type Product struct { ID int `json:"id"` Title string `json:"title"` Page struct { More bool `json:"more"` Count int `json:"count"` } `json:"page"` List []struct { Title string `json:"title"` Conver string `json:"cover"` Type string `json:"type"` Extra struct { LastAid int `json:"last_aid"` ColumnID int `json:"column_id"` ColumnTitle string `json:"column_title"` ColumnSubtitle string `json:"column_subtitle"` AuthorName string `json:"author_name"` AuthorIntro string `json:"author_intro"` ColumnCover string `json:"column_cover"` ColumnType int `json:"column_type"` ArticleCount int `json:"article_count"` IsIncludeAudio bool `json:"is_include_audio"` } `json:"extra"` } `json:"list"` }
Product all product
type ProductAll ¶
ProductAll all protuct
type Result ¶
type Result struct { Code int `json:"code"` Data resultData `json:"data"` Error resultError `json:"error"` }
Result 从百度服务器解析的数据结构
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service geek time service
func (*Service) BuyProductAll ¶
func (s *Service) BuyProductAll() (*ProductAll, error)
BuyProductAll 获取所有购买的课程信息
func (*Service) ShowCourse ¶
ShowCourse 获取课程信息
func (*Service) VideoPlayAuth ¶
func (s *Service) VideoPlayAuth(aid int, videoID string) (*VideoPlayAuth, error)
VideoPlayAuth 获取视频的播放授权信息
func (*Service) VideoPlayInfo ¶
func (s *Service) VideoPlayInfo(playAuth string) (*VideoPlayInfo, error)
VideoPlayInfo 获取视频播放信息
type User ¶
type User struct { UID int `json:"uid"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` Cellphone string `json:"cellphone"` }
User user info
type VideoPlayAuth ¶
type VideoPlayAuth struct {
PlayAuth string `json:"play_auth"`
}
VideoPlayAuth 视频的播放授权信息
type VideoPlayInfo ¶
type VideoPlayInfo struct { VideoBase struct { VideoID string `json:"VideoId"` Title string `json:"Title"` CoverURL string `josn:"CoverURL"` } `json:"VideoBase"` PlayInfoList struct { PlayInfo []struct { URL string `json:"PlayURL"` Size int64 `json:"Size"` Definition string `json:"Definition"` } `json:"PlayInfo"` } `json:"PlayInfoList"` }
VideoPlayInfo 视频播放信息
Click to show internal directories.
Click to hide internal directories.