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§
- Accessory
Api - Accessory endpoint for the API.
- Accessory
Details - A game, or expansion, with full details.
- Accessory
Query Params - All optional query parameters for making a request to the accessory endpoint.
- Accessory
Version - Information about a version of this accessory
- 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.
- Buddy
- A user that this user is buddies with.
- Buddy
List - A single page of buddies that the users has, also includes the total number of buddies the user has.
- 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.
- Forum
- A forum containing metadata, as well as a single page of threads in the forum.
- Forum
Api - The forum endpoint of the API.
- Forum
Details - The details for a particular forum. Threads in the forum can be fetched via the forum endpoint using the ID of the forum.
- Forum
Group - All forums specific to a certain game or game family.
- Forum
Group Api - Forum group endpoint of the API. Used for returning list of details for forums specific to a certain domain. For example, all the forums for a certain game, or game family.
- 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
Integration - A different edition or compilation 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
Brief - A guild a user belongs to, including only the name and ID.
- Guild
List - A single page of guilds the user belongs to, also includes the total number of guilds the user belongs to.
- 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.
- List
Item - An item in a user made top 10 or hot 10 list. A brief representation of an item which contains a name type and rank.
- Location
- A location of a guild. It is optional to set so some or all values may be empty strings.
- Marketplace
Listing - A sale listing, for people selling games or game accessories on the site.
- Member
- A member of a guild.
- Member
Page - A page of members in a particular guild, up to 25.
- Play
- A recorded instance of a game being played, the date it was played on and the players involved.
- Played
Item - The item, usually a game, that was played.
- Player
- Details for a player for a game session, as well as information involving that particular game play such as whether or not they won.
- Plays
- A play is a recorded instance of someone playing a game. This struct includes one page of a list of plays, along with the total number in the list.
- Plays
Api - Plays endpoint of the API. Used for returning information about recordings of instances of games being played. Plays can be queried either by user or by item ID, either way they are returned in reverse chronological order.
- Plays
Query Params - All optional query parameters for making a request to the plays endpoint.
- Poll
Summary - A brief summary of the poll, outlining the best and recommended options based on the votes.
- 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.
- Thread
- A thread in a forum, contains a subject and posts made to the thread.
- Thread
Api - Thread endpoint of the API. Used for returning information about a single thread by its ID.
- Thread
Details - Metadata for a thread, posts in the thread can be queried from the threads endpoint.
- Thread
Post - A post on a thread.
- Thread
Query Params - All optional query parameters for making a request to the thread endpoint.
- User
- A user’s information.
- UserApi
- User endpoint of the API. Used for returning information about a single user by their username.
- User
Brief - A user’s username and ID.
- User
Query Params - All optional query parameters for making a request to the user endpoint.
- 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 of
ItemType. - Error
- An error returned by the API.
- 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
Condition - The condition of a game for sale.
- Item
Domain - A domain of item that can either be an item (game, expansion, accessory), or a game family.
- Item
SubType - A subset of all item types on Boardgamegeek, that includes things that a play can be logged for. Typically a type of boardgame or an accessory.
- Item
Type - The type of the item. Either a board game, a board game expansion, or board game accessory.
- List
Item Type - A type of item in a user’s top 10, or hot 10 list on their profile. Note that when choosing items on the website
- 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.