@j4ckofalltrades/steam-webapi-ts
Version:
Isomorphic Steam WebAPI wrapper in TypeScript
58 lines (34 loc) • 2.23 kB
Markdown

[](https://npmjs.com/package/@j4ckofalltrades/steam-webapi-ts)
[](https://j4ckofalltrades.github.io/steam-webapi-ts)
[](https://codecov.io/gh/j4ckofalltrades/steam-webapi-ts)
Isomorphic Steam WebAPI wrapper in TypeScript.
## Installation
[](https://npmjs.com/package/@j4ckofalltrades/steam-webapi-ts)
### Using npm
`$ npm install @j4ckofalltrades/steam-webapi-ts`
### Using yarn
`$ yarn add @j4ckofalltrades/steam-webapi-ts`
### Using GitHub Packages
This step requires [authenticating to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages),
then installing the package using `npm`.
`$ npm install @j4ckofalltrades/steam-webapi-ts`
### via CDN
- jsDelivr [cdn.jsdelivr.net/npm/@j4ckofalltrades/steam-webapi-ts/](https://cdn.jsdelivr.net/npm/@j4ckofalltrades/steam-webapi-ts/)
- unpkg [unpkg.com/browse/@j4ckofalltrades/steam-webapi-ts/](https://unpkg.com/browse/@j4ckofalltrades/steam-webapi-ts/)
## Usage
**This requires a Steam WebAPI Key, you can get one at https://steamcommunity.com/dev/apikey**
You can use either the provided `SteamWebApi` wrapper
```typescript
import { SteamWebApi } from "@j4ckofalltrades/steam-webapi-ts"
const steamWebApi = new SteamWebApi("api_key")
await steamWebApi.usersApi.getPlayerSummaries(["steam_ids"])
```
or with a specific interface e.g. `ISteamUser`
```typescript
import { ISteamUser } from "@j4ckofalltrades/steam-webapi-ts"
const usersApi = new ISteamUser("api_key")
await usersApi.getPlayerSummaries(["steam_ids"])
```
## Stats
