knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

library(giantbomb)

Travis-CI Build Status

The giantbomb package provides access to the GiantBomb API which gives information on video games, reviews, companies, and other related content.

Install

Install the package using devtools.

devtools::install_github("detroyejr/giantbomb")

At the time this package was created, these endpoints are covered:

API Key

Before you can begin to use the giantbomb package, you will need to sign up to receive an api key. Once you login, your key will appead on the main api page.

Once you have your key, you can either pass it as a string to the api_key function parameters or set the GB_KEY environoment variable.

Sys.setenv("GB_KEY" = 'YOUR_API_KEY`)

The function gb_key() will look in the system environment for a variable with that name.

Examples

Basic Usage

# Get list of games.
gb_games(n = 10, field_list = c("date_added", "name"))

# Get list of companies.
gb_companies(n = 10, field_list = c("date_added", "name"))

Filters and Sorting

# Filter by name and sort by date_added.
gb_games(
  n = 10,
  filter = "name:bioshock",
  sort = "date_added:desc",
  field_list = c("name", "date_added")
  )

# Filter companies by name and sort by date_added.
gb_companies(
  n = 10,
  filter = "name:2k",
  sort = "date_added:asc",
  field_list = c("name", "date_added")
  )

For more examples, look in the function documentation.

Contributing

If you find any bugs, you can file an issue or create a pull request.



detroyejr/giantbomb documentation built on May 29, 2019, 7:13 a.m.