View source: R/highlevel_functions.R
| get_code_from_decklist | R Documentation | 
Deck lists are stored and shared in an RFC 4648 base-32 code. This top-level functions take the cards and their count , and encode them according to the rules (laid out here)
get_code_from_decklist(decklist) get_code_from_decklist_df(decklist_df)
decklist | 
 character vector of decklist with format '{count}:{cardcode}'  | 
decklist_df | 
 dataframe with character column cardcode and numeric column count  | 
character deck code in base 32 (RFC 4648)
#minimalist example (obviously incomplete deck)
min_deck <- data.frame(
  "cardcode" = c("01PZ008", "01PZ040"),
  "count" = c(3, 3)
)
get_code_from_decklist(c("3:01PZ008", "3:01PZ040"))
# returns "CEAQEAIEBAUAAAA"#'
get_code_from_decklist_df(min_deck)
# returns "CEAQEAIEBAUAAAA"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.