AdrianJSClark / aydsko-iracingdata

A .NET access library for querying the iRacing "Data" API.
MIT License
28 stars 8 forks source link

Implement League Season Standings Endpoint #64

Closed AdrianJSClark closed 1 year ago

AdrianJSClark commented 2 years ago

Implement support for the /data/league/season_standings endpoint.

dennis commented 1 year ago

I'm working on this

AdrianJSClark commented 1 year ago

Thanks! I don't run in any leagues so it is difficult to get representative test data for most of them. Without either that or a proper response schema there isn't much you can do.

dennis commented 1 year ago

Yeah you mentioned that. I should have checked last time I look at this project, but here goes :)

A question though; To represent the response I need 6 classes. I'm not sure if I should just place these as new classes in Aydsko.iRacingData.Leagues namespace as it feels a bit messy having all these classes in a shared namespace and same directory. Many of them are only used in one response.

I'm tempted to either make a Aydsko.iRacingData.Leagues.SeasonStandingsSupport that includes the additional classes, or embed them in the main SeasonStandings class, to avoid adding even more classes (It would increase the number from 24 to 30).

AdrianJSClark commented 1 year ago

I think you can make an educated call on if any of the classes should be top-level or embedded in a parent class.

There's no problem with having lots of classes in a namespace in my opinion. For some other response classes I've gone with the pattern of just prefixing them all with something common. Something like SeasonStandings in this case. So SeasonStandingResponse, SeasonStandingsResponseItem etc