aj-r / RiotNet

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

Static data fields should be nullable if they're not always returned by the API #5

Closed aj-r closed 7 years ago

aj-r commented 7 years ago

The static data API doesn't return all properties of an object unless you tell it to. For the properties that aren't returned, it would be nice to set them to null so it is clear that they aren't set. (For example, it might look like a mastery is in the ferocity tree when it really isn't.)

However I'm not totally sure that we want to do this, since it will be an interface breaking change. As a potential alternative, we could add a new enum value of None = -1 for the affected enums (or just set the property value to -1 even though it's not part of the enum).

aj-r commented 7 years ago

This will be fixed in v4 because we use string constants instead of enums.