Added comments
This commit is contained in:
parent
655b1b5cf0
commit
d0fb364808
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue