babelshift / SteamWebAPI2

🎮 C# / .NET library that makes it easy to use the Steam Web API. It conveniently wraps around all of the JSON data and ugly API details with clean methods, structures and classes.
MIT License
263 stars 43 forks source link

`GetSchemaAsync()` mapping error with TF2 items. #31

Closed Tvde1 closed 7 years ago

Tvde1 commented 7 years ago

Upon executing

var econItems = new EconItems(key, EconItemsAppId.TeamFortress2);
var x = await econItems.GetSchemaAsync();

I'm getting this error: image

The error is happening in EconItems.cs at line 95:

var schemaResult = await CallMethodAsync<SchemaResultContainer>("GetSchema", 1, parameters);

gg plz fix

Tvde1 commented 7 years ago

Your Steam.Models/GameEconomy/SchemaQualitiesModel.cs seems to be fine. I don't get why the error lists Steam.Models/DOTA2/SchemaQualityModel.cs.

Tvde1 commented 7 years ago

It might be trying to get DOTA 2's item schema. When I hover over the var, it shows this.

image

Tvde1 commented 7 years ago

It might be because the two files are both called SchemaModel. This should be an easy fix,

babelshift commented 7 years ago

I'll check it out in about 30 mins. Thanks for the heads up.

On Dec 17, 2016 11:22 AM, "Tim van den Essen" notifications@github.com wrote:

It might be because the two files are both called SchemaModel. This should be an easy fix,

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/babelshift/SteamWebAPI2/issues/31#issuecomment-267771426, or mute the thread https://github.com/notifications/unsubscribe-auth/ACmOXxOriup_UW2dfTyT6A0RiFVhq1xHks5rJAxVgaJpZM4LP62F .

babelshift commented 7 years ago

Looking now.

babelshift commented 7 years ago

I'm creating some classes specifically for TF2 schemas. I'll probably have it done tomorrow.

Tvde1 commented 7 years ago

Thanks!

babelshift commented 7 years ago

Added a new method called GetSchemaForTF2Async to EconItems interface to retrieve a TF2 specific schema. My minimal testing has passed. Let me know how it works for you. Try the latest nuget package.

Tvde1 commented 7 years ago

Works like a charm :)