Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This is a .NET client library for accessing the scryfall.com API

License

Notifications You must be signed in to change notification settings

ThatOhio/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

This is a .NET client library for accessing the scryfall.com API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%

AltStyle によって変換されたページ (->オリジナル) /