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

outdated

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

example/main.dart

import 'package:scryfall_api/scryfall_api.dart';

/// Example usage of the Scryfall API wrapper.
void main() async {
  // Instantiate the Scyfall API Client.
  final apiClient = ScryfallApiClient();

  // Retrieve the [Adventures in the Forgotten Realms](https://scryfall.com/sets/afr)
  //set by its unique code (`afr`).
  final afrSet = await apiClient.getSetByCode('afr');

  // Print information about the set.
  print(afrSet.name);
  print(afrSet.iconSvgUri);
  print(afrSet.printedSize);

  // Retrieve the 'Black Lotus' card by its name.
  final blackLotus = await apiClient.getCardByName('black lotus');

  // Print information about the card.
  print(blackLotus.name);
  print(blackLotus.manaCost);
  print(blackLotus.oracleText);
}
3
likes
0
points
53
downloads

Publisher

verified publisheringruber.net

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, json_annotation

More

Packages that depend on scryfall_api