app

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 14 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 = "output"

Functions

func ArticleCommentList

func ArticleCommentList(enId, sort string, page, limit int) (list *services.ArticleCommentList, err error)

ArticleCommentList article comment list

func ArticleDetail

func ArticleDetail(id, aid int) (detail *services.ArticleDetail, enId string, err error)

ArticleDetail article detail

func ArticleInfo

func ArticleInfo(id, aid int) (info *services.ArticleInfo, aEnid string, err error)

ArticleInfo article info get article token, audio token, media security token etc

func ArticleList

func ArticleList(id int, chapterID string) (list *services.ArticleList, err error)

ArticleList 已购课程文章列表

func ContentsToMarkdown

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

func CourseDetail

func CourseDetail(category string, id int) (idMap map[string]interface{}, err error)

CourseDetail 已购课程详情

func CourseInfo

func CourseInfo(id int) (info *services.CourseInfo, err error)

CourseInfo 已购课程列表

func CourseList

func CourseList(category string) (list *services.CourseList, err error)

CourseList 已购课程列表

func CourseType

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

CourseType 课程分类

func Download

func Download(downloader DeDaoDownloader) error

func DownloadMarkdown

func DownloadMarkdown(cType string, id, aid int, path string) error

func EbookDetail

func EbookDetail(id int) (detail *services.EbookDetail, err error)

EbookDetail 电子书详情

func EbookInfo

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

func EbookPage

func EbookPage(enID string) (info *services.EbookInfo, svgContent utils.SvgContents, err error)

func GetCourseIDMap

func GetCourseIDMap(course *services.Course) map[string]interface{}

func LoginByCookie

func LoginByCookie(cookie string) (err error)

LoginByCookie login by cookie

func LoginByQr

func LoginByQr() error

func LoginedCookies

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

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 SwitchAccount

func SwitchAccount(uid string) (err error)

func TopicAll

func TopicAll() (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) (list *services.NotesList, err error)

TopicNotesList Topic NotesList

Types

type CourseDownload

type CourseDownload struct {
	DownloadType int // 1:mp3, 2:PDF文档, 3:markdown文档
	ID           int
	AID          int
}

func (*CourseDownload) Download

func (d *CourseDownload) Download() error

type DeDaoDownloader

type DeDaoDownloader interface {
	Download() error
}

type EBookDownload

type EBookDownload struct {
	DownloadType int // 1:html, 2:PDF文档, 3:epub
	ID           int
}

func (*EBookDownload) Download

func (d *EBookDownload) Download() error

type OdobDownload

type OdobDownload struct {
	DownloadType int // 1:mp3, 2:PDF文档, 3:markdown文档
	ID           int
}

func (*OdobDownload) Download

func (d *OdobDownload) Download() error

Jump to

Keyboard shortcuts

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