Skip to content
 
 

Repository files navigation

C# Scryfall API Client

This package is auto-geneated from the Scryfall API definition.

Getting Started (.NET Core)

  1. Create a folder for your project
mkdir MyProject
cd MyProject
git init
  1. Create the project, and add dependencies
dotnet new console
dotnet add package Microsoft.Rest.ClientRuntime --version 2.3.11
  1. Add this repository as a submodule.
git submodule add https://github.com/jdharmon/scryfallapi-csharp.git Scryfall
  1. Open Program.cs, and add
using Scryfall.API;
  1. Instantiate and use ScryfallClient:
static void Main(string[] args)
{
	// Instiantiate new Scryfall client
	var scryfall = new ScryfallClient();

	// Get a random card
	var card = scryfall.Cards.GetRandom();
	Console.WriteLine($"{card.Name}\t\t{card.ManaCost}\n");
	Console.WriteLine($"{card.TypeLine}\n");
	Console.WriteLine($"{card.OracleText}");
}
  1. Build & run
dotnet build
dotnet run

About

C# Scryfall API Client

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages