Skip to content

Personalized fork of the Scryfall-API-Client by Gonkers.

License

Notifications You must be signed in to change notification settings

CSmith1998/Scryfall-API-Client

 
 

Repository files navigation

Scryfall API Client

Build status

Getting Started

Until I can get better documentation, see the samples project for examples.


.NET Core Instructions

Add a service definition to your startup.cs file's ConfigureServices method.

services.AddHttpClient<ScryfallApiClient>(client =>
{
    client.BaseAddress = new Uri("https://api.scryfall.com/");
});

Add a ScryfallApiClient parameter and member to your Controller or Razor Page

ScryfallApiClient _scryfallApi { get; }

public IndexModel(ScryfallApiClient scryfallApi)
{
    _scryfallApi = scryfallApi ?? throw new ArgumentNullException(nameof(scryfallApi));
}

Use the client

var randomCard = await _scryfallApi.Cards.GetRandom();

About

Personalized fork of the Scryfall-API-Client by Gonkers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%