quer / the-steam-awards

Steam multi account module/event (get updates when event for steam)
95 stars 13 forks source link

Seasonal badge #80

Closed tailon2k closed 5 months ago

tailon2k commented 5 months ago

Hello! is it possible to get the seasonal badge that we can get with steam shop points? I mean this one: https://store.steampowered.com/points/shop/c/steambadge There is an API route to do it but i don't know how to get the defid for the badge. This is the Steam Web API documentation: https://steamapi.xpaw.me/#ILoyaltyRewardsService/RedeemPointsForBadgeLevel

Something like this but for the badge i mentioned: https://github.com/quer/the-steam-awards/blob/Master/modules/pointsShop/RedeemPoints.js

quer commented 5 months ago

That is posibal. and shoud not be hard to do. It shoud just be, to do as we do "RedeemPoints.js", but for that other url. and if you only what the level that you can do, whit the point that the account have. You can just use https://github.com/quer/the-steam-awards/blob/Master/modules/pointsShop/GetpointsStatus.js to get the point, and then do Math on the number. And only request the amount you need.

I cant create it for you, as i doent what i use my point on it. If you provide the point, then i can look into it.

tailon2k commented 5 months ago

Okay thank you for the info! the problem thought is that i don't know how to get the defid that is required, as this badge is not from a game, and i think it can't be obtain by scraping the page.

quer commented 5 months ago

did a quick look in the code, from steam. and found this: defid: 258511 <- Winter Collection - 2023

You can also find the id, in steamdb. https://steamdb.info/app/2750340/communityitems/

tailon2k commented 5 months ago

Thank you so much! :)