Expand description
§arnak
A Rust library for the Board Game Geek XML API.
§Example:
use arnak::BoardGameGeekApi;
// Enter tokio async runtime.
let rt = tokio::runtime::Runtime::new().unwrap();
rt.block_on(async {
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}"),
}
})Structs§
- Base
Collection Query - Required query parameters. Any type the collection query can implement
must be able to return a base query, so valid queries can be constructed
for both
CollectionItemandCollectionItemBrief. - Board
Game Geek Api - API for making requests to the Board Game Geek API.
- Collection
- A user’s collection on boardgamegeek.
- Collection
Api - Collection endpoint of the API. Used for returning user’s collections
of games by their username. Filtering by
crate::CollectionItemStatus, rating, recorded plays. - Collection
Item - A game, game expansion, or game accessory in a collection.
- Collection
Item Brief - An item in a collection, in brief form. With the name, status, type, and IDs, also a brief version of the game stats.
- Collection
Item Rating - The 0-10 rating that the user gave to this item. Also includes the total number of users that have rated it, as well as the averages, and standard deviation.
- Collection
Item Rating Brief - The 0-10 rating that the user gave to this item. Also includes the total number of users that have rated it, as well as the averages.
- Collection
Item Stats - Stats of the game such as the player count and duration. Can be omitted from the response. More stats can be found from the specific game endpoint.
- Collection
Item Stats Brief - Stats of the game such as player count and duration. Can be omitted from the response. More stats can be found from the specific game endpoint.
- Collection
Item Status - The status of the item in the user’s collection, such as preowned or wishlist. Can be any or none of them.
- Collection
Query Params - All optional query parameters for making a request to the collection endpoint.
- Dimensions
- The dimensions of a game, in inches.
- Game
- A game with minimal information, only the name and ID.
- Game
Accessory - A game accessory with minimal information, only the name and ID.
- GameApi
- Game endpoint for the API.
- Game
Artist - An artist for a game.
- Game
Category - A game accessory with minimal information, only the name and ID.
- Game
Compilation - A different edition or compilation of a game.
- Game
Designer - A designer of a game.
- Game
Details - A game, or expansion, with full details.
- Game
Family - A family of games in a particular series or group. Contains the description for the family as well as the list of games.
- Game
Family Api - Game family endpoint of the API. Used for searching for game families by ID.
- Game
Family Name - A name and ID of a game family.
- Game
Implementation - A re-implementation of a game.
- Game
Mechanic - A game accessory with minimal information, only the name and ID.
- Game
Publisher - A publisher of a game.
- Game
Query Params - All optional query parameters for making a request to the game endpoint.
- Game
Stats - Various statistics for the game, including the number of users who own the game as well as the ratings.
- Game
Version - Information about a game which is a version or re-implementation of another game, including the link to the original.
- Guild
- A struct with information for a guild, returned by the guild endpoint of the API. If requested it can also return the guild members, but only up to 25 at a time.
- Guild
Api - Endpoint for getting guilds by their ID.
- Guild
Query Params - Optional query parameters that can be made when retrieving guilds.
- HotList
Api - Hot list endpoint of the API. Used for returning the current trending board games.
- HotList
Game - An game on the hot list, has the rank from 1 to 50 on the list, as well as some basic information about the game like the name and year published.
- Item
Family Rank - A struct containing the game’s rank within a particular type of game.
- Language
- A language, listed on versions of games that may support one or more languages.
- Language
Dependence - A suggested minimum player age, along with how many users voted for this age.
- Language
Dependence Poll - A user answered poll for how playable the game would be, should the player not speak the language.
- Location
- A location of a guild. It is optional to set so some or all values may be empty strings.
- Marketplace
Listing - A game sale listing, for people selling games on the site.
- Member
- A member of a guild.
- Member
Page - A page of members in a particular guild, up to 25.
- Price
- The price of a game in a marketplace listing.
- Rating
Comment - A comment left on a game by a user. Can include a rating or a text comment or both.
- Rating
Comment Page - A page of comments left on a game by a user. Can include a rating or a text comment or both.
- Search
Api - Search endpoint of the API. Used for searching for games and other items by name.
- Search
Result - A result when searching for a name. Includes the game’s name, type, and year published.
- Suggested
Player Age - A suggested minimum player age, along with how many users voted for this age.
- Suggested
Player AgePoll - A user answered poll for the minimum player age this game is best suited for.
- Suggested
Player Count - A suggested player count, along with community votes as to whether it is recommended or not.
- Suggested
Player Count Poll - A user answered poll for how many players this game is best suited for.
- User
- A user’s username and ID.
- Video
- A video relating to a game.
Enums§
- Collection
Item Type - The type of an item that can be returned from the collections endpoint.
Either a board game, a board game expansion, or board game accessory, a subset ot
ItemType. - Error
- An error returned by the API.
- Game
Condition - The condition of a game for sale.
- Game
Type - The type of a game.
- Guild
Member Sort By - Which field to sort the list of members by, either username or date joined.
- Item
Type - The type of the item. Either a board game, a board game expansion, or board game accessory.
- Name
Type - The type of game, board game or expansion.
- Player
Age - A minimum suitable age for playing a game.
- Player
Count - A number of players for the purpose of voting on what the best player count for a game may be.
- Rank
Value - A rank a particular board game has on the site, within a subtype. Can be
either Ranked with a u64 for the rank, Or
NotRanked. - Rating
Value - A Bayesian average rating of a boardgame in its family.
Either valued as a f64, or
NotRanked. - Video
Category - Type of video for a video related to a particular game.
- Wishlist
Priority - The status of the item in the user’s collection, such as preowned or wishlist. Can be any or none of them.
Traits§
- Collection
Type - Trait for a type that the collection endpoint can return. Allows us to get values for the mandatory query params for the different types.
Type Aliases§
- Result
- A
std::result::Resultalias where theErrcase isError.