Documentation ¶
Index ¶
- Constants
- Variables
- func DetectVersions() int
- func FindDataPath(outputLog []byte) string
- type Client
- func (client Client) FindQueryLinkWithAuthKey() (*url.URL, error)
- func (client Client) FindURLFromCacheData(f func(u *url.URL) bool) (*url.URL, error)
- func (client Client) FindURLFromOutputLog(f func(u *url.URL) bool) (*url.URL, error)
- func (client Client) GetBaseURL() (baseURL string, err error)
- func (client Client) GetUID() (string, error)
- func (client Client) OutputLogPath() string
- func (client Client) UIDInfoPath() string
Constants ¶
View Source
const ( CN = 1 << iota OS )
Variables ¶
View Source
var ( ErrURLNotFound = errors.New("URL not found") ErrClientNotFound = errors.New("client not found") ErrUIDNotFound = errors.New("UID not found") CNClient = Client{ PersistentDataPath: filepath.Join(os.Getenv("USERPROFILE"), `\AppData\LocalLow\miHoYo\原神`), QueryLinkHostName: "webstatic.mihoyo.com", APIGetWishHistory: "https://hk4e-api.mihoyo.com/event/gacha_info/api/getGachaLog", } OSClient = Client{ PersistentDataPath: filepath.Join(os.Getenv("USERPROFILE"), `\AppData\LocalLow\miHoYo\Genshin Impact`), QueryLinkHostName: "webstatic-sea.hoyoverse.com", APIGetWishHistory: "https://hk4e-api-os.hoyoverse.com/event/gacha_info/api/getGachaLog", } )
View Source
var DataPathRE = regexp.MustCompile(`.:/.*?/(YuanShen_Data|GenshinImpact_Data)/`)
Functions ¶
func DetectVersions ¶ added in v0.2.2
func DetectVersions() int
func FindDataPath ¶ added in v0.3.0
Types ¶
type Client ¶
func (Client) FindQueryLinkWithAuthKey ¶
func (Client) FindURLFromCacheData ¶ added in v0.3.0
func (Client) FindURLFromOutputLog ¶
func (Client) GetBaseURL ¶
func (Client) OutputLogPath ¶
func (Client) UIDInfoPath ¶
Click to show internal directories.
Click to hide internal directories.