steam-market-item-image-fetcher
v1.1.2
Published
Fetches images for steam items from the steam marketplace.
Downloads
15
Readme
Steam Market Item Image Fetcher
This module was created for use in this app to fetch the image of a steam item.
Installation
npm install --save steam-market-item-image-fetcherUsage
const MarketImage = require('steam-market-item-image-fetcher');
MarketImage.getItemImage(578080, 'Red Hi-top Trainers', (response, err) => {
if (!err) {
//Do something with the response
} else {
//Do something with the error
}
});Methods
getItemImage(appid, market_hash_name, callback)
All fields are required
appid: The application id of the steam game the item belongs to (Ex:578080is the appid for Playerunknown's Battlegrounds)market_hash_name: The name of the item you want the image for (Ex:Red Hi-top TrainersCase Sensative)callback: The function called after the request to steam is completeresponse: The image url of the requested itemerr: If there is an error, this will be passed, null if there is no error
Response
{
"imgUrl": "...the url to the item image..."
}