Documentation
¶
Index ¶
- Constants
- Variables
- func Exec[T any](r *resty.Request, method, url string, args ...any) (t T, _ error)
- func IsCode(err error, code int) bool
- type AuthRefreshData
- type Calendar
- type CalendarRecord
- type CalendarRecords
- type Client
- func (c *Client) AuthLoginByCode(code string) (*GenCredByCodeData, error)
- func (c *Client) AuthRefresh(cred string) (*AuthRefreshData, error)
- func (c *Client) GrantApp(token string, code string) (*GrantAppData, error)
- func (c *Client) ListPlayer() (*ListPlayerData, error)
- func (c *Client) ListSignGame(gid, uid, rid, sid string) (*ListAttendanceData, error)
- func (c *Client) LoginByPhoneCode(code string) (*LoginByPhoneCodeData, error)
- func (c *Client) R() *resty.Request
- func (c *Client) SendPhoneCode() error
- func (c *Client) SignGame(gid, uid, rid, sid string) (*SignGameData, error)
- type GenCredByCodeData
- type GrantAppData
- type ListAttendanceData
- type ListPlayerData
- type LoginByPhoneCodeData
- type Player
- type PlayerRole
- type PlayersByApp
- type SignGameAward
- type SignGameAwards
- type SignGameData
- type SignGameRes
Constants ¶
View Source
const ( AddrHypergryph = "https://as.hypergryph.com" AddrZonai = "https://zonai.skland.com" UserAgent = "Skland/1.5.1 (com.hypergryph.skland; build:100501001; Android 33; ) Okhttp/4.11.0" AppCodeSkland = "4ca99fa6b56cc2ba" Platform = "1" VName = "1.5.1" DId = "743a446c83032899" GameIdArknights = "1" // 明日方舟 GameIdEndfield = "3" // 终末地 GameAppCodeArknights = "arknights" GameAppCodeEndfield = "endfield" )
View Source
const (
CodeGameHasSigned = 10001
)
Variables ¶
View Source
var ( GameIdByCode = map[string]string{ GameAppCodeArknights: GameIdArknights, GameAppCodeEndfield: GameIdEndfield, } )
Functions ¶
Types ¶
type AuthRefreshData ¶
type AuthRefreshData struct {
Token string `json:"token"`
}
type CalendarRecord ¶
type CalendarRecords ¶
type CalendarRecords []*CalendarRecord
func (CalendarRecords) ShortString ¶
func (v1 CalendarRecords) ShortString(m map[string]*SignGameRes) string
func (CalendarRecords) Today ¶
func (v1 CalendarRecords) Today() (v2 CalendarRecords)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AuthLoginByCode ¶
func (c *Client) AuthLoginByCode(code string) (*GenCredByCodeData, error)
func (*Client) AuthRefresh ¶
func (c *Client) AuthRefresh(cred string) (*AuthRefreshData, error)
func (*Client) GrantApp ¶
func (c *Client) GrantApp(token string, code string) (*GrantAppData, error)
func (*Client) ListPlayer ¶
func (c *Client) ListPlayer() (*ListPlayerData, error)
func (*Client) ListSignGame ¶
func (c *Client) ListSignGame(gid, uid, rid, sid string) (*ListAttendanceData, error)
func (*Client) LoginByPhoneCode ¶
func (c *Client) LoginByPhoneCode(code string) (*LoginByPhoneCodeData, error)
func (*Client) SendPhoneCode ¶
type GenCredByCodeData ¶
type GrantAppData ¶
type ListAttendanceData ¶
type ListAttendanceData struct {
CurrentTs string `json:"currentTs"`
Calendar []*Calendar `json:"calendar"`
ResourceInfoMap map[string]*SignGameRes `json:"resourceInfoMap"`
Records CalendarRecords `json:"records"` // 明日方舟
HasToday bool `json:"hasToday"` // 终末地
}
type ListPlayerData ¶
type ListPlayerData struct {
List []*PlayersByApp `json:"list"`
}
type LoginByPhoneCodeData ¶
type LoginByPhoneCodeData struct {
Token string `json:"token"`
}
type Player ¶
type Player struct {
Uid string `json:"uid"`
ChannelName string `json:"channelName"`
ChannelMasterId string `json:"channelMasterId"`
NickName string `json:"nickName"`
IsOfficial bool `json:"isOfficial"`
IsDefault bool `json:"isDefault"`
IsDelete bool `json:"isDelete"`
DefaultRole *PlayerRole `json:"defaultRole"`
}
func (*Player) GetDefaultRole ¶ added in v1.0.13
func (p *Player) GetDefaultRole() *PlayerRole
type PlayerRole ¶ added in v1.0.13
type PlayersByApp ¶
type SignGameAward ¶
type SignGameAward struct {
Type string `json:"type"`
Count int `json:"count"`
Resource *SignGameRes `json:"resource"`
}
type SignGameAwards ¶
type SignGameAwards []*SignGameAward
func (SignGameAwards) ShortString ¶
func (t SignGameAwards) ShortString() string
type SignGameData ¶
type SignGameData struct {
Ts string `json:"ts"`
Awards SignGameAwards `json:"awards"`
}
Click to show internal directories.
Click to hide internal directories.