arnak

Crates.ioarnak
lib.rsarnak
version0.6.0
created_at2024-08-18 22:00:42.454174+00
updated_at2025-10-28 21:41:23.16196+00
descriptionA Rust library for the BoardGameGeek XML API.
homepage
repositoryhttps://github.com/MatthewThompson/arnak
max_upload_size
id1343063
size589,126
Matthew Thompson (MatthewThompson)

documentation

https://docs.rs/arnak

README

Build crates.io Docs License: MIT Unsafe

NOTE: This library is currently in prerelease, not all endpoints have been added and breaking changes could happen often before 1.0.0.

Arnak

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.

Example

This example uses Tokio, so it would also be needed as a dependency:

[dependencies]
arnak = { version = "0.6.0" }
tokio = { version = "1" }
use arnak::BoardGameGeekApi;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let api = BoardGameGeekApi::new("my_auth_token").expect("something went wrong");
    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(())
}

Endpoints

Collection

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...

Game Family

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

Search for a game, returning everything that matches the search. Also includes a search_exact function that will only return exact name matches.

Hot list

Returns the top 10 currently trending games.

Known issues

  • 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 &#195;&#188; but this decodes to ü. Sorry Hans im Gluück!

Formatting

Some rustfmt options used are nightly only. So to format run cargo +nightly fmt

Commit count: 208

cargo fmt