I'm developing a simple application that fetches some data from wowarmory.com. What I need to do is fetch reputations for a character. I know where's the api located:
I can fetch the XML and load it into the SimpleXML object but I'm having trouble figuring out how to get the current and maximum reputation for each faction from the XML. Here's an example of XML:
<faction id="69" key="darnassus" name="Darnassus" reputation="35023"/> <faction id="930" key="exodar" name="Exodar" reputation="26805"/> <faction id="54" key="gnomereganexiles" name="Gnomeregan Exiles" reputation="23433"/> <faction id="47" key="ironforge" name="Ironforge" reputation="29410"/>
There's only the attribute 'reputation' there for each faction. How do I calculate the maximum and current reputation from it though? Seems like there are missing attributes.
Can somebody point me to the right direction?
I think I can answer this since I'm a WoW player myself.
Wow's rep system is just a point values in the inclusive range of -42,000 to 42,000.
This range is divided up into levels which have tangible meaning to the game.
That means someone with 35,023 rep for a faction is at Revered - specifically 14,024/21,000.
There may be a method in their API that does this conversion for you, but without that, this should give you the data you need.