app

package
v0.0.0-...-55e8476 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CateCourse 课程
	CateCourse = "bauhinia"
	// CateAudioBook 听书
	CateAudioBook = "odob"
	// CateEbook 电子书
	CateEbook = "ebook"
	// CateAce 锦囊
	CateAce = "compass"
	// CatAll 全部
	CatAll = "all"
)

Variables

View Source
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

func CheckLogin(token, qrCode string) (user *services.User, err error)

CheckLogin 需要开启定时器轮询是否扫码登录

func ContentsToMarkdown

func ContentsToMarkdown(contents []services.Content) (res string)

func CourseDetail

func CourseDetail(category string, id int) (detail *services.Course, err error)

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 CourseType

func CourseType() (list *services.CourseCategoryList, err error)

CourseType 课程分类

func DownloadMarkdown

func DownloadMarkdown(list *services.ArticleList, aid int, path string, ctx context.Context) error

func DownloadOdobMarkdown

func DownloadOdobMarkdown(info *services.Course, path string) error

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 EbookInfo

func EbookInfo(enID string) (info *services.EbookInfo, err error)

func EbookPage

func EbookPage(ctx context.Context, enID string) (info *services.EbookInfo, svgContent utils.SvgContents, 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

func LoginByCookie(cookie string) (user *services.User, err error)

LoginByCookie login by cookie

func LoginedCookies

func LoginedCookies() (cookies map[string]string)

LoginedCookies cookie sting to map for chromedp print pdf

func Logout

func Logout() (err error)

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 SwitchAccount(uid string) (err error)

func TopicAll

func TopicAll(page, limit int) (list *services.TopicAll, err error)

TopicAll 推荐话题列表

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

type OdobDownload

type OdobDownload struct {
	Ctx          context.Context
	DownloadType int // 1:mp3, 2:PDF文档, 3:markdown文档
	ID           int
	Data         *services.Course
}

func (*OdobDownload) Download

func (d *OdobDownload) Download() error

type Progress

type Progress struct {
	Total   int    `json:"total"`
	Current int    `json:"current"`
	Pct     int    `json:"pct"`
	Value   string `json:"value"`
	ID      int    `json:"id"` // 课程 id
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL