Documentation ¶
Index ¶
Constants ¶
View Source
const ( Host = "api.tuchong.com" TableName = "tuchong_account" FollowAPI = "https://api.tuchong.com/users/self/following/%s?%s" WorksAPI = "https://api.tuchong.com/sites/%s/works?%s" )
View Source
const ( //Host = "tuchong.com" Device = "3887472264612877" Version = "6132" Channel = "tengxun" Platform = "android" AcceptEncoding = "gzip" UserAgent = "okhttp/3.12.2" )
Variables ¶
View Source
var ( SortedQueryParamKes = []string{ "mac_address", "language", "resolution", "device_type", "device_platform", "os_api", "device_brand", "openudid", "_rticket", "version_code", "version_name", "ac", "aid", "dpi", "iid", "cdid", "page", "uuid", "device_id", "query", "ssmix", "before_timestamp", "os_version", "channel", "app_name", "update_version_code", "manifest_version_code", } QueryParams = map[string]string{ "mac_address": "82%3A68%3A67%3A6F%3AC5%3ABC", "language": "zh", "resolution": "1080*2208", "device_type": "Redmi%20K20%20Pro", "device_platform": "android", "os_api": "29", "device_brand": "Xiaomi", "openudid": "3cefb60f1b2d1769", "_rticket": "", "version_code": "6132", "version_name": "6.13.2", "ac": "wifi", "aid": "1130", "dpi": "440", "iid": "69972369875383", "cdid": "ab5f288b-d49c-43a8-8be0-91b0ceb25e74", "page": "1", "uuid": "1130", "device_id": "3887472264612877", "query": "", "ssmix": "a", "before_timestamp": "0", "os_version": "10", "channel": "tengxun", "app_name": "tuchong", "update_version_code": "6132", "manifest_version_code": "6132", } ErrNotFoundToken = errors.New("not found token") ErrFollowFail = errors.New("follow fail") )
Functions ¶
func QueryParamsEscape ¶
QueryParamsEscape 如果不进行查询, query 应为空串.
func SetHTTPReqHeader ¶
Types ¶
type FollowResponse ¶
type FollowResponse struct { Message string `json:"message"` Hint string `json:"hint"` ShowPointToast bool `json:"showPointToast"` Point int `json:"point"` Result string `json:"result"` }
func UnmarshalFollowResponse ¶
func UnmarshalFollowResponse(body io.ReadCloser, isGzip bool) (*FollowResponse, error)
type TuChongDLI ¶
type TuChongDLI struct {
// contains filtered or unexported fields
}
func NewTuChongDLI ¶
func NewTuChongDLI(flags *Flags) *TuChongDLI
func (*TuChongDLI) HasNext ¶
func (tcd *TuChongDLI) HasNext() bool
func (*TuChongDLI) Next ¶
func (tcd *TuChongDLI) Next() []models.DownloadLink
func (*TuChongDLI) SetClient ¶
func (tcd *TuChongDLI) SetClient(c *http.Client)
Click to show internal directories.
Click to hide internal directories.