scryfall_api 2.0.0 copy "scryfall_api: ^2.0.0" to clipboard
scryfall_api: ^2.0.0 copied to clipboard

A wrapper of the Scryfall API for the Dart programming language.

Pub Version GitHub Workflow Status Codecov

A wrapper of the Scryfall API for the Dart programming language.

Features #

Query all information about Magic: The Gathering which is provided by the Scryfall API:

Usage #

Initialize the ScryfallApiClient:

final apiClient = ScryfallApiClient();

Retrieve the Adventures in the Forgotten Realms set by its unique code (afr):

// [GET] https://api.scryfall.com/sets/afr
final afrSet = await apiClient.getSetByCode('afr');

afrSet.name // -> 'Adventures in the Forgotten Realms'

// Close API Client when it's not used anymore.
apiClient.close();

Retrieve the Black Lotus card by its id on Scryfall:

// [GET] https://api.scryfall.com/cards/bd8fa327-dd41-4737-8f19-2cf5eb1f7cdd
final blackLotus = await apiClient.getCardById('bd8fa327-dd41-4737-8f19-2cf5eb1f7cdd');

blackLotus.name       // -> 'Black Lotus'
blackLotus.oracleText // -> '{T}, Sacrifice Black Lotus: Add three mana of any one color.'

// Close API Client when it's not used anymore.
apiClient.close();

Retrieve all spell types from Scryfall:

// [GET] https://api.scryfall.com/catalog/spell-types
final spellTypes = await apiClient.getSpellTypes();

spellTypes.length // -> 4
spellTypes.data   // -> [Adventure, Arcane, Lesson, Trap]

Features and bugs #

If you encounter a bug or want to file a feature request, feel free to

Additional information #

The Scryfall API package is unofficial Fan Content permitted under the Fan Content Policy. Not approved/endorsed by Wizards. Portions of the materials used are property of Wizards of the Coast. © Wizards of the Coast LLC.

All the information, literal and graphical, obtained from the Scryfall API which is not © Wizards of the Coast LLC is © Scryfall LLC.

The remaining part of this package is subject to its associated license.

0
likes
140
pub points
39%
popularity

Publisher

verified publisheringruber.net

A wrapper of the Scryfall API for the Dart programming language.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http, json_annotation

More

Packages that depend on scryfall_api