Documentation ¶
Index ¶
- Constants
- func PathFromRaw(rawPath string) string
- type CharacterData
- type LightCone
- type LightConeData
- type LightConeStat
- type Platform
- type RawAvatarDetail
- type RawChallengeInfo
- type RawDetailInfo
- type RawEquipmentFlatData
- type RawEquipmentFlatProp
- type RawEquipmentInfo
- type RawHonkaiUser
- type RawRecordInfo
- type RawRelic
- type RawRelicFlatData
- type RawRelicFlatProp
- type RawSkillTree
- type Relic
- type RelicData
- type RelicStat
- type RelicType
- type User
- type UserCharacter
Constants ¶
View Source
const ( WINDOWS Platform = "Windows" ANDROID = "Android" IOS = "IOS" PS4 = "PS4" PS5 = "PS5" )
Variables ¶
This section is empty.
Functions ¶
func PathFromRaw ¶ added in v0.1.3
Returns the path used in game, from the raw path. Used internally, you can just use CharacterData.Path
Types ¶
type CharacterData ¶
type CharacterData struct { // 4 or 5 Star int `json:"Rarity"` Path string // Internal name for the Path RawPath string `json:"AvatarBaseType"` AvatarName localization.HashNameAble `json:"AvatarName"` AvatarFullName localization.HashNameAble `json:"AvatarFullname"` Element string `json:"Element"` AvatarSideIconPath string `json:"AvatarSideIconPath"` AvatarCutinFrontImgPath string `json:"AvatarCutinFrontImgPath"` RankIdList []int `json:"RankIDList"` SkillList []int `json:"SkillList"` }
func (*CharacterData) FullName ¶
func (d *CharacterData) FullName() string
Returns the localized AvatarFullName or Hash if not found
For some reason always returns the Hash. FullName isn't present in the GitHub file.
func (*CharacterData) Name ¶
func (d *CharacterData) Name() string
Returns the localized AvatarName or Hash if not found
type LightCone ¶
type LightConeData ¶ added in v0.3.0
type LightConeData struct { Rarity int `json:"Rarity"` // Convert to Path with starrail.PathFromRaw RawPath string `json:"AvatarBaseType"` EquipmentName localization.HashNameAble `json:"EquipmentName"` ImagePath string `json:"ImagePath"` }
type LightConeStat ¶
type RawAvatarDetail ¶
type RawAvatarDetail struct { AvatarId int `json:"avatarId"` Rank int `json:"rank"` Level int `json:"level"` // Ascension, nill if level < 20 Promotion int `json:"promotion,omitempty"` Equipment *RawEquipmentInfo `json:"equipment,ompitempty"` SkillTreeList []RawSkillTree `json:"skillTreeList"` RelicList []RawRelic `json:"relicList"` }
type RawChallengeInfo ¶
type RawDetailInfo ¶
type RawDetailInfo struct { HeadIcon int `json:"headIcon"` AvatarDetailList []RawAvatarDetail `json:"avatarDetailList"` NickName string `json:"nickname"` Level int `json:"level"` Signature string `json:"signature"` Uid int `json:"uid"` FriendCount int `json:"friendCount"` RecordInfo RawRecordInfo `json:"recordInfo"` WordlLevel int `json:"worldLevel"` IsDisplayAvatar bool `json:"isDisplayAvatar"` Platform string `json:"platform"` }
type RawEquipmentFlatData ¶
type RawEquipmentFlatData struct { Props []RawEquipmentFlatProp `json:"props"` Name int64 `json:"name"` }
type RawEquipmentFlatProp ¶
type RawEquipmentInfo ¶
type RawEquipmentInfo struct { Tid int `json:"tid"` Rank int `json:"rank"` Level int `json:"level"` // Ascension Promotion int `json:"promotion"` EquipmentFlatData RawEquipmentFlatData `json:"_flat"` }
type RawHonkaiUser ¶
type RawHonkaiUser struct { DetailInfo RawDetailInfo `json:"detailInfo"` Ttl int `json:"ttl"` Uid string `json:"uid"` }
func (*RawHonkaiUser) GetTtl ¶
func (user *RawHonkaiUser) GetTtl() int
func (*RawHonkaiUser) ToUser ¶
func (user *RawHonkaiUser) ToUser() *User
type RawRecordInfo ¶
type RawRecordInfo struct { ChallengeInfo RawChallengeInfo `json:"challengeInfo"` EquipmentCount int `json:"equipmentCount"` MaxRogueChallengeScore int `json:"maxRogueChallengeScore"` AchievementCount int `json:"achievementCount"` AvatarCount int `json:"avatarCount"` BookCount int `json:"bookCount"` RelicCount int `json:"relicCount"` MusicCount int `json:"musicCount"` }
type RawRelic ¶
type RawRelic struct { Level int `json:"level"` MainAffixId int `json:"mainAffixId"` Type int `json:"type"` Tid int `json:"tid"` RelicFlatData RawRelicFlatData `json:"_flat"` }
type RawRelicFlatData ¶
type RawRelicFlatData struct { Props []RawRelicFlatProp `json:"props"` SetName int64 `json:"setName"` SetId int `json:"setId"` }
type RawRelicFlatProp ¶
type RawSkillTree ¶
type Relic ¶
type User ¶
type User struct { NickName string // Between 1 and 70 Level int Signature string // This has to be parsed with EnkaNetworkApi#GetStarRailAvatarKey & EnkaiNetworkApi#GetStarRailIcon AvatarIconId string Uid int FriendCount int EquilibriumLevel int // The highest planet(?) the user has unlocked in the simulated universe SimulatedUniverse int Platform Platform Characters []UserCharacter }
func UserFromRaw ¶
func UserFromRaw(rawUser *RawHonkaiUser) *User
Click to show internal directories.
Click to hide internal directories.