2.0.0 • Published 4 years ago

@barktler-api/steam v2.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

API-Steam

Build Status codecov npm version downloads

:speech_balloon: Steam APIs

Install

yarn add @barktler-api/steam
yarn add @barktler/core # Peer Dependency
# Or
npm install @barktler-api/steam --save
npm install @barktler/core --save # Peer Dependency

A request driver is also required, here we install and use the axios driver for example.

yarn add @barktler/driver-axios
# Or
npm install @barktler/driver-axios --save

Usage

import { axiosDriver } from "@barktler/driver-axios";
import { OwnedGamesDetail, SteamAPI } from "@barktler-api/steam";

(async () => {

    const steamApi: SteamAPI = SteamAPI.create('<Steam API Key>');
    steamApi.useDriver(axiosDriver);

    const detail: OwnedGamesDetail = await steamApi.getOwnedGames('<Steam ID>');

    console.log(detail);
})();

You can also declare a default driver for global request

import { Barktler } from "@barktler/core";
import { axiosDriver } from "@barktler/driver-axios";
import { OwnedGamesDetail, SteamAPI } from "../src";

Barktler.useGlobalDefaultDriver(axiosDriver);

(async () => {

    const steamApi: SteamAPI = SteamAPI.create('<Steam API Key>');
    const detail: OwnedGamesDetail = await steamApi.getOwnedGames('<Steam ID>');

    console.log(detail);
})();
2.0.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago