aj-r / RiotNet

A .NET/C# client for the Riot Games API
MIT License
22 stars 10 forks source link

All the masteries are Ferocity #4

Closed ghost closed 8 years ago

ghost commented 8 years ago

when i access the masteries from the "GetStaticMasteries()", every mastery i get is ferocity, even doe it should be cunning or resolve.

aj-r commented 8 years ago

By default, the API does not include the MasteryTree property in the response (https://developer.riotgames.com/api/methods#!/1055/3625).

To get the mastery tree property, call the function like this:

var masteryList = await client.GetStaticMasteriesAsync(masteryListData: new[] { "MasteryTree" });

or

var masteryList = await client.GetStaticMasteriesAsync(masteryListData: new[] { "all" });

I think what's happening is the client is falling back to the default value (Ferocity) if the MasteryTree property is not included in the response. Maybe I should make that property nullable so it is clearer when it is not specified.

aj-r commented 8 years ago

I have created a new issue (#5) to make it clearer when values from the API are not specified. Closing this issue.