Skip to content

More information about games via BGG API

Robin Stoll requested to merge bgg_api into master

This addresses #2 (closed) by using the BoardGameGeek API.

More precisely the main thing it does is add the possibility to add a BGG identifier to a game. For any game for which this has been done, a tooltip with information fetched from BGG is available on the "Modify Player" and "Modify Games" pages. These tooltips are realized as <iframe>s which are only loaded on demand (this is probably not the modern way to do it, but allows stuff to be done server-side with minimal JavaScript).

Various supporting features are included:

  • The BGG id can be added automatically to all games which can be uniquely identified.
  • When creating a new game, search results from BGG are shown while typing the name (also via an <iframe>); they can be selected to auto-fill the name and id.
  • When a BGG id is provided for a game, its player range and the recommended player range are automatically extracted from BGG.

The backend in BB4GG.BGG.Request includes caching for fetched information as well as a global control for rate of requests sent to the API.

Lastly I changed our internal things (like static files) to be served under paths that start with an underscore, to prevent clashes with instances (before it would have been possible to have an instance named "static", which would have lead to some bugs).

Edited by Robin Stoll

Merge request reports