Build the request URL for Steam Web API requests
$ npm install --save steam-web-api-build-url babel
require('babel/polyfill')
var steamWebApiBuildUrl = require('steam-web-api-build-url').default
steamWebApiBuildUrl('SteamNews', 'GetNewsForApp', {
version: 2, // optional; 1 by default
query: {
appid: 440,
count: 3,
maxlength: 300
} // optional; empty by default
}) // https://api.steampowered.com/ISteamNews/GetNewsForApp/v0002/?appid=440&count=3&maxlength=300&format=json
steamWebApiBuildUrl('SteamUser', 'GetPlayerSummaries', {
version: 2,
query: {
steamids: '76561197960435530'
},
key: 'XXXXXXXXXXXXXXXXXXXXXXX',
format: 'xml'
}) // https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?steamids=76561197960435530&format=xml&key=XXXXXXXXXXXXXXXXXXXXXXX
The first part of the pathname; the leading I is dropped.
The second part of the pathname.
Optional. The version of the method to use. 1 by default.
Optional. The Steam Web API key. Certain methods don't function without it.
Optional. The format to return. JSON by default.
Optional. The remaining values of the query string.