Closed HughP closed 8 years ago
When you fetch game data for 'Carcassonne', the BGG API returns very little data about the expansions, something like this:
<link type="boardgameexpansion" id="130998" value="Carcassonne: Little Buildings"/>
<link type="boardgameexpansion" id="118618" value="Carcassonne: Mage & Witch"/>
<link type="boardgameexpansion" id="38431" value="Carcassonne: The Cult"/>
The library maps each expansion to a Thing()
object (something that only has a name and an id) and makes them available as g.expansions
(a list of Thing()
s). Elements of this list don't have .alternative_names
(the data isn't provided).
If you really need the alternative names, you'll have to do a bgg.game(game_id=GAME_ID)
for each of them.
PS: play around with dir()
on the objects returned by the library to see what's available in each of them.
I have the following code which I am running in terminal on OS X. boardgamegeek-0.13.2 Python 2.7.9 (default, Jan 29 2015, 06:28:58) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Which works as expected.
however when I try the following I get an error.
I am both new to python and to the bgg module. Any suggestions on what my problem might be?
Is this at all because there is many to one relationship? I mean some things have more than one alternative name...