scryfall

Crates.ioscryfall
lib.rsscryfall
version0.16.3
sourcesrc
created_at2019-04-15 21:09:02.649076
updated_at2024-07-14 22:19:04.496018
descriptionA wrapper around the scryfall magic the gathering api
homepage
repositoryhttps://github.com/mendess/scryfall-rs
max_upload_size
id128210
size265,694
Mendes (mendess)

documentation

README

scryfall-rs

A wrapper around the scryfall magic the gathering API

Crates.io Documentation License Rust

It wraps the scryfall API as close to it as possible and I try to keep it up to date

Cards

The main way to fetch cards from this API is the Card struct.

This allows you to get cards from scryfall using all of their available REST Apis

use scryfall::card::Card;
match Card::named_fuzzy("Light Bolt") {
    Ok(card) => assert_eq!(card.name, "Lightning Bolt"),
    Err(e) => panic!(format!("{:?}", e))
}

Sets

You can also fetch information about a card set.

The available routes for this can be seen on Set

use scryfall::set::Set;
assert_eq!(Set::code("mmq").unwrap().name, "Mercadian Masques")
Commit count: 121

cargo fmt