Documentation ¶
Index ¶
- Constants
- func ActionPost(postId string, action int, cancel bool, skland config.AccountSkland) error
- func AddSign(r *resty.Request, method, path string, skland config.AccountSkland)
- func Exec[T any](r *resty.Request, method, path string, vs ...any) (t T, _ error)
- func IsMessage(err error, msg string) bool
- func IsUnauthorized(err error) bool
- func R() *resty.Request
- func SharePost(gameId string, skland config.AccountSkland) error
- func SignForum(gid string, skland config.AccountSkland) error
- func SwitchPlayer(gid, uid string, skland config.AccountSkland) error
- type AuthRefreshData
- type BaseResp
- type Calendar
- type CalendarRecord
- type CalendarRecords
- type GameCate
- type GameData
- type GameInfo
- type GameQuickAccess
- type GenCredByCodeData
- type GetPostData
- type GetSignForumData
- type ListAttendanceData
- type ListGameData
- type ListPlayerData
- type ListPostData
- type Player
- type PlayersByApp
- type PostData
- type PostInfo
- type PostRel
- type PostRts
- type PostUser
- type PostUserRel
- type SignFormData
- type SignGameAward
- type SignGameAwards
- type SignGameData
- type SignGameRes
- type User
- type UserInfo
Constants ¶
View Source
const ( Addr = "https://zonai.skland.com" UserAgent = "Skland/1.5.1 (com.hypergryph.skland; build:100501001; Android 33; ) Okhttp/4.11.0" Platform = "1" VName = "1.5.1" DId = "743a446c83032899" GameIdArknights = "1" // 明日方舟 GameIdExastris = "2" // 来自星尘 GameIdEndfleld = "3" // 明日方舟:终末地 GameIdPopucom = "4" // 泡姆泡姆 GameIdNest = "100" // 纳斯特港 GameIdOpenup = "101" // 开拓芯 GameAppCodeArknights = "arknights" MessageForumHasSigned = "重复签到" MessageGameHasSigned = "请勿重复签到!" )
View Source
const ( ActionLike = 12 ActionCollect = 21 )
Variables ¶
This section is empty.
Functions ¶
func ActionPost ¶ added in v1.2.0
func AddSign ¶
func AddSign(r *resty.Request, method, path string, skland config.AccountSkland)
func IsUnauthorized ¶
func SwitchPlayer ¶
func SwitchPlayer(gid, uid string, skland config.AccountSkland) error
Types ¶
type AuthRefreshData ¶
type AuthRefreshData struct {
Token string `json:"token"`
}
func AuthRefresh ¶
func AuthRefresh(cred string) (*AuthRefreshData, error)
type BaseResp ¶
type BaseResp[T any] struct { Code *int `json:"code"` Message string `json:"message"` Data T `json:"data,omitempty"` }
func (*BaseResp[T]) GetMessage ¶ added in v1.2.0
type CalendarRecord ¶
type CalendarRecords ¶ added in v1.2.0
type CalendarRecords []*CalendarRecord
func (CalendarRecords) ShortString ¶ added in v1.2.0
func (v1 CalendarRecords) ShortString(m map[string]*SignGameRes) string
func (CalendarRecords) Today ¶ added in v1.2.0
func (v1 CalendarRecords) Today() (v2 CalendarRecords)
type GameData ¶ added in v1.2.0
type GameData struct { Game *GameInfo `json:"game"` Cates []*GameCate `json:"cates"` QuickAccesses []*GameQuickAccess `json:"quickaccesses"` }
func (*GameData) FirstCate20 ¶ added in v1.2.0
type GameQuickAccess ¶ added in v1.2.0
type GenCredByCodeData ¶
type GenCredByCodeData struct { UserId string `json:"userId"` Cred string `json:"cred"` Token string `json:"token"` }
func AuthLoginByCode ¶
func AuthLoginByCode(code string) (*GenCredByCodeData, error)
type GetPostData ¶ added in v1.1.6
type GetPostData struct {
List []*PostData `json:"list"`
}
func (*GetPostData) Get ¶ added in v1.1.6
func (v *GetPostData) Get() *PostData
type GetSignForumData ¶ added in v1.2.0
type GetSignForumData struct {
List []*SignFormData `json:"list"`
}
func GetSignForum ¶ added in v1.2.0
func GetSignForum(skland config.AccountSkland) (*GetSignForumData, error)
func (GetSignForumData) Map ¶ added in v1.2.0
func (t GetSignForumData) Map() map[int]bool
type ListAttendanceData ¶
type ListAttendanceData struct { CurrentTs string `json:"currentTs"` Calendar []*Calendar `json:"calendar"` Records CalendarRecords `json:"records"` ResourceInfoMap map[string]*SignGameRes `json:"resourceInfoMap"` }
func ListSignGame ¶ added in v1.2.0
func ListSignGame(gid, uid string, skland config.AccountSkland) (*ListAttendanceData, error)
type ListGameData ¶
type ListGameData struct {
List []*GameData `json:"list"`
}
func ListGame ¶
func ListGame() (*ListGameData, error)
type ListPlayerData ¶
type ListPlayerData struct {
List []*PlayersByApp `json:"list"`
}
func ListPlayer ¶
func ListPlayer(skland config.AccountSkland) (*ListPlayerData, error)
type ListPostData ¶ added in v1.1.6
type ListPostData struct { HasMore bool `json:"hasMore"` PageSize int `json:"pageSize"` PageToken string `json:"pageToken"` List []*PostData `json:"list"` }
func ListPost ¶ added in v1.1.6
func ListPost(gameId, cateId, pageToken string, skland config.AccountSkland) (*ListPostData, error)
type PlayersByApp ¶ added in v1.2.0
type PostData ¶ added in v1.2.0
type PostData struct { Item *PostInfo `json:"item"` ItemRel *PostRel `json:"itemRel"` ItemRts *PostRts `json:"itemRts"` User *PostUser `json:"user"` UserRel *PostUserRel `json:"userRel"` }
func GetPost ¶ added in v1.1.6
func GetPost(postId string, skland config.AccountSkland) (*PostData, error)
func (*PostData) IsCollected ¶ added in v1.2.0
type PostInfo ¶ added in v1.2.0
type PostInfo struct { Id string `json:"id"` UserId string `json:"userId"` GameId int `json:"gameId"` CateId int `json:"cateId"` Title string `json:"title"` Status int `json:"status"` Version int `json:"version"` CreatedAtTs int `json:"createdAtTs"` UpdatedAtTs int `json:"updatedAtTs"` LatestEditAtTs int `json:"latestEditAtTs"` LatestReplyAtTs int `json:"latestReplyAtTs"` FirstIpLocation string `json:"firstIpLocation"` LatestIpLocation string `json:"latestIpLocation"` }
type PostUserRel ¶ added in v1.1.6
type SignFormData ¶ added in v1.2.0
type SignGameAward ¶ added in v1.2.0
type SignGameAward struct { Type string `json:"type"` Count int `json:"count"` Resource *SignGameRes `json:"resource"` }
type SignGameAwards ¶ added in v1.2.0
type SignGameAwards []*SignGameAward
func (SignGameAwards) ShortString ¶ added in v1.2.0
func (t SignGameAwards) ShortString() string
type SignGameData ¶ added in v1.2.0
type SignGameData struct { Ts string `json:"ts"` Awards SignGameAwards `json:"awards"` }
func SignGame ¶ added in v1.2.0
func SignGame(gid, uid string, skland config.AccountSkland) (*SignGameData, error)
type SignGameRes ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.