lcosmin / boardgamegeek

A Python interface to boardgamegeek.com. Pulls information from BGG and creates Python objects for the data.
BSD 3-Clause "New" or "Revised" License
117 stars 72 forks source link

set game data id to BGG id instead of search id #62

Closed lukegothic closed 1 year ago

lukegothic commented 4 years ago

When performing a game_list (Thing) search using an id parameter, the requested id doesn't match the response id that comes from the BGG's XMLAPI2.

Way to reproduce: perform a game_list search using id = 1 as a parameter, the response item has an id of 2.

Found the id mismatch while coding a program to get the game expansions from a game after having got the whole data. The expansion ids didn't match the correct items.

Gagis commented 2 years ago

Without this fix any game_list that includes game_id's that return no data will give every subsequent game a false game_id, leading to severe problems when processing game versions or expansions. game_list involving a range from 1 to 100 will return only 85 games labeled from 1 to 85 instead of their true id's. I can confirm that lukegothic's patch fixes the problem for me. game_list was essentially useless without it.