diff --git a/bgg_connection.py b/bgg_connection.py index 2ef407a..0ca126f 100644 --- a/bgg_connection.py +++ b/bgg_connection.py @@ -114,6 +114,7 @@ def convert_collection_xml_to_boardgame(boardgame_extra_info: BoardGame, collect return boardgame +#Creates list of board games from a collection '/collection' URL def get_boardgames_from_collection_url(collection_url: str) -> list[BoardGame]: collection_xml = url_to_xml_object(collection_url) @@ -121,9 +122,11 @@ def get_boardgames_from_collection_url(collection_url: str) -> list[BoardGame]: collection_id_list: list[int] = [] + #Get all board game ID's from the collection for boardgame_item in collection_xml: collection_id_list.append(boardgame_item.get('objectid')) + #Request extra info about the ID's boardgame_extras = get_multiple_boardgames(collection_id_list) assert len(boardgame_extras) == len(collection_xml)