wowarmory.com API help
Asked Answered
C

2

6

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:

http://www.wowarmory.com/character-reputation.xml?r=Realm&cn=CharacterName

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?

Crispas answered 16/7, 2009 at 18:7 Comment(1)
You would need to consult their API documentation, or contact them to find out how you should calculate that information. They may be able to add those attributes that you require, just have to ask.Sharkskin
P
17

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.

Rep Name    Range            Range Value
----------------------------------------
Hated      -42,000 - -6,001       36,000
Hostile     -6,000 - -3,001        3,000
Unfriendly  -3,000 -     -1        3,000
Neutral          0 -  2,999        3,000
Friendly     3,000 -  8,999        6,000
Honored      9,000 - 20,999       12,000
Revered     21,000 - 41,999       21,000
Exalted     42,000+                    ~

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.

Pines answered 16/7, 2009 at 18:22 Comment(0)
S
1

A value of 42999 indicates maximum exalted reputation with that faction. A value of -42000 indicates maximum hated reputation with that faction.

<faction id="730" key="stormpikeguard" name="Stormpike Guard" reputation="42999"/>
<faction id="21" key="bootybay" name="Booty Bay" reputation="-42000"/>

They use the total amount of reputation with that faction and divide it down into different levels in the display code. Refer to the reputation levels chart at http://www.wowwiki.com/Reputation for details on where each reputation level begins.

Seminole answered 16/7, 2009 at 18:21 Comment(2)
I'm not sure I understand the chart, the exalted is 999? That's much less than revered.Crispas
Sorry, I could have been much clearer. Peter Bailey's chart is what you will want. The WoWWiki chart shows the total value of each tier of reputation. If you start a zero and add or subtract those values you will end up with the proper values for each rep. level.Seminole

© 2022 - 2024 — McMap. All rights reserved.