Documentation
¶
Index ¶
- Constants
- func CToken(account config.Account) []*http.Cookie
- func DS1() string
- func DS2(q *resty.Request) string
- func Exec[T any](r *resty.Request, method, url string, ds ...int) (t T, _ error)
- func GetAigisData(err error) (*Aigis, *AigisData)
- func GetHeaders(err error) http.Header
- func IsRetCode(err error, rc int) bool
- func R(vs ...any) *resty.Request
- func RSAEncrypt(content string) string
- func SToken(account config.Account) []*http.Cookie
- type Aigis
- type AigisData
- type BaseResp
- type Verification
Constants ¶
View Source
const ( UserAgent = "Mozilla/5.0 (Linux; Android 13; 22011211C Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/104.0.5112.97 Mobile Safari/537.36 miHoYoBBS/" + AppVersion RefererApp = "https://app.mihoyo.com" RefererAct = "https://act.mihoyo.com" AppVersion = "2.81.1" AppIdMiyoushe = "bll8iq97cem8" // 米游社 )
View Source
const ( RetCodeQRCodeExpired = -106 // 二维码过期 RetCodeSendPhoneCodeFrequently = -3101 // 发送验证码频率过快 RetCodeGameHasSigned = -5003 // 已签到 RetCodeForumHasSigned = 1008 // 打卡失败或重复打卡 RetCodeForumNeedVerification = 1034 // 需要验证码 )
View Source
const ( GameIdBH3 = "1" // 崩坏3 GameIdYS = "2" // 原神 GameIdBH2 = "3" // 崩坏学园2 GameIdWD = "4" // 未定事件簿 GameIdDBY = "5" // 大别野 GameIdSR = "6" // 崩坏:星穹铁道 GameIdZZZ = "8" // 绝区零 GameNameBH3 = "bh3" GameNameYS = "hk4e" GameNameBH2 = "bh2" GameNameWD = "nxx" GameNameDBY = "plat" GameNameSR = "hkrpg" GameNameZZZ = "nap" GameBizBH3CN = GameNameBH3 + "_" + cn GameBizYSCN = GameNameYS + "_" + cn GameBizBH2CN = GameNameBH2 + "_" + cn GameBizWDCN = GameNameWD + "_" + cn GameBizSRCN = GameNameSR + "_" + cn GameBizZZZCN = GameNameZZZ + "_" + cn ForumIdSR = "53" XRpcSignGame = "x-rpc-signgame" )
View Source
const ( // AppSaltK2 https://blog.starudream.cn/2023/11/09/miyoushe-salt-2.62.2/ AppSaltK2 = "QVu5OdwEWxkq9ygpYBgDprR5tI471HWQ" // 2.81.1 // AppSalt6X https://github.com/UIGF-org/mihoyo-api-collect/issues/1 AppSalt6X = "t0qEgfub6cvueAPgR5m9aQWWVciEer7v" )
Variables ¶
This section is empty.
Functions ¶
func GetAigisData ¶ added in v1.4.0
func GetHeaders ¶ added in v1.4.0
func RSAEncrypt ¶ added in v1.4.0
Types ¶
type BaseResp ¶
type BaseResp[T any] struct { RetCode *int `json:"retcode"` Message string `json:"message"` Data T `json:"data"` }
func (*BaseResp[T]) GetRetCode ¶
type Verification ¶
Click to show internal directories.
Click to hide internal directories.