gonkers / scryfall-api-client Goto Github PK
View Code? Open in Web Editor NEWThis is a .NET client library for accessing the scryfall.com API
License: MIT License
This is a .NET client library for accessing the scryfall.com API
License: MIT License
Hi
The constructor of ScryfallApiClient is as following:
public ScryfallApiClient(HttpClient httpClient, ILogger<ScryfallApiClient> logger, IMemoryCache cache = null)
How to created a logger for the 2nd parameter?
I don't find any code example and I'm not sure how to do it.
thx
Hi
When trying to install the nuget package ScryfallAPI.Client 3.1.0 in a .NET 4 project I get the following error:
Error Could not install package 'ScryfallAPI.Client 3.1.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Is it possible to make the package compatible with .NET 4 and .NET 5 too?
Hi
I don't see the comments in visual studio when selecting a property from for example a Card.
Is it maybe possible to show comments in visual studio?
A Card has a Colors property which is a string array.
Is the most important color in array index 0 or how to understand this?
I tried it on some cards and I think it uses "B" for black but also for blue.
I'm not 100% sure.
Is this a bug?
thx
I had some interest in getting the /named feature of the Scryfall API at least partially implemented. It doesn't look like it would take too much to add it, I think I have a working version of it already implemented but opening an issue seemed more appropriate.
Hi,
I just detected (and fixed) the wrong price information.
Do you have any plans to update the nuget package on a more regular base?
Thx
Michael
Hi
Is it possible to make an 'examples' folder that has some files showing beginners like me the basic usage of the library (for a C# application)?
For example:
Because there are no api docs on github, providing some examples would be great!
Thanks in advance!
Hi
I'm starting .NET 5 coding here and I was wondering if you plan to make a nuget package for .NET 5 too?
thx in advance!
Hi
Updated to latest nuget, and trying to do this code:
```
var httpClient = new HttpClient { BaseAddress = ScryfallApiClientConfig.GetDefault().ScryfallApiBaseAddress };
var scryfallApiClient = new ScryfallApiClient(httpClient);
Card randomCard = scryfallApiClient.Cards.GetRandom().Result;
This GetRandom() worked in the previous nuget, now I get this error when calling GetRandom():
System.AggregateException
HResult=0x80131500
Message=Er zijn één of meer fouten opgetreden.
Source=mscorlib
StackTrace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Magic_The_Gathering_Collector.RandomCardForm.DisplayRandomCard() in F:\Visual Studio project\Magic The Gathering Collector\Magic The Gathering Collector\RandomCardForm.cs:line 41
at Magic_The_Gathering_Collector.RandomCardForm..ctor() in F:\Visual Studio project\Magic The Gathering Collector\Magic The Gathering Collector\RandomCardForm.cs:line 33
at Magic_The_Gathering_Collector.MainForm..ctor() in F:\Visual Studio project\Magic The Gathering Collector\Magic The Gathering Collector\MainForm.cs:line 76
at Magic_The_Gathering_Collector.Program.Main() in F:\Visual Studio project\Magic The Gathering Collector\Magic The Gathering Collector\Program.cs:line 19
This exception was originally thrown at this call stack:
System.Number.StringToNumber(string, System.Globalization.NumberStyles, ref System.Number.NumberBuffer, System.Globalization.NumberFormatInfo, bool)
System.Number.ParseDecimal(string, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo)
ScryfallApi.Client.DecimalAsStringConverter.Read(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions)
System.Text.Json.Serialization.JsonConverter<T>.TryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
System.Text.Json.JsonPropertyInfo<T>.ReadJsonAndSetMember(object, ref System.Text.Json.ReadStack, ref System.Text.Json.Utf8JsonReader)
System.Text.Json.Serialization.Converters.ObjectDefaultConverter<T>.OnTryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
System.Text.Json.Serialization.JsonConverter<T>.TryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
System.Text.Json.JsonPropertyInfo<T>.ReadJsonAndSetMember(object, ref System.Text.Json.ReadStack, ref System.Text.Json.Utf8JsonReader)
System.Text.Json.Serialization.Converters.ObjectDefaultConverter<T>.OnTryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
System.Text.Json.Serialization.JsonConverter<T>.TryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
...
[Call Stack Truncated]
Inner Exception 1:
FormatException: De indeling van de invoertekenreeks is onjuist.
First of all, thank you for this library. It saves me a lot of time.
Would it be possible to include a way to parametrize the search method to return all result pages in one call?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.