genshindev / api

A fan-made Genshin Impact API for easy access to game data.
https://genshin.jmp.blue
Open Software License 3.0
703 stars 196 forks source link

[Bug][Refactor] unify keys drops/items #200

Open devagja opened 1 year ago

devagja commented 1 year ago

there are different keys for the same data type, It can be unified?

https://api.genshin.dev/domains/domain-of-guyun rewards -> details ->

[
 {...
  drops: [
   { name: 'Lucky Dog', rarity: '2/3', drop_min: 0, drop_max: 1 },
  ]
 },
 {...
  items: [
   { name: 'Lucky Dog', rarity: 3, drop_min: 0, drop_max: 1 },
  ]
 }
]
niktekusho commented 1 year ago

Another inconsistency could be found in the character API with how some properties are serialized to JSON (camel-case vs. snake-case). From: https://api.genshin.dev/characters/yelan

image

Didn't check other APIs yet. I would love to open a PR to fix this, though. :wink: