Package Exports
- steam-provider
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (steam-provider) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Steam Provider Library
Usage
Install the dependency
npm installImport the library
TypeScript
import { SteamProvider } from 'steam-provider';JavaScript
var steam = require('steam-provider')Search for a game (Limited to 10 first results)
TypeScript
let provider = new SteamProvider();
provider.search("Portal 2").then(result => {
console.log(result);
})JavaScript
var provider = new steam.SteamProvider();
provider.search("Portal 2").then(result => {
console.log(result)
})Search Results
[ SteamSearchEntry {
id: '620',
name: 'Portal 2',
url: 'http://store.steampowered.com/app/620/Portal_2/?snr=1_7_7_151_150_1',
price: '19.99',
score: 'Overwhelmingly Positive, 98% of the 70,726 user reviews for this game are positive.' },
SteamSearchEntry {
id: '104600',
name: 'Portal 2 - The Final Hours',
url: 'http://store.steampowered.com/app/104600/Portal_2__The_Final_Hours/?snr=1_7_7_151_150_1',
price: '1.99',
score: 'Very Positive, 81% of the 367 user reviews for this game are positive.' },
SteamSearchEntry {
id: '247120',
name: 'Portal 2 Sixense Perceptual Pack',
url: 'http://store.steampowered.com/app/247120/Portal_2_Sixense_Perceptual_Pack/?snr=1_7_7_151_150_1',
price: '',
score: '' },
SteamSearchEntry {
id: '323180',
name: 'Portal 2 Soundtrack',
url: 'http://store.steampowered.com/app/323180/Portal_2_Soundtrack/?snr=1_7_7_151_150_1',
price: '',
score: 'Positive, 92% of the 13 user reviews for this game are positive.' },
SteamSearchEntry {
id: '660',
name: 'Portal 2 Sixense MotionPack DLC',
url: 'http://store.steampowered.com/app/660/Portal_2_Sixense_MotionPack_DLC/?snr=1_7_7_151_150_1',
price: '',
score: '' },
SteamSearchEntry {
id: '400',
name: 'Portal',
url: 'http://store.steampowered.com/app/400/Portal/?snr=1_7_7_151_150_1',
price: '9.99',
score: 'Overwhelmingly Positive, 97% of the 26,753 user reviews for this game are positive.' },
SteamSearchEntry {
id: '317400',
name: 'Portal Stories: Mel',
url: 'http://store.steampowered.com/app/317400/Portal_Stories_Mel/?snr=1_7_7_151_150_1',
price: '',
score: 'Overwhelmingly Positive, 95% of the 8,129 user reviews for this game are positive.' },
SteamSearchEntry {
id: '446750',
name: 'Portal Stories: VR',
url: 'http://store.steampowered.com/app/446750/Portal_Stories_VR/?snr=1_7_7_151_150_1',
price: '',
score: 'Very Positive, 94% of the 645 user reviews for this game are positive.' },
SteamSearchEntry {
id: '374040',
name: 'Portal Knights',
url: 'http://store.steampowered.com/app/374040/Portal_Knights/?snr=1_7_7_151_150_1',
price: '19.99',
score: 'Very Positive, 83% of the 7,530 user reviews for this game are positive.' },
SteamSearchEntry {
id: '361850',
name: 'Portal of Evil: Stolen Runes Collector\'s Edition',
url: 'http://store.steampowered.com/app/361850/Portal_of_Evil_Stolen_Runes_Collectors_Edition/?snr=1_7_7_151_150_1',
price: '6.99',
score: 'Positive, 95% of the 20 user reviews for this game are positive.' } ]Get game details
TypeScript
let provider = new SteamProvider();
provider.detail("620").then(result => {
console.log(result);
})JavaScript
var provider = new steam.SteamProvider();
provider.detail("620").then(result => {
console.log(result)
})Detail Results
SteamDetailEntry {
id: '620',
name: 'Portal 2',
priceData:
PriceInfo {
initialPrice: '19.99',
finalPrice: '19.99',
discountPercent: 0 },
otherData:
OtherInfo {
imageUrl: 'https://steamcdn-a.akamaihd.net/steam/apps/620/header.jpg?t=1490208943',
platforms: [ 'Windows', 'MacOS', 'Linux' ],
metacriticScore: 95,
features:
[ 'Single-player',
'Co-op',
'Steam Achievements',
'Full controller support',
'Steam Trading Cards',
'Captions available',
'Steam Workshop',
'Steam Cloud',
'Stats',
'Includes level editor',
'Commentary available' ],
developer: [ 'Valve' ],
publisher: [ 'Valve' ] } }Notes
By default the library will recover data in US English and will get the prices in USD currency.
Known Issues
About & Credits
steam-provider provides basic functionality for parsing Steam games information.
Credits to: ckatzorke for providing me an excelent starting point for this project
