Comments (21)
isn't that the same as filtering the owned tag/category using the giveaways filter?
from esgst.
Giveaway Filters already does this.
from esgst.
Differently, but ok.
from esgst.
How is it different? Doesn't it just hide those giveaways the same way the filters do? I didn't check the code of the script, just read your description.
from esgst.
I think this request is still valid. I am pretty sure you are doing it differently. I am talking about hiding games and DLC through steamgift's hide giveaway feature. For that you need the steamgift's native gameid. But if you want to hide all owned (gathered from steam userdata), you need appid/subid to gameid conversion, which my API is the only one that provides this: https://royalgamer06.ga/sgdb.json
Just check the code of my script and it will make more sense.
from esgst.
Sorry, back then I didn't understand that you were talking about SteamGifts' filter list, but this has already been implemented in Multi-Manager (actually 10 days ago xD): https://github.com/gsrafael01/ESGST/blob/master/src/modules/General/MultiManager.js#L1085
But there's no single-click way to hide all owned games at the moment, although I can implement that. Currently you have to either go to your owned games page on SteamGifts and use the feature there or get store links to all of the games in your account and give them to the feature.
I use SteamGifts' new giveaway search to retrieve game IDs (as you can see in the function linked above), but I could add your API as the primary method if it's reliable. Though I guess it's the same thing (1 request).
from esgst.
Yes, it's reliable and I use the same way of collecting/retrieving the ID's. My bot scans steamgifts archive periodically for any new giveaway games and then requests/updates the ID's. I do this so individuals don't have to and therefore will reduce the load on steamgifts significantly. Why?
- Obviously, you won't use steamgifts servers but mine
- You will request way less junk data (like HTML), making everything more efficient
- You could cache the API result
This is exactly why I made this API in the first place. Not just for my script, but anyone that could make use of it and reduce load on steamgifts.
And yes, like my userscript does, it gets the owned steam store id's (appids) from https://store.steampowered.com/dynamicstore/userdata/ and use that data combined with my game id database to hide all owned apps. I suggest you check out my userscript's code, it's easy code.
from esgst.
Ok, I'll add your API as the primary method then.
I don't need to check the code, ESGST already has all the logic in place. :)
from esgst.
From initially looking at the API, I see this:
45420: 1431836977
Is it correct? I don't think Steam has ids that long, it looks like a date timestamp.
from esgst.
That is correct. Just check yourself by searching for that game when creating a giveaway and then view the source.
from esgst.
Yeah, I got confused, I thought 45420 was the SteamGifts id and 1431836977 was the Steam id, but it's the other way around. What is gameids
for?
from esgst.
That's just the reverse.
from esgst.
But can't the reverse be appids and subids?
from esgst.
But can't the reverse be appids and subids?
what do you mean?
from esgst.
There are 4 possible mappings:
Steam appid => SteamGifts id
Steam subid => SteamGifts id
SteamGifts id => Steam appid
SteamGifts id => Steam subid
The gameids
object is mapping SteamGifts ids to what? Steam appids or subids? They can be both, so you'd have to separate them.
from esgst.
yes both and they are already separated
you could do:
Object.keys(json.appids).includes(json.gameids[gameid]) ? "appid" : "subid";
from esgst.
Problem is appids and subids can have the same id. Let's say there's an entry like this in gameids
:
"20": "50200"
And let's say appids
has an entry like this:
"50200": "100"
And let's say subids
has an entry like this:
"50200": "20"
It would incorrectly detect 20
as the appid 50200
, when, in fact, 20
is the subid 50200
.
I don't know if you understand what I'm saying. Occurrences like this are a bit rare, but they exist, I used to not differentiate between appids and subids on ESGST because I thought they were unique, until I found an id that was the same.
from esgst.
Yes, I see the problem, but this is rare and 90% of all ID's are appids, so the best guess will be appid.
However, I don't really see why you would need to know this anyway.
Wouldn't you just get the list of appids and the list of owned subs from steam userdata?
Then just use the different categories to get the sg gameid for hiding it.
You shouldn't use my endpoint to differentiate subids from appids anyway.
from esgst.
Even if it was 99.99%, there would be no harm in separating them to prevent issues, it's very easy to just use the format { "id": "20", "type": "apps" }
.
For hiding games, I'm already using your endpoint and it's all sorted out.
But I was also going to use your endpoint for something else, when a giveaway doesn't have the Steam id on SteamGifts, but has the attribute data-game-id
. In that case, I could use the reverse method to get the Steam id of the game. But since the gameids
endpoint is not 100% accurate, I cannot use it.
It's just a suggestion, I'm currently using whitelist filters to get the Steam ids of those games (see #1077).
from esgst.
No, it would be redundant. You could for example do this:
"SteamGifts GameID " + gameid + " is a Steam " + (Object.entries(json.appids).includes(gameid) ? "Appid" : "Subid")
This is different from the previous example.
from esgst.
It's not redundant.
Using the reverse method to get a Steam id from a SteamGifts id (if it was in the format I mentioned):
steam_obj = json.gameids[game_id];
if (steam_obj) {
steam_id = steam_obj.id;
steam_type = steam_obj.type;
}
Using the regular method:
steam_id = Object.keys(json.appids).filter(x => json.appids[x] == game_id)[0];
if (steam_id) {
steam_type = "apps";
} else {
steam_id = Object.keys(json.subids).filter(x => json.subids[x] == game_id)[0];
if (steam_id) {
steam_type = "subs";
}
}
First method is much nicer.
But anyway, like I said, it was just a suggestion to make the endpoint 100% accurate, but clearly you don't agree, so nevermind.
from esgst.
Related Issues (20)
- Fix active discussions and community poll features
- "Learning" category stopped flagging "Profile Features Limited" games
- [Enter/Leave Giveaway Button] When there is a network error, allow the button to be clickable again
- Certain settings aren't actually saved when saving.
- [SteamTrades] Trade filters not working. HOT 1
- "Only remove games tagged with" doesn't do anything
- Cannot sync owned games.
- Fix giveaway features for game pages
- Comment History seems to be malfunctioning
- One-Click Hide Giveaway Button shows even when option is not active HOT 2
- Giveaway Error Search Links: fix error when loading SteamDB logo
- Fix position of ESGST header button on SteamTrades
- Custom Header/Footer Links: fix footer on SteamTrades
- ESGST stopped working
- [Feature Request] Add a tag for Steam Deck compatibility
- [Enhancement Request] Giveaway extractor: skip ended giveaways
- [Bug] regex for giveaway extractor only accepts lower case
- Removing ignored games skips every other page
- Endless reverse scrolling in discussions stopped working
- Show a browser notification if there are xxx P or more.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esgst.