Skip to main content

Crate arnak

Crate arnak 

Source
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§

AccessoryApi
Accessory endpoint for the API.
AccessoryDetails
A game, or expansion, with full details.
AccessoryQueryParams
All optional query parameters for making a request to the accessory endpoint.
AccessoryVersion
Information about a version of this accessory
BaseCollectionQuery
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 CollectionItem and CollectionItemBrief.
BoardGameGeekApi
API for making requests to the Board Game Geek API.
Buddy
A user that this user is buddies with.
BuddyList
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.
CollectionApi
Collection endpoint of the API. Used for returning user’s collections of games by their username. Filtering by crate::CollectionItemStatus, rating, recorded plays.
CollectionItem
A game, game expansion, or game accessory in a collection.
CollectionItemBrief
An item in a collection, in brief form. With the name, status, type, and IDs, also a brief version of the game stats.
CollectionItemRating
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.
CollectionItemRatingBrief
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.
CollectionItemStats
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.
CollectionItemStatsBrief
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.
CollectionItemStatus
The status of the item in the user’s collection, such as preowned or wishlist. Can be any or none of them.
CollectionQueryParams
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.
ForumApi
The forum endpoint of the API.
ForumDetails
The details for a particular forum. Threads in the forum can be fetched via the forum endpoint using the ID of the forum.
ForumGroup
All forums specific to a certain game or game family.
ForumGroupApi
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.
GameAccessory
A game accessory with minimal information, only the name and ID.
GameApi
Game endpoint for the API.
GameArtist
An artist for a game.
GameCategory
A game accessory with minimal information, only the name and ID.
GameCompilation
A different edition or compilation of a game.
GameDesigner
A designer of a game.
GameDetails
A game, or expansion, with full details.
GameFamily
A family of games in a particular series or group. Contains the description for the family as well as the list of games.
GameFamilyApi
Game family endpoint of the API. Used for searching for game families by ID.
GameFamilyName
A name and ID of a game family.
GameImplementation
A re-implementation of a game.
GameIntegration
A different edition or compilation of a game.
GameMechanic
A game accessory with minimal information, only the name and ID.
GamePublisher
A publisher of a game.
GameQueryParams
All optional query parameters for making a request to the game endpoint.
GameStats
Various statistics for the game, including the number of users who own the game as well as the ratings.
GameVersion
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.
GuildApi
Endpoint for getting guilds by their ID.
GuildBrief
A guild a user belongs to, including only the name and ID.
GuildList
A single page of guilds the user belongs to, also includes the total number of guilds the user belongs to.
GuildQueryParams
Optional query parameters that can be made when retrieving guilds.
HotListApi
Hot list endpoint of the API. Used for returning the current trending board games.
HotListGame
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.
ItemFamilyRank
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.
LanguageDependence
A suggested minimum player age, along with how many users voted for this age.
LanguageDependencePoll
A user answered poll for how playable the game would be, should the player not speak the language.
ListItem
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.
MarketplaceListing
A sale listing, for people selling games or game accessories on the site.
Member
A member of a guild.
MemberPage
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.
PlayedItem
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.
PlaysApi
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.
PlaysQueryParams
All optional query parameters for making a request to the plays endpoint.
PollSummary
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.
RatingComment
A comment left on a game by a user. Can include a rating or a text comment or both.
RatingCommentPage
A page of comments left on a game by a user. Can include a rating or a text comment or both.
SearchApi
Search endpoint of the API. Used for searching for games and other items by name.
SearchResult
A result when searching for a name. Includes the game’s name, type, and year published.
SuggestedPlayerAge
A suggested minimum player age, along with how many users voted for this age.
SuggestedPlayerAgePoll
A user answered poll for the minimum player age this game is best suited for.
SuggestedPlayerCount
A suggested player count, along with community votes as to whether it is recommended or not.
SuggestedPlayerCountPoll
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.
ThreadApi
Thread endpoint of the API. Used for returning information about a single thread by its ID.
ThreadDetails
Metadata for a thread, posts in the thread can be queried from the threads endpoint.
ThreadPost
A post on a thread.
ThreadQueryParams
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.
UserBrief
A user’s username and ID.
UserQueryParams
All optional query parameters for making a request to the user endpoint.
Video
A video relating to a game.

Enums§

CollectionItemType
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.
GameType
The type of a game.
GuildMemberSortBy
Which field to sort the list of members by, either username or date joined.
ItemCondition
The condition of a game for sale.
ItemDomain
A domain of item that can either be an item (game, expansion, accessory), or a game family.
ItemSubType
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.
ItemType
The type of the item. Either a board game, a board game expansion, or board game accessory.
ListItemType
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
NameType
The type of game, board game or expansion.
PlayerAge
A minimum suitable age for playing a game.
PlayerCount
A number of players for the purpose of voting on what the best player count for a game may be.
RankValue
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.
RatingValue
A Bayesian average rating of a boardgame in its family. Either valued as a f64, or NotRanked.
VideoCategory
Type of video for a video related to a particular game.
WishlistPriority
The status of the item in the user’s collection, such as preowned or wishlist. Can be any or none of them.

Traits§

CollectionType
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::Result alias where the Err case is Error.