Documentation
¶
Index ¶
- Constants
- Variables
- func CollectPost(postId string, cancel bool, account config.Account) error
- func CreateVerification(account config.Account) (*common.AigisData, error)
- func Login(account config.Account) error
- func UpvotePost(postId string, cancel bool, account config.Account) error
- type Game
- type GameCard
- type GameCardItem
- type GameRole
- type GetBusinessesData
- type GetPostData
- type GetSignForumData
- type GetSignGameData
- type GetUserData
- type Home
- type HomeNav
- type HomeOfficial
- type ListGameCardData
- type ListGameData
- type ListGameRoleData
- type ListPostData
- type ListSignGameAwardData
- type ListSignGameData
- type PostData
- type PostInfo
- type PostSelfOperation
- type PostStat
- type PostUser
- type SharePostData
- type SignForumData
- type SignGameAward
- type SignGameAwards
- type SignGameData
- type SignGameExtraAward
- type UserInfo
- type VerifyVerificationData
Constants ¶
View Source
const ( AddrTakumi = "https://api-takumi.mihoyo.com" AddrActNap = "https://act-nap-api.mihoyo.com" AddrTakumiRecord = "https://api-takumi-record.mihoyo.com" AddrBBS = "https://bbs-api.miyoushe.com" )
Variables ¶
View Source
var AllGames = json.MustUnmarshalTo[[]*Game](`
[
{
"id": 1,
"name": "崩坏3",
"en_name": "bh3",
"op_name": "bh3"
},
{
"id": 2,
"name": "原神",
"en_name": "ys",
"op_name": "hk4e"
},
{
"id": 3,
"name": "崩坏学园2",
"en_name": "bh2",
"op_name": "bh2"
},
{
"id": 4,
"name": "未定事件簿",
"en_name": "wd",
"op_name": "nxx"
},
{
"id": 5,
"name": "大别野",
"en_name": "dby",
"op_name": "plat"
},
{
"id": 6,
"name": "崩坏:星穹铁道",
"en_name": "sr",
"op_name": "hkrpg"
},
{
"id": 8,
"name": "绝区零",
"en_name": "zzz",
"op_name": "nap"
}
]
`)
Functions ¶
func CollectPost ¶ added in v1.1.0
func CreateVerification ¶ added in v1.0.4
Types ¶
type GameCard ¶ added in v1.1.10
type GameCard struct { HasRole bool `json:"has_role"` IsPublic bool `json:"is_public"` GameId int `json:"game_id"` GameRoleId string `json:"game_role_id"` Region string `json:"region"` RegionName string `json:"region_name"` Level int `json:"level"` Nickname string `json:"nickname"` Data []*GameCardItem `json:"data"` }
type GameCardItem ¶ added in v1.1.10
type GetBusinessesData ¶ added in v1.1.0
type GetBusinessesData struct {
Businesses []string `json:"businesses"`
}
func GetBusinesses ¶ added in v1.1.0
func GetBusinesses(account config.Account) (*GetBusinessesData, error)
type GetPostData ¶ added in v1.0.5
type GetPostData struct {
Post *PostData `json:"post"`
}
type GetSignForumData ¶ added in v1.1.0
type GetSignForumData struct {
IsSigned bool `json:"is_signed"`
}
func GetSignForum ¶ added in v1.1.0
func GetSignForum(gameId string, account config.Account) (*GetSignForumData, error)
type GetSignGameData ¶ added in v1.1.0
type GetSignGameData struct { TotalSignDay int `json:"total_sign_day"` Today string `json:"today"` IsSign bool `json:"is_sign"` IsSub bool `json:"is_sub"` Region string `json:"region"` SignCntMissed int `json:"sign_cnt_missed"` ShortSignDay int `json:"short_sign_day"` }
func GetSignGame ¶ added in v1.1.0
func GetSignGame(gameName, actId, region, uid string, account config.Account) (*GetSignGameData, error)
type GetUserData ¶ added in v1.1.0
type GetUserData struct {
UserInfo *UserInfo `json:"user_info"`
}
type Home ¶ added in v1.1.0
type Home struct { Official *HomeOfficial `json:"official"` }
func (*Home) GetSignActId ¶ added in v1.1.0
type HomeOfficial ¶ added in v1.1.0
type HomeOfficial struct {
ForumId int `json:"forum_id"`
}
type ListGameCardData ¶ added in v1.1.10
type ListGameCardData struct {
List []*GameCard `json:"list"`
}
func ListGameCard ¶ added in v1.1.10
func ListGameCard(account config.Account) (*ListGameCardData, error)
type ListGameData ¶
type ListGameData struct {
List []*Game `json:"list"`
}
func ListGame ¶
func ListGame() (*ListGameData, error)
type ListGameRoleData ¶
type ListGameRoleData struct {
List []*GameRole `json:"list"`
}
func ListGameRole ¶
func ListGameRole(gameBiz string, account config.Account) (*ListGameRoleData, error)
type ListPostData ¶ added in v1.0.5
type ListPostData struct { IsLast bool `json:"is_last"` IsOrigin bool `json:"is_origin"` LastId string `json:"last_id"` List []*PostData `json:"list"` }
func ListFeedPost ¶ added in v1.1.0
func ListFeedPost(gameId string, account config.Account) (*ListPostData, error)
type ListSignGameAwardData ¶ added in v1.1.0
type ListSignGameAwardData struct { Total int `json:"total"` List SignGameAwards `json:"list"` }
type ListSignGameData ¶ added in v1.1.0
type ListSignGameData struct { Month int `json:"month"` Biz string `json:"biz"` Resign bool `json:"resign"` Awards []*SignGameAward `json:"awards"` ExtraAward *SignGameExtraAward `json:"short_extra_award"` }
func ListSignGame ¶ added in v1.1.0
func ListSignGame(gameName, actId string, account config.Account) (*ListSignGameData, error)
type PostData ¶ added in v1.1.0
type PostData struct { Post *PostInfo `json:"post"` Stat *PostStat `json:"stat"` User *PostUser `json:"user"` SelfOperation *PostSelfOperation `json:"self_operation"` }
func (*PostData) IsCollected ¶ added in v1.1.0
type PostSelfOperation ¶ added in v1.0.5
type SharePostData ¶ added in v1.0.5
type SharePostData struct {}
type SignForumData ¶ added in v1.1.0
type SignForumData struct {
Points int `json:"points"`
}
func SignForum ¶ added in v1.1.0
func SignForum(gameId string, account config.Account, verification *common.Verification) (*SignForumData, error)
type SignGameAward ¶ added in v1.1.0
type SignGameAwards ¶ added in v1.1.0
type SignGameAwards []*SignGameAward
func ListSignGameAward ¶ added in v1.1.0
func ListSignGameAward(gameName, actId, region, uid string, account config.Account) (list SignGameAwards, _ error)
func (SignGameAwards) ShortString ¶ added in v1.1.0
func (v1 SignGameAwards) ShortString() string
func (SignGameAwards) Today ¶ added in v1.1.0
func (v1 SignGameAwards) Today() (v2 SignGameAwards)
type SignGameData ¶ added in v1.1.0
type SignGameData struct { Code string `json:"code"` Success int `json:"success"` IsRisk bool `json:"is_risk"` RiskCode int `json:"risk_code"` Gt string `json:"gt"` Challenge string `json:"challenge"` }
func SignGame ¶ added in v1.1.0
func SignGame(gameName, actId, region, uid string, account config.Account, validate *common.Verification) (*SignGameData, error)
func (*SignGameData) IsRisky ¶ added in v1.1.0
func (t *SignGameData) IsRisky() bool
type SignGameExtraAward ¶ added in v1.1.0
type VerifyVerificationData ¶ added in v1.0.4
type VerifyVerificationData struct {
Challenge string `json:"challenge"`
}
func VerifyVerification ¶ added in v1.0.4
func VerifyVerification(challenge, validate string, account config.Account) (*VerifyVerificationData, error)
Click to show internal directories.
Click to hide internal directories.