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:
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:
getGameInfogetGamePricegetGameNamegetGameDescriptiongetGameHeaderImagegetGameBackgroundImagegetGameReleaseDategetGameDevelopersgetGamePublishersgetGameGenresgetGameCategoriesgetGameRecommendationsgetGameMetacriticgetGamePlatformsgetGameSupportInfogetGamePackageGroupsgetGameDLCgetGameMoviesgetGameScreenshotsgetGameAchievementsgetGameContentDescriptorsgetPackagesInfo
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:
IGameIRequirementsIPriceOverviewIPackageGroupIPackageGroupSubIPlatformsIMetacriticICategoryIGenreIScreenshotIMovieIRecommendationsIAchievementsIAchievementIReleaseDateISupportInfoIContentDescriptors
