Documentation
¶
Index ¶
- Constants
- Variables
- func ArticleAllComment(ctx context.Context, _, accessToken string, id int64) error
- func Audio(ctx context.Context, _ *model.Task, dowloadURL, dir, fileName string) (string, error)
- func Authority(cookies string, after func(*http.Response) error) error
- func Download(ctx context.Context, x *model.Task, data geek.ArticleData) error
- func FindURLWithHTML(rawHtml string) ([]string, error)
- func GeekTimeSearch(ctx context.Context, accessToken string, req geek.SearchRequest) (*geek.SearchResponse, error)
- func GetArticleComment(ctx context.Context, _, accessToken string, req geek.ArticleCommentListRequest) (*geek.ArticleCommentList, error)
- func GetArticleCommentDiscussion(ctx context.Context, _, accessToken string, req geek.DiscussionListRequest) (*geek.DiscussionOriginListResponse, error)
- func GetArticleInfo(ctx context.Context, accessToken string, req geek.ArticlesInfoRequest) (*geek.ArticleInfoResponse, error)
- func GetArticles(ctx context.Context, accessToken string, req geek.ArticlesListRequest) (*geek.ArticlesResponse, error)
- func GetColumnInfo(ctx context.Context, accessToken string, req geek.ColumnRequest) (*geek.ColumnResponse, error)
- func GetGeekUser(r *http.Response, auth *geek.AuthResponse) (*geek.GeekUser, error)
- func GetProduct(ctx context.Context, accessToken string, req geek.DailyProductRequest) (*geek.DailyProductResponse, error)
- func GetPvipProduct(ctx context.Context, accessToken string, req geek.PvipProductRequest) (*geek.ProductResponse, error)
- func HTMLConvertMarkdown(rawHtml string) (string, error)
- func HtmlURLProxyReplace(rawHtml string) (string, error)
- func MakeDocArchive(_ context.Context, taskId, title, introHTML string) (*bytes.Buffer, error)
- func MakeDocsite(ctx context.Context, taskId, title, introHTML string) (string, error)
- func MakeDocsiteLocal(ctx context.Context, taskId, group, title, introHTML string, commentLen int) error
- func OutputHTML(n *html.Node) string
- func PorxyMatch(uri string) bool
- func Request(ctx context.Context, method, url string, body io.Reader, accessToken string, ...) error
- func SaveCookie(cookies string, identity string, auth *geek.AuthResponse) func(r *http.Response) error
- func URLProxyReplace(uri string) string
- func VerifyFileName(name string) string
- func Video(ctx context.Context, dir, fileName string, req *PlayMeta) (string, error)
- type Mkdocs
- type Nav
- type Part
- type PlayMeta
- type PlayMetaRequest
Constants ¶
View Source
const ( ArticlesURL = "https://time.geekbang.com/serv/v1/column/articles" ArticleInfoURL = "https://time.geekbang.org/serv/v3/article/info" ProductListURL = "https://time.geekbang.org/serv/v3/product/list" PvipProductListURL = "https://time.geekbang.org/serv/v4/pvip/product_list" ArticleCommentURL = "https://time.geekbang.org/serv/v4/comment/list" ArticleCommentDiscussionURL = "https://time.geekbang.org/serv/discussion/v1/root_list" SearchURL = "https://time.geekbang.org/serv/v3/search" ColumnInfoURL = "https://time.geekbang.org/serv/v3/column/info" )
View Source
const ( TASK_STATUS_PENDING = 0x01 TASK_STATUS_RUNNING = 0x02 TASK_STATUS_FINISHED = 0x03 TASK_STATUS_ERROR = 0x04 )
View Source
const ( TASK_TYPE_PRODUCT = "product" TASK_TYPE_ARTICLE = "article" )
Variables ¶
View Source
var ALLStatus = []int{ TASK_STATUS_PENDING, TASK_STATUS_RUNNING, TASK_STATUS_FINISHED, TASK_STATUS_ERROR, }
View Source
var (
ErrorGeekAccountNotLogin = errors.New("geek account not login")
)
View Source
var MkdocsYML string
View Source
var Replaces = map[string]string{
"/": "-",
"|": "-",
"|": "-",
":": ":",
`"`: "“",
"?": "?",
"&": "+",
"\t": "",
"\b": "",
}
Functions ¶
func ArticleAllComment ¶
func FindURLWithHTML ¶ added in v0.0.8
func GeekTimeSearch ¶
func GeekTimeSearch(ctx context.Context, accessToken string, req geek.SearchRequest) (*geek.SearchResponse, error)
func GetArticleComment ¶
func GetArticleComment(ctx context.Context, _, accessToken string, req geek.ArticleCommentListRequest) (*geek.ArticleCommentList, error)
func GetArticleCommentDiscussion ¶
func GetArticleCommentDiscussion(ctx context.Context, _, accessToken string, req geek.DiscussionListRequest) (*geek.DiscussionOriginListResponse, error)
func GetArticleInfo ¶
func GetArticleInfo(ctx context.Context, accessToken string, req geek.ArticlesInfoRequest) (*geek.ArticleInfoResponse, error)
func GetArticles ¶
func GetArticles(ctx context.Context, accessToken string, req geek.ArticlesListRequest) (*geek.ArticlesResponse, error)
func GetColumnInfo ¶
func GetColumnInfo(ctx context.Context, accessToken string, req geek.ColumnRequest) (*geek.ColumnResponse, error)
func GetGeekUser ¶ added in v0.0.8
func GetProduct ¶
func GetProduct(ctx context.Context, accessToken string, req geek.DailyProductRequest) (*geek.DailyProductResponse, error)
func GetPvipProduct ¶
func GetPvipProduct(ctx context.Context, accessToken string, req geek.PvipProductRequest) (*geek.ProductResponse, error)
func HTMLConvertMarkdown ¶ added in v0.0.9
func HtmlURLProxyReplace ¶
func MakeDocArchive ¶
func MakeDocsite ¶
func MakeDocsiteLocal ¶
func OutputHTML ¶
func PorxyMatch ¶
func SaveCookie ¶
func URLProxyReplace ¶
func VerifyFileName ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.