genshindev / api

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

Add reactions to elements info #71

Closed Exhabition closed 3 years ago

Exhabition commented 3 years ago

Adds reactions to the elements/:element_name endpoint.

reactions is an array containing objects. Each object is an reaction. An reaction contains name, elements and description keys. The following keys are:

(If an reaction had multiple descriptions, an newline (\n) is added in between each description)

I tested these changes locally and everything seems to work and returned the new information correctly. However I was not sure whether I should have used keys for the elements field instead of their current names. Maybe a maintainer can look at that 😉 (Each element has both a name and a key)

Source of descriptions: image image image