**Main components:**
* Lua
**User story:**
As a Wikipedia editor
I want to get information about badges using Lua
in order to make some template magic happen.
**Problem:**
Getting information about badges using Lua is currently possible, but it seem to require to load the whole entity. This is problematic in some items as it can cause Lua errors (e.g. needs to much memory).
**Solution:**
Add a Lua convenience function "getBadges" (similar to "getSitelinks").
**Notes:**
**BDD:**
GIVEN
AND
WHEN
AND
THEN
AND
**Acceptance criteria:**
[] Information about badges can be conveniently and reliably accessed via Lua call.
**Open questions:**
**Community communication:**
Who we needs to keep in the loop and in what way:
Who this could be interesting for and in what way:
**Original:**
https://www.wikidata.org/wiki/Wikidata:Report_a_technical_problem#Add_a_lua_function_%22getBadges%22