Documentation
¶
Index ¶
- Constants
- Variables
- func Exec[T any](r *resty.Request, method, path string) (t T, _ error)
- func IsCode(err error, code Code) bool
- type Client
- func (c *Client) GetPost(id string) (*GetPostData, error)
- func (c *Client) GetSignForum(gid int) (*GetSignForumData, error)
- func (c *Client) GetUser() (*User, error)
- func (c *Client) LikePost(gid, fid int, pid, uid string, cancel bool) error
- func (c *Client) ListPost(gid, fid, page int) (*ListPostData, error)
- func (c *Client) ListRole(gid int) ([]*Role, error)
- func (c *Client) ListSignGame(gid int, sid, rid string, uid int) (*ListSignGameData, error)
- func (c *Client) ListSignGameRecord(gid int, sid, rid string, uid int) (Goods, error)
- func (c *Client) LoginByPhoneCode(code string) (*LoginByPhoneCodeData, error)
- func (c *Client) R() *resty.Request
- func (c *Client) SendPhoneCode(gt *geetest.V4Data) (*SendPhoneCodeData, error)
- func (c *Client) SharePost(gid int) error
- func (c *Client) SignForum(gid int) (*SignForumData, error)
- func (c *Client) SignGame(gid int, sid, rid string, uid int) (*SignGameData, error)
- type Code
- type GainVo
- type GetPostData
- type GetSignForumData
- type Good
- type GoodId
- type Goods
- type ListPostData
- type ListSignGameData
- type LoginByPhoneCodeData
- type Mine
- type PostInfo
- type Role
- type SendPhoneCodeData
- type SignForumData
- type SignGameData
- type Timestamp
- type User
Constants ¶
View Source
const ( Addr = "https://api.kurobbs.com" UserAgent = "okhttp/3.11.0" AndroidName = "com.kurogame.kjq" Version = "2.2.0" SourceAndroid = "android" GameIdPNS = 2 // 战双 GameIdMC = 3 // 鸣潮 ForumIdPNS3 = 3 // 伊甸闲庭 ForumIdMC10 = 10 // 今州茶馆 GT4Id = "3f7e2d848ce0cb7e7d019d621e556ce2" )
View Source
const (
CodeHasSigned = Code(1511)
)
Variables ¶
View Source
var ( GameNameById = map[int]string{ GameIdPNS: "战双", GameIdMC: "鸣潮", } ForumIdByGameId = map[int]int{ GameIdPNS: ForumIdPNS3, GameIdMC: ForumIdMC10, } )
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetSignForum ¶
func (c *Client) GetSignForum(gid int) (*GetSignForumData, error)
func (*Client) ListSignGame ¶
func (*Client) ListSignGameRecord ¶
func (*Client) LoginByPhoneCode ¶
func (c *Client) LoginByPhoneCode(code string) (*LoginByPhoneCodeData, error)
func (*Client) SendPhoneCode ¶
func (c *Client) SendPhoneCode(gt *geetest.V4Data) (*SendPhoneCodeData, error)
type GetPostData ¶
type GetSignForumData ¶
type ListPostData ¶
type ListSignGameData ¶
type ListSignGameData struct {
DisposableGoodsList Goods `json:"disposableGoodsList"`
DisposableSignNum int `json:"disposableSignNum"`
SignInGoodsConfigs Goods `json:"signInGoodsConfigs"`
SignLoopGoodsList Goods `json:"signLoopGoodsList"`
SigInNum int `json:"sigInNum"`
NowServerTimes string `json:"nowServerTimes"`
EventStartTimes string `json:"eventStartTimes"`
EventEndTimes string `json:"eventEndTimes"`
ExpendGold int `json:"expendGold"`
ExpendNum int `json:"expendNum"`
IsSigIn bool `json:"isSigIn"`
OmissionNnm int `json:"omissionNnm"`
}
func (*ListSignGameData) GoodsMap ¶
func (v *ListSignGameData) GoodsMap() map[int]*Good
type LoginByPhoneCodeData ¶
type PostInfo ¶
type PostInfo struct {
GameId int `json:"gameId"`
GameName string `json:"gameName"`
GameForumId int `json:"gameForumId"`
PostId string `json:"postId"`
PostType int `json:"postType"`
PostUserId string `json:"postUserId"` // detail
PostTitle string `json:"postTitle"`
PostContent any `json:"postContent"`
UserId string `json:"userId"` // list
UserName string `json:"userName"`
BrowseCount string `json:"browseCount"`
CommentCount int `json:"commentCount"`
LikeCount int `json:"likeCount"`
IsFollow int `json:"isFollow"`
IsLike int `json:"isLike"`
IsLock int `json:"isLock"`
IsPublisher int `json:"isPublisher"`
CreateTimestamp Timestamp `json:"createTimestamp"`
}
type SendPhoneCodeData ¶
type SendPhoneCodeData struct {
GeeTest bool `json:"geeTest"`
}
type SignForumData ¶
type SignGameData ¶
type Timestamp ¶
func (*Timestamp) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.