LiveSplit / SpeedrunComSharp

A .NET Library that can be used to interact with the Speedrun.com API
MIT License
32 stars 9 forks source link

Implement the Records API #2

Closed CryZe closed 9 years ago

CryZe commented 9 years ago

The Records API is missing completely at this point in time. It's the only way of querying the Leaderboards though, and is thus an essential part of acquiring any information about the Leaderboards.

CryZe commented 9 years ago

There should probably be a class called Record that has all of the Fields the Record API returns. A Record object should also be embedded in a Run and should store the fields that are the same. The Run should still pass out the individual fields though, since the Run API objects don't have a notion of a Record object.

The Record Objects should then have the Run as a lazy property and probably the Players and other things too. At the moment the Record Objects use the integer IDs instead of the mangled string IDs though, so there's no way of implementing this right now.

Also the Record Objects have a Place, the Run doesn't though, so it's not actually a "pure" subset of a Run.