-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for market interactions #305
base: main
Are you sure you want to change the base?
Conversation
234d5c6
to
56e9ca3
Compare
da084eb
to
53c17b0
Compare
Why not use another endpoint without the need to extract data from HTML? async def get_listings(
self,
appid: int,
market_hash_name: str,
start: int = 0,
count: int = 20,
currency: int = 1,
language: str = "english",
response_format: str = "json"
) -> dict[str, Any]:
params = {
"start": start,
"count": count,
"currency": currency,
"language": language,
"format": response_format
}
params = {k: v for k, v in params.items() if v is not None}
return await self.get(URL.COMMUNITY / f"market/listings/{appid}/{market_hash_name}/render",
params=params) The code returns Json. It is much more clear. |
Thanks! I wasn't aware of this. |
Oh this doesn't include the name_id, unfortunately. |
Indeed. I could only find it in one place, and it's hardcoded there: Market_LoadOrderSpread( 176288467 ); // initial load
--
| PollOnUserActionAfterInterval( 'MarketOrderSpread', 5000, function() { Market_LoadOrderSpread( 176288467 ); }, 2 * 60 * 1000 );
Not looks like meaninfully provided value. doesn't look like the value that is specifically returned. |
Summary
Add market support to the library.
Checklist
TODO