Documentation ¶
Index ¶
- Constants
- Variables
- func ArticleCommentList(enId, sort string, page, limit, sType int) (list *services.ArticleCommentList, err error)
- func ArticleDetail(enid string) (detail *services.ArticleDetail, err error)
- func ArticleDetailByEnid(aType int, aEnid string) (detail *services.ArticleDetail, err error)
- func ArticleList(enid, chapterID string, count, maxID int) (list *services.ArticleList, err error)
- func ArticleListAll(id int, chapterID string) (list *services.ArticleList, err error)
- func AudioDetail(id string) (detail *services.AudioInfoResp, err error)
- func CheckLogin(token, qrCode string) (user *services.User, err error)
- func ContentsToMarkdown(contents []services.Content) (res string)
- func CourseDetail(category string, id int) (detail *services.Course, err error)
- func CourseInfoByEnid(enID string) (info *services.CourseInfo, err error)
- func CourseList(category, order string, page, limit int) (list *services.CourseList, err error)
- func CourseType() (list *services.CourseCategoryList, err error)
- func DownloadMarkdown(list *services.ArticleList, aid int, path string, ctx context.Context) error
- func DownloadOdobMarkdown(info *services.Course, path string) error
- func EbookCommentList(enID, sort string, page, limit int) (list *services.EbookCommentList, err error)
- func EbookDetail(enID string) (detail *services.EbookDetail, err error)
- func EbookInfo(enID string) (info *services.EbookInfo, err error)
- func EbookPage(ctx context.Context, enID string) (info *services.EbookInfo, svgContent utils.SvgContents, err error)
- func EbookShelfAdd(enIDs []string) (resp *services.EbookShelfAddResp, err error)
- func EbookShelfRemove(enIDs []string) (resp *services.EbookShelfAddResp, err error)
- func LoginByCookie(cookie string) (user *services.User, err error)
- func LoginedCookies() (cookies map[string]string)
- func Logout() (err error)
- func OdobArticleDetail(aEnid string) (detail *services.ArticleDetail, err error)
- func OdobArticleInfo(aEnid string) (info *services.ArticleInfo, err error)
- func OdobShelfAdd(enIDs []string) (resp *services.EbookShelfAddResp, err error)
- func SetOutputDir(dir string)
- func SwitchAccount(uid string) (err error)
- func TopicAll(page, limit int) (list *services.TopicAll, err error)
- func TopicDetail(id string) (detail *services.TopicDetail, err error)
- func TopicNotesList(id string, isElected bool, page, limit int) (list *services.NotesList, err error)
- func TopicNotesTimeline(maxID string) (list *services.NotesTimeline, err error)
- type CourseDownload
- type EBookDownload
- type OdobDownload
- type Progress
Constants ¶
const ( // CateCourse 课程 CateCourse = "bauhinia" // CateAudioBook 听书 CateAudioBook = "odob" // CateEbook 电子书 CateEbook = "ebook" // CateAce 锦囊 CateAce = "compass" // CatAll 全部 CatAll = "all" )
Variables ¶
var OutputDir = ""
Functions ¶
func ArticleCommentList ¶
func ArticleCommentList(enId, sort string, page, limit, sType int) (list *services.ArticleCommentList, err error)
ArticleCommentList article comment list
func ArticleDetail ¶
func ArticleDetail(enid string) (detail *services.ArticleDetail, err error)
ArticleDetail article detail
func ArticleDetailByEnid ¶
func ArticleDetailByEnid(aType int, aEnid string) (detail *services.ArticleDetail, err error)
ArticleDetailByEnid odob article detail enid article enid or odob audioAliasID, aType 1-course article, 2-odob article
func ArticleList ¶
func ArticleList(enid, chapterID string, count, maxID int) (list *services.ArticleList, err error)
ArticleList 已购课程文章列表分页
func ArticleListAll ¶
func ArticleListAll(id int, chapterID string) (list *services.ArticleList, err error)
ArticleListAll 已购课程文章列表
func AudioDetail ¶
func AudioDetail(id string) (detail *services.AudioInfoResp, err error)
AudioDetail 听书音频简介
func CheckLogin ¶
CheckLogin 需要开启定时器轮询是否扫码登录
func ContentsToMarkdown ¶
func CourseDetail ¶
CourseDetail 已购课程详情
func CourseInfoByEnid ¶
func CourseInfoByEnid(enID string) (info *services.CourseInfo, err error)
CourseInfoByEnid 已购课程列表
func CourseList ¶
func CourseList(category, order string, page, limit int) (list *services.CourseList, err error)
func DownloadMarkdown ¶
func EbookCommentList ¶
func EbookCommentList(enID, sort string, page, limit int) (list *services.EbookCommentList, err error)
EbookCommentList get ebook 评分&书评 sort like_count
func EbookDetail ¶
func EbookDetail(enID string) (detail *services.EbookDetail, err error)
func EbookShelfAdd ¶
func EbookShelfAdd(enIDs []string) (resp *services.EbookShelfAddResp, err error)
EbookShelfAdd 加入书架
func EbookShelfRemove ¶
func EbookShelfRemove(enIDs []string) (resp *services.EbookShelfAddResp, err error)
EbookShelfRemove 移出书架
func LoginByCookie ¶
LoginByCookie login by cookie
func LoginedCookies ¶
LoginedCookies cookie sting to map for chromedp print pdf
func OdobArticleDetail ¶
func OdobArticleDetail(aEnid string) (detail *services.ArticleDetail, err error)
OdobArticleDetail odob article detail
func OdobArticleInfo ¶
func OdobArticleInfo(aEnid string) (info *services.ArticleInfo, err error)
OdobArticleInfo article info get article token, audio token, media security token etc.
func OdobShelfAdd ¶
func OdobShelfAdd(enIDs []string) (resp *services.EbookShelfAddResp, err error)
OdobShelfAdd 听书加入书架
func SetOutputDir ¶
func SetOutputDir(dir string)
func SwitchAccount ¶
func TopicDetail ¶
func TopicDetail(id string) (detail *services.TopicDetail, err error)
TopicDetail Topic Detail
func TopicNotesList ¶
func TopicNotesList(id string, isElected bool, page, limit int) (list *services.NotesList, err error)
TopicNotesList Topic NotesList
func TopicNotesTimeline ¶
func TopicNotesTimeline(maxID string) (list *services.NotesTimeline, err error)
TopicNotesTimeline Topic timeline
Types ¶
type CourseDownload ¶
type CourseDownload struct { Ctx context.Context DownloadType int // 1:mp3, 2:PDF文档, 3:markdown文档 ID int // 课程 id AID int // 文章 id EnId string // 课程 enid }
func (*CourseDownload) Download ¶
func (d *CourseDownload) Download() error
type EBookDownload ¶
type EBookDownload struct { Ctx context.Context DownloadType int // 1:html, 2:PDF文档, 3:epub ID int EnID string }
func (*EBookDownload) Download ¶
func (d *EBookDownload) Download() error