swyft-steamapi
v1.0.3
Published
This module is a class that interacts with the Steam API to get game data such as name, price, etc. It provides the following methods to access game information:
Downloads
5
Readme
SteamAPI
This module is a class that interacts with the Steam API to get game data such as name, price, etc. It provides the following methods to access game information:
getGameInfo
getGamePrice
getGameName
getGameDescription
getGameHeaderImage
getGameBackgroundImage
getGameReleaseDate
getGameDevelopers
getGamePublishers
getGameGenres
getGameCategories
getGameRecommendations
getGameMetacritic
getGamePlatforms
getGameSupportInfo
getGamePackageGroups
getGameDLC
getGameMovies
getGameScreenshots
getGameAchievements
getGameContentDescriptors
getPackagesInfo
Installation
npm install swyft-steamapi
Usage
import { SteamAPI } from 'swyft-steamapi';
const steamAPI = new SteamAPI();
const appid = '578080';
steamAPI.getGameInfo(appid)
.then(gameInfo => {
console.log(gameInfo);
});
steamAPI.getGamePrice(appid)
.then(priceOverview => {
console.log(priceOverview);
});
steamAPI.getGameName(appid)
.then(name => {
console.log(name);
});
steamAPI.getGameDescription(appid)
.then(description => {
console.log(description);
});
Types
The module exports the following types:
IGame
IRequirements
IPriceOverview
IPackageGroup
IPackageGroupSub
IPlatforms
IMetacritic
ICategory
IGenre
IScreenshot
IMovie
IRecommendations
IAchievements
IAchievement
IReleaseDate
ISupportInfo
IContentDescriptors