JustRoxy / ShikimoriSharp

shikimori.one API wrapper for C#
MIT License
18 stars 7 forks source link

Why do I get an error when converting a studio? I need help. #16

Closed Anoxx2020 closed 1 year ago

Anoxx2020 commented 1 year ago

I have little experience in this field, so I do not understand why when I try to query anime by id, I get the following error:

Newtonsoft.Json.JsonSerializationException: "Error converting value '/system/studios/original/951.png?1390414002' to type 'ShikimoriSharp.Bases.Image'. Path 'studios[0].image', line 1, position 2928."

Internal exception. ArgumentException: Could not cast or convert from System.String to ShikimoriSharp.Bases.Image.

I try to request an anime like this. I may not have understood it all because I am unfamiliar with the field

var logger = new NUnitLogger(); Client = new ShikimoriClient(logger, new ClientSettings(name, clientId, clientSecret)); try { var animes = Client.Animes.GetAnime(39397) ; Task aaa = animes; Console.WriteLine(aaa.Result.Name); } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.WriteLine();

JustRoxy commented 1 year ago

Thanks for your contribution, should be fixed at this version: https://www.nuget.org/packages/ShikimoriSharp/1.3.3