Documentation ¶
Overview ¶
哔咔漫画Api For Go 请合理使用
NOTE: 为了避免恶意滥用,已 *永久* 移除注册、发表评论等Api
WARN: 该项目仅为交流学习研究go语言实现http api封装思路与方法之用,任何人不得将此项目用于 违反中国大陆及使用者所在地区相关法律中规定的行为,如因此造成任何法律问题,本人亦不承担任何法律责任
法网恢恢,疏而不漏,勿作恶,勿作死!
Index ¶
- Constants
- Variables
- type PicaComic
- func (p *PicaComic) ChangePassword(newPass string, oldPass string) error
- func (p *PicaComic) ComicPostComment(_ string, _ string) (error, map[string]interface{})
- func (p *PicaComic) FavouriteComic(bookID string) (error, string)
- func (p *PicaComic) GetCategories() (error, map[string]interface{})
- func (p *PicaComic) GetComicCommentsList(bookID string, page int64) (error, map[string]interface{})
- func (p *PicaComic) GetComicEpPicsUrl(fileServer string, path string) (error, string)
- func (p *PicaComic) GetComicEpPicturesList(page int64, bookID string, epOrderID int64) (error, map[string]interface{})
- func (p *PicaComic) GetComicEpsList(page int64, bookID string) (error, map[string]interface{})
- func (p *PicaComic) GetComicHotKeywordsList() (error, map[string]interface{})
- func (p *PicaComic) GetComicInfo(bookID string) (error, map[string]interface{})
- func (p *PicaComic) GetComicRecommendsList(bookID string) (error, map[string]interface{})
- func (p *PicaComic) GetComicsList(page int64, cateTitle string, tagName string, sortType string) (error, map[string]interface{})
- func (p *PicaComic) GetGameInfo(gameID string) (error, map[string]interface{})
- func (p *PicaComic) GetGamesList(page int64) (error, map[string]interface{})
- func (p *PicaComic) GetMyComment(page int64) (error, map[string]interface{})
- func (p *PicaComic) GetMyFavouriteComic(page int64) (error, map[string]interface{})
- func (p *PicaComic) GetProfile() (error, map[string]interface{})
- func (p *PicaComic) GetSignature(header map[string]string, url string, method string) (error, string)
- func (p *PicaComic) LikeComic(bookID string) (error, string)
- func (p *PicaComic) Login() error
- func (p *PicaComic) SearchComics(cateS []string, keyword string, sortType string, page int64) (error, map[string]interface{})
- func (p *PicaComic) SetApiKey(apiKey string) bool
- func (p *PicaComic) SetAppBuildVersion(appBuildVersion string) bool
- func (p *PicaComic) SetAppChannel(appChannel string) bool
- func (p *PicaComic) SetAppPlatform(appPlatform string) bool
- func (p *PicaComic) SetAppUUID(appUUID string) bool
- func (p *PicaComic) SetAppVersion(appVersion string) bool
- func (p *PicaComic) SetEndPoint(endPoint string) bool
- func (p *PicaComic) SetImageQuality(imageQuality string) bool
- func (p *PicaComic) SetPassword(password string) bool
- func (p *PicaComic) SetRequestProxy(proxy string) bool
- func (p *PicaComic) SetRequestTimeout(timeOut time.Duration) bool
- func (p *PicaComic) SetRequestTlsISV(tlsISV bool) bool
- func (p *PicaComic) SetSecretKey(secretKey string) bool
- func (p *PicaComic) SetToken(token string) bool
- func (p *PicaComic) SetUsername(username string) bool
Constants ¶
View Source
const ( // 默认的目标端点地址 DEFAULT_ENDPOINT = "https://picaapi.picacomic.com/" // 默认的Secret Key DEFAULT_SECRET_KEY = "~d}$Q7$eIni=V)9\\RK/P.RM4;9[7|@/CA}b~OW!3?EV`:<>M7pddUBL5n|0/*Cn" // 默认的Api Key DEFAULT_API_KEY = "C69BAF41DA5ABD1FFEDC6D2FEA56B" // 默认的App版本 DEFAULT_APP_VERSION = "2.2.1.3.3.4" // 默认的操作系统平台 DEFAULT_APP_PLATFORM = "android" // 默认的App Build Version DEFAULT_APP_BUILD_VERSION = "45" // 默认的App Channel DEFAULT_APP_CHANNEL = "3" // 默认的图片质量 DEFAULT_IMAGE_QUALITY = "original" // Content-Type REQUEST_HEADER_CONTENT_TYPE = "application/json; charset=UTF-8" // Accept REQUEST_HEADER_ACCEPT = "application/vnd.picacomic.com.v1+json" // UA REQUEST_HEADER_UA = "okhttp/3.8.1" )
定义全局常量
Variables ¶
View Source
var ( // Request Method错误 ERR_METHOD_INVALID = errors.New("ERR_METHOD_INVALID") // Request 发生了错误 ERR_REQUEST_FAILED = errors.New("ERR_REQUEST_FAILED") // Json解析失败 ERR_JSON_DECODE_FAILED = errors.New("ERROR_JSON_DECODE_FAILED") // Json生成失败 ERR_JSON_ENCODE_FAILED = errors.New("ERROR_JSON_ENCODE_FAILED") // Resp Map为nil ERR_RESP_MAP_NIL = errors.New("ERR_RESP_MAP_NIL") // Resp Map 中的data key不存在(某些请求确实没有data) ERR_RESP_MAP_VAL_DATA_NIL = errors.New("ERR_RESP_MAP_VAL_DATA_NIL") // 检查Resp Code失败了 ERR_CHECK_CODE_FAILED = errors.New("ERR_CHECK_CODE_FAILED") // 函数已经被移除 ERR_FUNC_NO_LONGER_SUPPORT = errors.New("ERR_FUNC_NO_LONGER_SUPPORT") // 用户名密码/Token不存在 ERR_USER_AUTH_NOT_EXIST = errors.New("ERR_USER_AUTH_NOT_EXIST") // 用户登陆失败 ERR_USER_LOGIN_FAILED = errors.New("ERR_USER_LOGIN_FAILED") // 修改密码失败 ERR_USER_CHANGE_PASSWORD_FAILED = errors.New("ERR_USER_CHANGE_PASSWORD_FAILED") // 获取用户信息失败 ERR_USER_GET_PROFILE_FAILED = errors.New("ERR_USER_GET_PROFILE_FAILED") // 获取用户个人评论记录失败 ERR_USER_GET_MY_COMMENTS_FAILED = errors.New("ERR_USER_GET_MY_COMMENTS_FAILED") // 获取用户个人收藏漫画失败 ERR_USER_GET_MY_FAVOURITE_COMIC_FAILED = errors.New("ERR_USER_GET_MY_FAVOURITE_COMIC_FAILED") // 获取游戏区游戏列表失败 ERR_USER_GET_GAMES_LIST_FAILED = errors.New("ERR_USER_GET_GAMES_LIST_FAILED") // 获取游戏区游戏详情信息失败 ERR_USER_GET_GAME_INFO_FAILED = errors.New("ERR_USER_GET_GAME_INFO_FAILED") // 获取主目录失败 ERR_USER_GET_CATEGORIES_FAILED = errors.New("ERR_USER_GET_CATEGORIES_FAILED") // 排序类别错误 ERR_USER_COMIC_SORT_TYPE_INVALID = errors.New("ERR_USER_COMIC_SORT_TYPE_INVALID") // 获取本子列表失败 ERR_USER_GET_COMICS_LIST_FAILED = errors.New("ERR_USER_GET_COMICS_LIST_FAILED") // 获取本子信息失败 ERR_USER_GET_COMIC_INFO_FAILED = errors.New("ERR_USER_GET_COMIC_INFO_FAILED") // 获取本子分话列表失败 ERR_USER_GET_COMIC_EPS_LIST_FAILED = errors.New("ERR_USER_GET_COMIC_EPS_LIST_FAILED") // 获取本子分话内的本子图片列表失败 ERR_USER_GET_COMIC_EP_PICTURES_LIST_FAILED = errors.New("ERR_USER_GET_COMIC_EP_PICTURES_LIST_FAILED") // 获取本子关联推荐列表失败 ERR_USER_GET_COMIC_RECOMMENDS_LIST_FAILED = errors.New("ERR_USER_GET_COMIC_RECOMMENDS_LIST_FAILED") // 获取本子热搜词列表失败 ERR_USER_GET_COMIC_HOT_KEYWORDS_LIST_FAILED = errors.New("ERR_USER_GET_COMIC_HOT_KEYWORDS_LIST_FAILED") // 搜索本子失败 ERR_USER_SEARCH_COMICS_FAILED = errors.New("ERR_USER_SEARCH_COMICS_FAILED") // 喜欢/取消喜欢本子失败 ERR_USER_LIKE_COMIC_FAILED = errors.New("ERR_USER_LIKE_COMIC_FAILED") // 获取本子评论列表失败 ERR_USER_GET_COMIC_COMMENTS_LIST_FAILED = errors.New("ERR_USER_GET_COMIC_COMMENTS_LIST_FAILED") // 评论本子失败 // ERR_USER_COMIC_POST_COMMENT_FAILED = errors.New("ERR_USER_COMIC_POST_COMMENT_FAILED") // 收藏/取消收藏本子失败 ERR_USER_FAVOURITE_COMIC_FAILED = errors.New("ERR_USER_FAVOURITE_COMIC_FAILED") )
Functions ¶
This section is empty.
Types ¶
type PicaComic ¶
type PicaComic struct { // 用户名 Username string // 密码 Password string // 目标端点 EndPoint string // Secret Key,请求签名时候需要 SecretKey string // Api Key,请求的时候需要 ApiKey string // App版本,请求的时候需要 AppVersion string // App所在的操作系统平台,请求的时候需要 AppPlatform string // App Build Version,请求的时候需要 AppBuildVersion string // App Channel,请求的时候需要 AppChannel string // 图片质量,部分请求需要 ImageQuality string // App UUID,请求的时候需要 AppUUID string // Token,请求鉴权的时候需要 Token string // Api请求 超时时间 RequestTimeout time.Duration // Api请求 是否跳过证书校验 RequestTlsISV bool // Api请求 代理 RequestProxy string }
PicaComic 全局结构体
func (*PicaComic) ChangePassword ¶
用户修改密码
func (*PicaComic) ComicPostComment ¶
评论本子 WARN: 为了避免垃圾评论,该函数已经被移除
func (*PicaComic) FavouriteComic ¶
收藏/取消收藏本子 同一个接口,两个状态变化
func (*PicaComic) GetCategories ¶
获取主分类信息
func (*PicaComic) GetComicCommentsList ¶
获取本子评论列表
func (*PicaComic) GetComicEpPicsUrl ¶
获取本子图片地址
func (*PicaComic) GetComicEpPicturesList ¶
func (p *PicaComic) GetComicEpPicturesList(page int64, bookID string, epOrderID int64) (error, map[string]interface{})
获取本子分话内的本子图片列表
func (*PicaComic) GetComicEpsList ¶
获取本子分话列表
func (*PicaComic) GetComicHotKeywordsList ¶
获取本子热搜词列表(大家都在搜)
func (*PicaComic) GetComicInfo ¶
获取本子信息
func (*PicaComic) GetComicRecommendsList ¶
获取本子关联推荐列表(看了這本子的人也在看)
func (*PicaComic) GetComicsList ¶
func (p *PicaComic) GetComicsList(page int64, cateTitle string, tagName string, sortType string) (error, map[string]interface{})
获取本子列表
func (*PicaComic) GetGameInfo ¶
获取游戏详情信息
func (*PicaComic) GetGamesList ¶
获取游戏列表
func (*PicaComic) GetMyComment ¶
获取我的评论
func (*PicaComic) GetMyFavouriteComic ¶
获取我的已收藏漫画
func (*PicaComic) GetProfile ¶
获取用户信息
func (*PicaComic) GetSignature ¶
func (p *PicaComic) GetSignature(header map[string]string, url string, method string) (error, string)
获取请求签名
func (*PicaComic) SearchComics ¶
func (p *PicaComic) SearchComics(cateS []string, keyword string, sortType string, page int64) (error, map[string]interface{})
搜索本子
func (*PicaComic) SetAppBuildVersion ¶
设置App Build Version
func (*PicaComic) SetAppChannel ¶
设置App Channel
func (*PicaComic) SetAppPlatform ¶
设置App所在的操作系统平台
func (*PicaComic) SetImageQuality ¶
设置图片质量
func (*PicaComic) SetRequestProxy ¶
设置Api请求 代理
func (*PicaComic) SetRequestTimeout ¶
设置Api请求 超时时间
func (*PicaComic) SetRequestTlsISV ¶
设置Api请求 是否跳过证书校验
func (*PicaComic) SetSecretKey ¶
设置Secret Key
Click to show internal directories.
Click to hide internal directories.