boardgamegeek_client v0.1.0 BoardGameGeekClient View Source

Client for interacting with BoardGameGeek.

Link to this section Summary

Functions

Request a user’s collection of board games from BoardGameGeek. Returns a list of Game structs contains the BoardGameGeek ID, name, thumbnail, minimum players, and maximum players

Request information about a specific board game from BoardGameGeek. Returns a list of Game structs contains the BoardGameGeek ID, name, thumbnail, minimum players, and maximum players

Search BoardGameGeek for any board games containing the query string. Returns a list of maps containing the names (plus year) and BoardGameGeek ID

Link to this section Functions

Link to this function get_game_collection(username) View Source

Request a user’s collection of board games from BoardGameGeek. Returns a list of Game structs contains the BoardGameGeek ID, name, thumbnail, minimum players, and maximum players

Examples

iex> BoardGameGeekClient.get_game_collection("Serneum")
[%Game{bgg_id: 207830, name: "5-Minute Dungeon", image: "https://cf.geekdo-images.com/images/pic3213622_t.png", min_players: 2, max_players: 5},
 %Game{bgg_id: 141932, name: "The Agents", image: "https://cf.geekdo-images.com/images/pic1714861_t.png", min_players: 2, max_players: 5}]
Link to this function get_games_info(game_ids) View Source

Request information about a specific board game from BoardGameGeek. Returns a list of Game structs contains the BoardGameGeek ID, name, thumbnail, minimum players, and maximum players

Examples

iex> BoardGameGeekClient.get_games_info([207830, 141932])
[%Game{bgg_id: 207830, name: "5-Minute Dungeon", image: "https://cf.geekdo-images.com/images/pic3213622_t.png", min_players: 2, max_players: 5},
 %Game{bgg_id: 141932, name: "The Agents", image: "https://cf.geekdo-images.com/images/pic1714861_t.png", min_players: 2, max_players: 5}]

iex> BoardGameGeekClient.get_games_info([207830])
[%Game{bgg_id: 207830, name: "5-Minute Dungeon", image: "https://cf.geekdo-images.com/images/pic3213622_t.png", min_players: 2, max_players: 5}]

Search BoardGameGeek for any board games containing the query string. Returns a list of maps containing the names (plus year) and BoardGameGeek ID.

Examples

iex> BoardGameGeekClient.search_games("Scythe")
[%{id: 169786, name: "Scythe (2016)", image: "https://cf.geekdo-images.com/images/pic3163924_mt.jpg"},
  %{id: 199727, name: "Scythe: Invaders from Afar (2016)", image: "https://cf.geekdo-images.com/images/pic3037396_mt.jpg"}]

iex> BoardGameGeekClient.search_games("Sushi Go Party")
[%{id: 192291, name: "Sushi Go Party! (2016)", image: "https://cf.geekdo-images.com/images/pic3031286_mt.jpg"}]