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 9.4 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
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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](https://github.com/EnkaNetwork/API-docs/blob/master/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](https://github.com/EnkaNetwork/API-docs/blob/master/store/characters.json) |
  37. ### avatarInfoList
  38. For basic data of characters by ID, go to [store/characters.json](https://github.com/EnkaNetwork/API-docs/blob/master/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. | appendPropIdList | List of IDs of the artifact substats <br /> [AppendProp Data](https://github.com/Dimbreath/GenshinData/blob/master/ExcelBinOutput/ReliquaryAffixExcelConfigData.json) |
  78. #### flat
  79. | Name | Description |
  80. | :--- | :---------- |
  81. | nameTextHashMap | Hash for Equipment Name <br /> Check [Localizations](#localizations) |
  82. | setNameTextHashMap `[Artifact Only]`| Hash for Artifact Set Name <br /> Check [Localizations](#localizations)|
  83. | rankLevel | Rarity Level of Equipment |
  84. | [reliquaryMainstat](#reliquarymainstat-reliquarysubstats-weaponstats) `[Artifact Only]` | Artifact Main Stat |
  85. | [reliquarySubstats](#reliquarymainstat-reliquarysubstats-weaponstats) `[Artifact Only]` | List of Artifact Substats |
  86. | [weaponStats](#reliquarymainstat-reliquarysubstats-weaponstats) `[Weapon Only]`| List of Weapon Stat: Base ATK, Substat |
  87. | [itemType](#itemtype) | Equipment Type: Weapon or Artifact |
  88. | icon | Equipment Icon Name <br /> [Icon name usage](#icons-and-images)|
  89. | [equipType](#equiptype) `[Artifact Only]` | Artifact Type |
  90. #### reliquaryMainstat, reliquarySubstats, weaponStats
  91. | Name | Description |
  92. | :--- | :---------- |
  93. | mainPropId / appendPropID | Equipment Append Property Name. Check the [Definitions for Names](#appendprop)|
  94. | propValue | Property Value |
  95. ## Definitions
  96. ### Prop
  97. | Type | Description |
  98. | :--: | :---------- |
  99. | 1001 | XP |
  100. | 1002 | Ascension |
  101. | 4001 | Level |
  102. ### FightProp
  103. | Type | Description |
  104. | :--: | :---------- |
  105. | 1 | Base HP |
  106. | 4 | Base ATK |
  107. | 7 | Base DEF |
  108. | 20 | CRIT Rate |
  109. | 22 | CRIT DMG |
  110. | 23 | Energy Recharge |
  111. | 26 | Healing Bonus |
  112. | 27 | Incoming Healing Bonus |
  113. | 28 | Elemental Mastery |
  114. | 29 | Physical RES |
  115. | 30 | Physical DMG Bonus |
  116. | 40 | Pyro DMG Bonus |
  117. | 41 | Electro DMG Bonus |
  118. | 42 | Hydro DMG Bonus |
  119. | 44 | Anemo DMG Bonus |
  120. | 45 | Geo DMG Bonus |
  121. | 46 | Cryo DMG Bonus |
  122. | 50 | Pyro RES |
  123. | 51 | Electro RES |
  124. | 52 | Hydro RES |
  125. | 53 | Dendro RES |
  126. | 54 | Anemo RES |
  127. | 55 | Geo RES |
  128. | 56 | Cryo RES |
  129. | 70 | Pyro Enegry Cost |
  130. | 71 | Electro Energy Cost |
  131. | 72 | Hydro Energy Cost |
  132. | 73 | Dendro Energy Cost |
  133. | 74 | Anemo Energy Cost |
  134. | 75 | Cryo Energy Cost |
  135. | 76 | Geo Energy Cost |
  136. | 2000 | Max HP |
  137. | 2001 | ATK |
  138. | 2002 | DEF |
  139. ### ItemType
  140. | Name | Description |
  141. | :--- | :---------- |
  142. | ITEM_WEAPON | Weapon |
  143. | ITEM_RELIQUARY | Artifact |
  144. ### EquipType
  145. | Name | Description |
  146. | :--- | :---------- |
  147. | EQUIP_BRACER | Flower |
  148. | EQUIP_NECKLACE | Feather |
  149. | EQUIP_SHOES | Sands |
  150. | EQUIP_RING | Goblet |
  151. | EQUIP_DRESS | Circlet |
  152. ### AppendProp
  153. | Name | Description |
  154. | :--- | :---------- |
  155. | FIGHT_PROP_BASE_ATTACK `[Weapon]` | Base ATK |
  156. | FIGHT_PROP_HP | Flat HP |
  157. | FIGHT_PROP_ATTACK | Flat ATK |
  158. | FIGHT_PROP_DEFENSE | Flat DEF |
  159. | FIGHT_PROP_HP_PERCENT | HP% |
  160. | FIGHT_PROP_ATTACK_PERCENT | ATK% |
  161. | FIGHT_PROP_DEFENSE_PERCENT | DEF% |
  162. | FIGHT_PROP_CRITICAL | Crit RATE |
  163. | FIGHT_PROP_CRITICAL_HURT | Crit DMG |
  164. | FIGHT_PROP_CHARGE_EFFICIENCY | Energy Recharge |
  165. | FIGHT_PROP_HEAL_ADD | Healing Bonus |
  166. | FIGHT_PROP_ELEMENT_MASTERY | Elemental Mastery |
  167. | FIGHT_PROP_PHYSICAL_ADD_HURT | Physical DMG Bonus |
  168. | FIGHT_PROP_FIRE_ADD_HURT | Pyro DMG Bonus |
  169. | FIGHT_PROP_ELEC_ADD_HURT | Electro DMG Bonus |
  170. | FIGHT_PROP_WATER_ADD_HURT | Hydro DMG Bonus |
  171. | FIGHT_PROP_WIND_ADD_HURT | Anemo DMG Bonus |
  172. | FIGHT_PROP_ICE_ADD_HURT | Cryo DMG Bonus |
  173. | FIGHT_PROP_ROCK_ADD_HURT | Geo DMG Bonus |
  174. ## Icons and Images
  175. You can get icons of characters, weapons and artifacts via Enka, by URL `https://enka.network/ui/[icon_name].png`.
  176. Usually icon name starts with `"UI_"` or `"Skill_"` for [characters talents](#characters-talents-and-consts).
  177. For example https://enka.network/ui/UI_AvatarIcon_Side_Ambor.png.
  178. ### Weapons and Artifacts
  179. Go to [flat](#flat) and look for `icon`.
  180. ### Characters, Talents and Consts
  181. Go to [store/characters.json](https://github.com/EnkaNetwork/API-docs/blob/master/store/characters.json) and look for anything related to "UI_XXXXXX" or "Skill_XXXXXX" by character ID.
  182. ## Localizations
  183. You may notice `"NameTextMapHash"` in [store/characters.json](https://github.com/EnkaNetwork/API-docs/blob/master/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](https://github.com/EnkaNetwork/API-docs/blob/master/store/loc.json).
  184. Also you can get localization data of [AppendProp](#appendprop) by using property name as a key - `"FIGHT_PROP_HP"`, `"FIGHT_PROP_HEAL_ADD"` etc.
  185. 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.