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 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 string) (*SignGameData, error)
- type GenCredByCodeData
- type GrantAppData
- type ListAttendanceData
- type ListPlayerData
- type LoginByPhoneCodeData
- type Player
- 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" // 明日方舟 GameAppCodeArknights = "arknights" )
View Source
const (
CodeGameHasSigned = 10001
)
Variables ¶
View Source
var ( GameIdByCode = map[string]string{ GameAppCodeArknights: GameIdArknights, } )
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 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"` Records CalendarRecords `json:"records"` ResourceInfoMap map[string]*SignGameRes `json:"resourceInfoMap"` }
type ListPlayerData ¶
type ListPlayerData struct {
List []*PlayersByApp `json:"list"`
}
type LoginByPhoneCodeData ¶
type LoginByPhoneCodeData struct {
Token string `json:"token"`
}
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.