Documentation
¶
Index ¶
- Constants
- Variables
- func Exec[T any](r *resty.Request, method, path string) (t T, _ error)
- func IsCode(err error, code Code) bool
- func R(vs ...any) *resty.Request
- type BaseResp
- type Code
- type GainVo
- type Game3Widget
- type Game3WidgetItem
- type GeeTestData
- type GetSignForumData
- type Good
- type Goods
- type ListSignGameData
- type LoginByPhoneCodeData
- type Mine
- type Role
- type SendPhoneCodeData
- type SignForumData
- type SignGameData
- 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" SourceH5 = "h5" CodeHasSigned = Code(1511) )
View Source
const ( GameIdPNS = 2 // 战双 GameIdMC = 3 // 鸣潮 )
Variables ¶
View Source
var GameNames = map[int]string{ GameIdPNS: "战双", GameIdMC: "鸣潮", }
Functions ¶
Types ¶
type BaseResp ¶
type Game3Widget ¶
type Game3Widget struct {
GameId int `json:"gameId"`
UserId int `json:"userId"`
ServerTime int `json:"serverTime"`
ServerId string `json:"serverId"`
ServerName string `json:"serverName"`
SignInTxt string `json:"signInTxt"`
HasSignIn bool `json:"hasSignIn"`
RoleId string `json:"roleId"`
RoleName string `json:"roleName"`
EnergyData *Game3WidgetItem `json:"energyData"`
LivenessData *Game3WidgetItem `json:"livenessData"`
BattlePassData []*Game3WidgetItem `json:"battlePassData"`
}
func GetGame3Widget ¶
func GetGame3Widget(account config.Account) (*Game3Widget, error)
type Game3WidgetItem ¶
type GeeTestData ¶
type GetSignForumData ¶
type GetSignForumData struct {
ContinueDays int `json:"continueDays"`
HasSignIn bool `json:"hasSignIn"`
}
func GetSignForum ¶
func GetSignForum(gid int, account config.Account) (*GetSignForumData, error)
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 ListSignGame ¶
func (*ListSignGameData) GoodsMap ¶
func (v *ListSignGameData) GoodsMap() map[int]*Good
type LoginByPhoneCodeData ¶
type LoginByPhoneCodeData struct {
UserId string `json:"userId"`
UserName string `json:"userName"`
Token string `json:"token"`
}
func LoginByPhoneCode ¶
func LoginByPhoneCode(phone, code, devCode string) (*LoginByPhoneCodeData, error)
type Mine ¶
type Mine struct {
UserId string `json:"userId"`
UserName string `json:"userName"`
Mobile string `json:"mobile"`
Status int `json:"status"`
Gender int `json:"gender"`
GoldNum int `json:"goldNum"`
IpRegion string `json:"ipRegion"`
RegisterTime string `json:"registerTime"`
Signature string `json:"signature"`
}
type Role ¶
type SendPhoneCodeData ¶
type SendPhoneCodeData struct {
GeeTest bool `json:"geeTest"`
}
func SendPhoneCode ¶
func SendPhoneCode(phone string) (*SendPhoneCodeData, error)
func SendPhoneCodeGeeTest ¶
func SendPhoneCodeGeeTest(phone string, geeTest *GeeTestData) (*SendPhoneCodeData, error)
type SignForumData ¶
type SignGameData ¶
Click to show internal directories.
Click to hide internal directories.