sugarskins/csgo-steam-eth-trade

improve check that profile is public

Opened this issue · 0 comments

Currently the steam adapter check that validates that the profile is public or private matches on the string contained by the web page.

This is unreliable (less so than an official API call). Find if there's a programmatic way to check for public or not public that does not rely on HTML parsing.

Note: The API call

https://steamcommunity.com/profiles/{steam_id}/inventory/json/730/2?count=1000

returns a specific response if profile is not public:

{"success":false,"Error":"This profile is private."}

This still requires Error string matching since the success can be false because of rate limiting. Also this endpoint is heavily rate-limited (only up to 4-5 req/min at time of writing), so its not usable at scale.