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 LikePost(gid, fid int, pid, uid string, cancel bool, account config.Account) error
- func R(vs ...any) *resty.Request
- func SharePost(gid int, account config.Account) error
- type AreaInfo
- type AreaItemInfo
- type BaseResp
- type BossInfo
- type BoxInfo
- type Code
- type DetectionInfo
- type ForumTaskInfo
- type GainVo
- type Game3Widget
- type Game3WidgetItem
- type GeeTestData
- type GetForumGoldData
- type GetForumTaskData
- type GetPostData
- type GetRoleBaseData
- type GetRoleCalabashData
- type GetRoleChallengeData
- type GetRoleExploreData
- type GetRoleListData
- type GetSignForumData
- type Good
- type GoodId
- type Goods
- type ListPostData
- type ListSignGameData
- type LoginByPhoneCodeData
- type Mine
- type Phantom
- type PhantomInfo
- type PostInfo
- type Role
- type RoleInfo
- 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" SourceH5 = "h5" CodeHasSigned = Code(1511) )
View Source
const ( GameIdPNS = 2 // 战双 GameIdMC = 3 // 鸣潮 )
View Source
const ( ForumIdPNS2 = 2 // 推荐 ForumIdPNS3 = 3 // 伊甸闲庭 ForumIdPNS4 = 4 // 攻略 ForumIdPNS5 = 5 // 同人 ForumIdMC9 = 9 // 推荐 ForumIdMC10 = 10 // 今州茶馆 ForumIdMC11 = 11 // 同人 ForumIdMC12 = 12 // 攻略 ForumIdMC15 = 15 // 新手 )
View Source
const (
GameMCCountryCodeHL = 1 // 瑝珑
)
Variables ¶
View Source
var GameNames = map[int]string{ GameIdPNS: "战双", GameIdMC: "鸣潮", }
Functions ¶
Types ¶
type AreaInfo ¶
type AreaInfo struct {
AreaId int `json:"areaId"`
AreaProgress int `json:"areaProgress"`
AreaName string `json:"areaName"`
ItemList []*AreaItemInfo `json:"itemList"`
}
type AreaItemInfo ¶
type BaseResp ¶
type DetectionInfo ¶
type ForumTaskInfo ¶
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 GetForumGoldData ¶
type GetForumGoldData struct {
GoldNum int `json:"goldNum"`
}
func GetForumGold ¶
func GetForumGold(account config.Account) (*GetForumGoldData, error)
type GetForumTaskData ¶
type GetForumTaskData struct {
CurrentDailyGold int `json:"currentDailyGold"`
MaxDailyGold int `json:"maxDailyGold"`
GrowTask []*ForumTaskInfo `json:"growTask"`
DailyTask []*ForumTaskInfo `json:"dailyTask"`
}
func GetForumTask ¶
func GetForumTask(account config.Account) (*GetForumTaskData, error)
type GetPostData ¶
type GetRoleBaseData ¶
type GetRoleBaseData struct {
Id int `json:"id"`
Name string `json:"name"`
ActiveDays int `json:"activeDays"`
Level int `json:"level"`
WorldLevel int `json:"worldLevel"`
RoleNum int `json:"roleNum"`
SoundBox int `json:"soundBox"`
Energy int `json:"energy"`
MaxEnergy int `json:"maxEnergy"`
Liveness int `json:"liveness"`
LivenessMaxCount int `json:"livenessMaxCount"`
LivenessUnlock bool `json:"livenessUnlock"`
ChapterId int `json:"chapterId"`
BigCount int `json:"bigCount"`
SmallCount int `json:"smallCount"`
AchievementCount int `json:"achievementCount"`
ShowToGuest bool `json:"showToGuest"`
BoxList []*BoxInfo `json:"boxList"`
CreatTime Timestamp `json:"creatTime"`
}
func GetRoleBase ¶
type GetRoleCalabashData ¶
type GetRoleCalabashData struct {
Level int `json:"level"`
BaseCatch string `json:"baseCatch"`
StrengthenCatch string `json:"strengthenCatch"`
CatchQuality int `json:"catchQuality"`
Cost int `json:"cost"`
MaxCount int `json:"maxCount"`
UnlockCount int `json:"unlockCount"`
PhantomList []*PhantomInfo `json:"phantomList"`
}
func GetRoleCalabash ¶
type GetRoleChallengeData ¶
type GetRoleChallengeData struct {
IndexList []*BossInfo `json:"indexList"`
}
func GetRoleChallenge ¶
type GetRoleExploreData ¶
type GetRoleExploreData struct {
CountryCode int `json:"countryCode"`
CountryName string `json:"countryName"`
CountryProgress string `json:"countryProgress"`
AreaInfoList []*AreaInfo `json:"areaInfoList"`
DetectionInfoList []*DetectionInfo `json:"detectionInfoList"`
}
func GetRoleExplore ¶
type GetRoleListData ¶
type GetRoleListData struct {
RoleList []*RoleInfo `json:"roleList"`
}
func GetRoleList ¶
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 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 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 string, account config.Account) (*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 PhantomInfo ¶
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"`
PostTitle string `json:"postTitle"`
PostContent any `json:"postContent"`
UserId string `json:"userId"`
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 Role ¶
type RoleInfo ¶
type RoleInfo struct {
RoleId int `json:"roleId"`
Level int `json:"level"`
RoleName string `json:"roleName"`
StarLevel int `json:"starLevel"`
AttributeId int `json:"attributeId"`
AttributeName string `json:"attributeName"`
WeaponTypeId int `json:"weaponTypeId"`
WeaponTypeName string `json:"weaponTypeName"`
Acronym string `json:"acronym"`
}
type SendPhoneCodeData ¶
type SendPhoneCodeData struct {
GeeTest bool `json:"geeTest"`
}
func SendPhoneCodeGeeTest ¶
func SendPhoneCodeGeeTest(phone string, geeTest *GeeTestData, account config.Account) (*SendPhoneCodeData, error)
type SignForumData ¶
type SignGameData ¶
type Timestamp ¶
func (*Timestamp) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.