knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
knitr::include_graphics("man/figures/dimitar-marinski-dimitar-marinski-unclaimed-territory.jpg")
Minimalistic client to access the Magic: The Gathering API.
You can install from GitHub with:
# install.packages("devtools") devtools::install_github("tyluRp/mtg")
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.