-
Notifications
You must be signed in to change notification settings - Fork 20
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
Steam API v0001 gives a 404 #24
Comments
Do you have some example code for this failing, I just tested locally and this seemed to work okay: const Steam = require('steam-web');
const APIKEY = require('./key.js');
const s = new Steam({
apiKey: APIKEY,
format: 'json'
});
s.getSchema({
gameid: 440,
callback: (err, data) => {
if (err) {
throw new Error(err);
}
console.log(data);
}
}); |
It might be related to which gameid, perhaps different games are only supported on v2 - were you using tf2 (440) or another game? |
I was using CS:GO (730). |
Confirmed, 730 only works with v2 and 440 only works with v1. I'll have to see if the other IEconItems methods behave the same way. Probably have to do some kind of mapping, or default to requesting from v1 and if it fails make the request to v2. |
Might I suggest making the version number a parameter as well, with a default of v0001? |
Yea, that's probably the best stop-gap to get a fix out quickly, I hate the idea of making double requests or mapping, and without a breaking change that would necessitate a major version bump. I'll update all the methods to accept an optional version config and to use their default (theres v0001, v0002, v1, and v2 so have to do it case-by-case). This will at least allow implementors to use the methods if they find the default doesn't work. |
0.6.0 has been published to NPM with support for the .apiVersion config property for all methods. This should resolve the issue. |
Attempting to call s.getSchema gives a 404. I traced the issue to the version in the requested path. Changing the version to v0002 works.
The text was updated successfully, but these errors were encountered: