Open thamara opened 3 years ago
The API from BGG gives:
Exaple: https://www.boardgamegeek.com/xmlapi2/thing?stats=1&id=182028
<poll name="suggested_numplayers" title="User Suggested Number of Players" totalvotes="584">
<results numplayers="1">
<result value="Best" numvotes="6"/>
<result value="Recommended" numvotes="11"/>
<result value="Not Recommended" numvotes="338"/>
</results>
<results numplayers="2">
<result value="Best" numvotes="153"/>
<result value="Recommended" numvotes="337"/>
<result value="Not Recommended" numvotes="37"/>
</results>
<results numplayers="3">
<result value="Best" numvotes="380"/>
<result value="Recommended" numvotes="138"/>
<result value="Not Recommended" numvotes="12"/>
</results>
<results numplayers="4">
<result value="Best" numvotes="90"/>
<result value="Recommended" numvotes="252"/>
<result value="Not Recommended" numvotes="153"/>
</results>
<results numplayers="4+">
<result value="Best" numvotes="0"/>
<result value="Recommended" numvotes="1"/>
<result value="Not Recommended" numvotes="311"/>
</results>
</poll>
We want to get what are the option of numplayer
that have the highest votes on best. In this example, it would be numplayer=3.
The idea is to enhance the code in parseGamedataApiXml
to be able to parse the numplayers data, stores it, and then show on the page.
From BGG's thread: