mihoyo

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCookieInitialTips

func GetCookieInitialTips() string

func GetUidCookieById

func GetUidCookieById(id int64) (string, string, string, error)

func Sign

func Sign(cookie string, user GameRole) error

Types

type GameRole

type GameRole struct {
	Uid        string `json:"game_uid"`
	NickName   string `json:"nickname"`
	Region     string `json:"region"`
	RegionName string `json:"region_name"`
}

func GetUserGameRoleByUid

func GetUserGameRoleByUid(cookie string, uid string) (*GameRole, error)

func GetUserGameRoles

func GetUserGameRoles(cookie string) ([]GameRole, error)

type GameRoleExpedition

type GameRoleExpedition struct {
	AvatarSideIconLink string `json:"avatar_side_icon"` // 派遣中角色侧头像
	Status             string `json:"status"`           // 派遣状态:Finished为完成
	RemainedTime       string `json:"remained_time"`    // 派遣完成剩余时间
}

type GameRoleList

type GameRoleList struct {
	List []GameRole `json:"list"`
}

type GenshinDailyNote

type GenshinDailyNote struct {
	CurrentResin           int                  `json:"current_resin"`                 // 当前树脂
	MaxResin               int                  `json:"max_resin"`                     // 最大树脂
	ResinRecoveryTime      string               `json:"resin_recovery_time"`           // 树脂恢复剩余时间
	FinishedTaskNum        int                  `json:"finished_task_num"`             // 委托完成数
	TotalTaskNum           int                  `json:"total_task_num"`                // 最大委托数
	GetTaskExReward        bool                 `json:"is_extra_task_reward_received"` // 是否已打扰凯瑟琳
	RemainResinDiscountNum int                  `json:"remain_resin_discount_num"`     // 周本体力减半剩余次数
	ResinDiscountNumLimit  int                  `json:"resin_discount_num_limit"`      // 周本体力减半总次数
	CurrentExpeditionNum   int                  `json:"current_expedition_num"`        // 当前派遣数
	MaxExpeditionNum       int                  `json:"max_expedition_num"`            // 最大派遣数
	Expeditions            []GameRoleExpedition `json:"expeditions"`                   // 派遣角色详情
	CurrentHomeCoin        int                  `json:"current_home_coin"`             // 当前洞天宝钱数
	MaxHomeCoin            int                  `json:"max_home_coin"`                 // 最大洞天宝钱数
	HomeCoinRecoveryTime   string               `json:"home_coin_recovery_time"`       // 洞天宝钱恢复剩余时间
}

func GetGenshinDailyNote

func GetGenshinDailyNote(cookie, uid, server string) (*GenshinDailyNote, error)

type MiyoRequest

type MiyoRequest struct {
	// contains filtered or unexported fields
}

func NewMiyoRequest

func NewMiyoRequest(url string) *MiyoRequest

func (*MiyoRequest) Execute

func (th *MiyoRequest) Execute() ([]byte, error)

func (*MiyoRequest) Post

func (th *MiyoRequest) Post(data interface{}) (MiyoResponse, error)

func (*MiyoRequest) SetHeader

func (th *MiyoRequest) SetHeader(k, v string)

type MiyoResponse

type MiyoResponse struct {
	RetCode int             `json:"retcode"`
	Message string          `json:"message"`
	Data    json.RawMessage `json:"data"`
}

type SignAwardsList

type SignAwardsList struct {
	Awards []struct {
		Name  string `json:"name"`
		Count int    `json:"cnt"`
	} `json:"awards"`
}

func GetSignAwardsList

func GetSignAwardsList() (*SignAwardsList, error)

type SignState

type SignState struct {
	Today        string `json:"today"`
	TotalSignDay int    `json:"total_sign_day"`
	IsSign       bool   `json:"is_sign"`
	IsSub        bool   `json:"is_sub"`
	MonthFirst   bool   `json:"month_first"`
	FirstBind    bool   `json:"first_bind"`
}

func GetSignStateInfo

func GetSignStateInfo(cookie string, user GameRole) (*SignState, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL