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

Support pagination for EconItems#GetSchemaItemsForTF2Async #104

Closed QuantumToasted closed 4 years ago

QuantumToasted commented 4 years ago

Currently, IEconItems_440/GetSchemaItems/v1 Does not return all items in one single request anymore. It now has a next property in the JSON indicating the "next" defindex you should use for the next request. It is accomplished via a start query parameter. An example is shown below:

// GETs defindexes 0 - 1149, has a "next" of 1150
http://api.steampowered.com/IEconItems_440/GetSchemaItems/v0001/?key=YOUR_API_KEY

// GETs defindexes 1150 - 8265, has a "next" of 8266
http://api.steampowered.com/IEconItems_440/GetSchemaItems/v0001/?key=YOUR_API_KEY&start=1150

This seems to be...partially supported in the lib already? The .Next property can be found on the model for the response, but it is useless as the method to get the schema lacks support for the "start" query parameter.

QuantumToasted commented 4 years ago

I'd be happy to submit a PR for this since it seems pretty trivial, if it would speed up merging/deployment, as I would greatly prefer to not have to manually make REST requests directly to the API to get around this and use dynamic or map the response myself, since that would defeat the purpose of using this lib.

QuantumToasted commented 4 years ago

Closing this as it was merged as of #105 :)

babelshift commented 4 years ago

This is available on release 4.2.5.