#magic #api-bindings #mtg #api-wrapper #api

bin+lib scryfall

A wrapper around the scryfall magic the gathering api

38 releases

0.16.2 Apr 22, 2024
0.16.1 Feb 1, 2024
0.16.0 Jan 31, 2024
0.14.2 Dec 5, 2023
0.4.0 Jul 26, 2019

#256 in Game dev

Download history 21/week @ 2024-01-29 8/week @ 2024-02-19 91/week @ 2024-02-26 3/week @ 2024-03-04 233/week @ 2024-03-11 90/week @ 2024-04-01 1/week @ 2024-04-15 194/week @ 2024-04-22

285 downloads per month
Used in daily_scry

MIT license

220KB
3.5K SLoC

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")

Dependencies

~6–21MB
~292K SLoC