get_games: Get Game Data

Description Usage Arguments Value Examples

View source: R/get-games.R

Description

Request game data.

Usage

1
2
3
4
5
6
7
get_games(
  id,
  add = c("stats", "versions", "marketplace", "videos", "comments", "ratingcomments"),
  page_start = 1,
  page_n = 1,
  delay_s = 0.5
)

Arguments

id

A vector of game id numbers.

add

One or multiple of "stats", "versions", "marketplace", "videos", "comments", "ratingcomments".

Note. The API will not return both comments and ratingcomments in the same call. If you request both, you will only get comments.

page_start

Page number from which to start paging. Defaults to 1.

page_n

How many pages to fetch.

delay_s

How many seconds to wait between requests. Defaults to 0.5.

Value

A tibble. To extract the raw HTTP response, call attr(x, "res").

Examples

1
2
3
4
# You don't really need to name the vector, but it makes things clearer.
ids = c(gloomhaven = 174430, agricola = 31260, junkart = 193042)
res = get_games(ids, add = "stats")
res

jchrom/geeks documentation built on Oct. 24, 2020, 9:01 a.m.