You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

api.md 8.9 kB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. # Enka.Network - API
  2. ## Table of Content
  3. - [Getting Started](#getting-started)
  4. - [Data Structure Info](#data-structure-info)
  5. - [Definitions](#definitions)
  6. - [Icons and Images](#icons-and-images)
  7. - [Localizations](#localizations)
  8. ## Getting Started
  9. You can fetch JSON-data by doing request via URL - `https://enka.network/u/[UID]/__data.json` <br />
  10. For example https://enka.network/u/700378769/__data.json
  11. ## Data Structure Info
  12. | Name | Description |
  13. | :--- | :---------- |
  14. | [playerInfo](#playerinfo) | Profile Info |
  15. | [avatarInfoList](#avatarinfolist) | List of detailed information for every character from showcase |
  16. ### playerInfo
  17. For basic data of characters by ID, go to [store/characters.json](/store/characters.json). <br />
  18. For any additional info, check the [Characters Data](https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/AvatarExcelConfigData.json).
  19. | Name | Description |
  20. | :--- | :--------- |
  21. | nickname | Player Nickname |
  22. | signature | Profile Signature |
  23. | worldLevel | Player World Level |
  24. | namecardId | Profile Namecard ID |
  25. | finishAchievementNum | Number of Completed Achievements |
  26. | towerFloorIndex | Abyss Floor |
  27. | towerLevelIndex | Abyss Floor's Chamber |
  28. | [showAvatarInfoList](#showavatarinfolist) | List of Character IDs and Levels |
  29. | showNameCardIdList | List of Namecard IDs |
  30. | profilePicture.avatarID | Character ID of Profile Picture |
  31. #### showAvatarInfoList
  32. | Name | Description |
  33. | :--- | :--------- |
  34. | avatarId | Character ID |
  35. | level | Character Level |
  36. | costumeId | ID of character's skin. Check `"Costumes"` in [store/characters.json](/store/characters.json) |
  37. ### avatarInfoList
  38. For basic data of characters by ID, go to [store/characters.json](/store/characters.json). <br />
  39. For any additional info, check the [Characters Data](https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/AvatarExcelConfigData.json).
  40. | Name | Description |
  41. | :--- | :---------- |
  42. | avatarID | Character ID |
  43. | talentIdList | List of Constellation IDs <br /> There is no data if 0 Constellation |
  44. | [propMap](#propmap) | Character Info Properties List |
  45. | fightPropMap -> `{id: value}` | Map of Character's Combat Properties. <br />Check the [Definitions for IDs](#fightprop)|
  46. | skillDepotId | Character Skill Set ID <br />[Skills Data](https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/AvatarSkillDepotExcelConfigData.json) -> `"id"`|
  47. | inherentProudSkillList | List of Unlocked Skill Ids <br />[Skills Data](https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/AvatarSkillDepotExcelConfigData.json) -> `"inherentProudSkillOpens"` |
  48. | skillLevelMap -> `{skill_id: level}`| Map of Skill Levels <br /> [Skills Data](https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/AvatarSkillDepotExcelConfigData.json) -> `"inherentProudSkillOpens"` |
  49. | [equipList](#equiplist) | List of Equipments: Weapon, Ariftacts |
  50. | fetterInfo.expLevel | Character Friendship Level |
  51. #### propMap
  52. | Name | Description |
  53. | :--- | :--------- |
  54. | type | ID of Property Type, Check the [Definitions for IDs](#prop) |
  55. | ival | Ignore it |
  56. | val | Value of Property |
  57. #### equipList
  58. | Name | Description |
  59. | :--- | :--------- |
  60. | itemId | Equipment ID <br /> [Artifacts Data](https://raw.githubusercontent.com/Dimbreath/GenshinData/master/ExcelBinOutput/ReliquaryExcelConfigData.json) -> `"id"` <br /> [Weapons Data](https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/WeaponExcelConfigData.json) -> `"id"` |
  61. | [weapon](#weapon) `[Weapon Only]` | Weapon Base Info |
  62. | [reliquary](#reliquary) `[Artifact Only]` | Artifact Base Info |
  63. | [flat](#flat) | Detailed Info of Equipment |
  64. #### weapon
  65. For any additional info about weapons, check the [Weapons Data](https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/WeaponExcelConfigData.json)
  66. | Name | Description |
  67. | :--- | :---------- |
  68. | level | Weapon Level |
  69. | promoteLevel | Weapon Ascension Level |
  70. | affixMap | Weapon Refinement Level `[0-4]` |
  71. #### reliquary
  72. For any additional info about artifacts, check the [Artifacts Data](https://raw.githubusercontent.com/Dimbreath/GenshinData/master/ExcelBinOutput/ReliquaryExcelConfigData.json)
  73. | Name | Description |
  74. | :--- | :---------- |
  75. | level | Artifact Level `[1-21]` |
  76. | mainPropId | Artifact Main Stat ID <br /> [MainProps Data](https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/ReliquaryMainPropExcelConfigData.json) |
  77. #### flat
  78. | Name | Description |
  79. | :--- | :---------- |
  80. | nameTextHashMap | Hash for Equipment Name <br /> Check [Localizations](#localizations) |
  81. | setNameTextHashMap `[Artifact Only]`| Hash for Artifact Set Name <br /> Check [Localizations](#localizations)|
  82. | rankLevel | Rarity Level of Equipment |
  83. | [reliquaryMainstat](#reliquarymainstat-reliquarysubstats-weaponstats) `[Artifact Only]` | Artifact Main Stat |
  84. | [reliquarySubstats](#reliquarymainstat-reliquarysubstats-weaponstats) `[Artifact Only]` | List of Artifact Substats |
  85. | [weaponStats](#reliquarymainstat-reliquarysubstats-weaponstats) `[Weapon Only]`| List of Weapon Stat: Base ATK, Substat |
  86. | [itemType](#itemtype) | Equipment Type: Weapon or Artifact |
  87. | icon | Equipment Icon Name <br /> [Icon name usage](#icons-and-images)|
  88. | [equipType](#equiptype) `[Artifact Only]` | Artifact Type |
  89. #### reliquaryMainstat, reliquarySubstats, weaponStats
  90. | Name | Description |
  91. | :--- | :---------- |
  92. | mainPropId / appendPropID | Equipment Append Property Name. Check the [Definitions for Names](#appendprop)|
  93. | propValue | Property Value |
  94. ## Definitions
  95. ### Prop
  96. | Type | Description |
  97. | :--: | :---------- |
  98. | 1001 | XP |
  99. | 1002 | Ascension |
  100. | 4001 | Level |
  101. ### FightProp
  102. | Type | Description |
  103. | :--: | :---------- |
  104. | 1 | Base HP |
  105. | 4 | Base ATK |
  106. | 7 | Base DEF |
  107. | 20 | CRIT Rate |
  108. | 22 | CRIT DMG |
  109. | 23 | Energy Recharge |
  110. | 26 | Healing Bonus |
  111. | 27 | Incoming Healing Bonus |
  112. | 28 | Elemental Mastery |
  113. | 29 | Physical RES |
  114. | 30 | Physical DMG Bonus |
  115. | 40 | Pyro DMG Bonus |
  116. | 41 | Electro DMG Bonus |
  117. | 42 | Hydro DMG Bonus |
  118. | 44 | Anemo DMG Bonus |
  119. | 45 | Geo DMG Bonus |
  120. | 46 | Cryo DMG Bonus |
  121. | 50 | Pyro RES |
  122. | 51 | Electro RES |
  123. | 52 | Hydro RES |
  124. | 53 | Dendro RES |
  125. | 54 | Anemo RES |
  126. | 55 | Geo RES |
  127. | 56 | Cryo RES |
  128. | 70 | Pyro Enegry Cost |
  129. | 71 | Electro Energy Cost |
  130. | 72 | Hydro Energy Cost |
  131. | 73 | Dendro Energy Cost |
  132. | 74 | Anemo Energy Cost |
  133. | 75 | Cryo Energy Cost |
  134. | 76 | Geo Energy Cost |
  135. | 2000 | Max HP |
  136. | 2001 | ATK |
  137. | 2002 | DEF |
  138. ### ItemType
  139. | Name | Description |
  140. | :--- | :---------- |
  141. | ITEM_WEAPON | Weapon |
  142. | ITEM_RELIQUARY | Artifact |
  143. ### EquipType
  144. | Name | Description |
  145. | :--- | :---------- |
  146. | EQUIP_BRACER | Flower |
  147. | EQUIP_NECKLACE | Feather |
  148. | EQUIP_SHOES | Sands |
  149. | EQUIP_RING | Goblet |
  150. | EQUIP_DRESS | Circlet |
  151. ### AppendProp
  152. | Name | Description |
  153. | :--- | :---------- |
  154. | FIGHT_PROP_BASE_ATTACK `[Weapon]` | Base ATK |
  155. | FIGHT_PROP_HP | Flat HP |
  156. | FIGHT_PROP_ATTACK | Flat ATK |
  157. | FIGHT_PROP_DEFENSE | Flat DEF |
  158. | FIGHT_PROP_HP_PERCENT | HP% |
  159. | FIGHT_PROP_ATTACK_PERCENT | ATK% |
  160. | FIGHT_PROP_DEFENSE_PERCENT | DEF% |
  161. | FIGHT_PROP_CRITICAL | Crit RATE |
  162. | FIGHT_PROP_CRITICAL_HURT | Crit DMG |
  163. | FIGHT_PROP_CHARGE_EFFICIENCY | Energy Recharge |
  164. | FIGHT_PROP_HEAL_ADD | Healing Bonus |
  165. | FIGHT_PROP_ELEMENT_MASTERY | Elemental Mastery |
  166. | FIGHT_PROP_PHYSICAL_ADD_HURT | Physical DMG Bonus |
  167. | FIGHT_PROP_FIRE_ADD_HURT | Pyro DMG Bonus |
  168. | FIGHT_PROP_ELEC_ADD_HURT | Electro DMG Bonus |
  169. | FIGHT_PROP_WATER_ADD_HURT | Hydro DMG Bonus |
  170. | FIGHT_PROP_WIND_ADD_HURT | Anemo DMG Bonus |
  171. | FIGHT_PROP_ICE_ADD_HURT | Cryo DMG Bonus |
  172. | FIGHT_PROP_ROCK_ADD_HURT | Geo DMG Bonus |
  173. ## Icons and Images
  174. You can get icons of characters, weapons and artifacts via Enka, by URL `https://enka.network/ui/[icon_name].png`.
  175. Usually icon name starts with `"UI_"` or `"Skill_"` for [characters talents](#characters-talents-and-consts).
  176. For example https://enka.network/ui/UI_AvatarIcon_Side_Ambor.png.
  177. ### Weapons and Artifacts
  178. Go to [flat](#flat) and look for `icon`.
  179. ### Characters, Talents and Consts
  180. Go to [store/characters.json](/store/characters.json) and look for anything related to "UI_XXXXXX" or "Skill_XXXXXX" by character ID.
  181. ## Localizations
  182. You may notice `"NameTextMapHash"` in [store/characters.json](/store/characters.json), `"nameTextHashMap"` and `"setNameTextHashMap"` at [flat](#flat) that could be used as a key to get basic localization data of characters, weapons and artifacts from [store/loc.json](/store/loc.json).
  183. Also you can get localization data of [AppendProp](#appendprop) by using property name as a key - `"FIGHT_PROP_HP"`, `"FIGHT_PROP_HEAL_ADD"` etc.
  184. For any additional info about names, descriptions and etc, check the [TextMap Data](https://github.com/Dimbreath/GenshinData/tree/master/TextMap), only includes languages supported by game.

[GitLink Mirror] API documentation for the Enka.Network API responses and structure.