1.0.3 • Published 1 year ago

swyft-steamapi v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

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
1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago