knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

mtg

Travis build status AppVeyor build status Codecov test coverage

knitr::include_graphics("man/figures/dimitar-marinski-dimitar-marinski-unclaimed-territory.jpg")

Minimalistic client to access the Magic: The Gathering API.

Installation

You can install from GitHub with:

# install.packages("devtools")
devtools::install_github("tyluRp/mtg")

Examples

Use mtg to access all available endpoints:

library(mtg)

mtg("formats")

str(mtg("cards"), max.level = 2)

Additionally, we can print the response as JSON thanks to the jsonlite package:

mtg("formats", json = TRUE)

Response information can be suppressed with quiet = TRUE:

mtg("formats", quiet = TRUE)

Acknowledgements



tyluRp/mtg documentation built on May 5, 2019, 11:08 p.m.