This one looks interesting but might be for a specific use
https://wowpedia.fandom.com/wiki/API...ValidForPlayer
And this one sounds useful and might be what you need
https://wowpedia.fandom.com/wiki/API...cToPlayerClass
This function is used on Weekly Rewards by Blizzard
https://github.com/Gethe/wow-ui-sour...wards.lua#L347
Might be easier than building a database of data up .. but if you have already done that keep this for your next code overhaul