NOTE: This library is currently in prerelease, not all endpoints have been added and breaking changes could happen often before 1.0.0.
Rust library for BoardGameGeek XML API bindings.
It should be noted that the underlying API can return information from RpgGeek and VideoGameGeek but these are purposely hidden for consistency, and to avoid confusion. For example, the collection endpoint only returns board games in the user's collection, and not RPG or video games that the same user has on the respective site collections.
This example uses Tokio, so it would also be needed as a dependency:
[dependencies]
arnak = { version = "0.5.0" }
tokio = { version = "1" }
use arnak::BoardGameGeekApi;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api = BoardGameGeekApi::new();
let collection = api.collection().get_owned("bluebearbgg").await;
match collection {
Ok(collection) => println!("bluebearbgg owns {} games.", collection.items.len()),
Err(e) => println!("Error: {e}"),
}
Ok(())
}
For a given user, return their collection of board games. This does not just mean games owned by the user, but also ones on their wishlist, previously owned, etc...
Request a family or number of families by their IDs. A game family is a group of games and expansions that fall under a certain group or name. For example Catan and Carcassone both have game families containing all of their respective expansions and related games.
Search for a game, returning everything that matches the search. Also includes a search_exact
function that will only return exact name matches.
Returns the top 10 currently trending games.
- In the fields that return HTML, such as descriptions, HTML escape sequences are used. However UTF-8 code points are used, which means for example for ü has been encoded as
ü
but this decodes to ü. Sorry Hans im Gluück!
Some rustfmt options used are nightly only. So to format run cargo +nightly fmt