bggGames {bggAnalytics} | R Documentation |
This class provides an interface for games, expansions,
accessories and other things listed on BoardGameGeek. The official
documentation describes 'things' as every physical, tangible item.See
bggAPI
for more details on inherited slots and methods.
Although this class is named ‘bggGames', it inherits it’s functionality from the BoardGameGeek XML API2 'Things' (see References). The name is motivated by the fact that the whole BoardGameGeek's site as well as this package is mainly focused on board games.
bggAnalytics::bggAPI
-> bggGames
new()
Object initialization.
bggGames$new(ids, chunk_size = 500, params = NULL)
ids
a numeric vector of positive integers, IDs of games/things to include in the object.
chunk_size
a positive integer, the maximum length of a chunk that
ids
are split into. All chunks connect to BoardGameGeek's API
separately, so lowering this number increases computation time. On the
other hand if a chunk is too long, URL might be too long to fetch.
params
a list of object parameters. If not all the parameters are
included in the list, default values are used (NULL
instead of
the list is possible for all the default parameters).
Following parameters are allowed for the bggGames
class with
default values in parentheses:
pretty_names
- (FALSE
) a boolean value,
should the object should use pretty names,
stats
- (TRUE
) a boolean value, should the
ranking and rating stats be included for every item. Note that some
variables require that stats
is TRUE
.
print()
Print object information.
bggGames$print()
clone()
The objects of this class are cloneable with this method.
bggGames$clone(deep = FALSE)
deep
Whether to make a deep clone.