https://github.com/mnlaugh/steam
Deno Wrapper to communicate with Steam Web API
https://github.com/mnlaugh/steam
api deno steam web
Last synced: about 1 month ago
JSON representation
Deno Wrapper to communicate with Steam Web API
- Host: GitHub
- URL: https://github.com/mnlaugh/steam
- Owner: MNLaugh
- License: mit
- Created: 2021-04-18T10:16:11.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-05-30T01:21:17.000Z (about 3 years ago)
- Last Synced: 2025-09-07T07:02:43.773Z (10 months ago)
- Topics: api, deno, steam, web
- Language: TypeScript
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno steam api
Deno Wrapper to communicate with Steam Web API
## SteamID64 Finder
Please refer to [http://steamid.co/](http://steamid.co/) or [http://steamidconverter.com/](http://steamidconverter.com/) to find the user steam id.
## API key
You can get your api key on [https://steamcommunity.com/dev/apikey](https://steamcommunity.com/dev/apikey)
## Usage
```ts
import Steam from "https://deno.land/x/steam/mod.ts";
const steam = new Steam("your api key");
```
## Api
- ### GetAppList
It takes an optional parameter of type Options, and returns a Promise of type App[].
- @param {[Options](#Options)?} - Options
- @returns An array of [App](#App) objects.
```ts
const apps = await steam.GetAppList().catch(console.error);
console.log(apps);
/*
Output:
[
{ appid: 2016512, name: "" },
{ appid: 2025850, name: "X Wars Deluxe - Line Effect DLC" },
{ appid: 2026000, name: "Our Adventurer Guild" },
{ appid: 2026020, name: "The Alchemist" },
{ appid: 2026030, name: "twenty, in total" },
{ appid: 2026070, name: "Tank Commander" },
...more items
]
*/
```
- ### GetServersAtAddress
This function returns a list of servers that are running on the specified IPaddress.
- @param {string!} - The IP address of the server.
- @param {[GetServersAtAddressOptions](#GetServersAtAddressOptions)?} - Options
- @returns An array of [Server](#Server).
```ts
const servers = await steam.GetServersAtAddress("216.52.148.47").catch(console.error);
console.log(servers);
/*
Output:
[
{
addr: "216.52.148.47:27015",
gmsindex: -1,
steamid: "85568392924437989",
appid: 730,
gamedir: "csgo",
region: 0,
secure: true,
lan: false,
gameport: 27015,
specport: 0
}
]
*/
```
- ### GetNewsForApp
This function returns an array of News, which are the news items for the specifiedappid.
- @param {number!} - The appid of the game you want to get news for.
- @param {[GetNewsForAppOptions](#GetNewsForAppOptions)?} [options] - GetNewsForAppOptions
- @returns An array of [News](#News).
```ts
const news = await steam.GetNewsForApp(440, { count: 1 }).catch(console.error);
console.log(news);
/*
Output:
[
{
gid: "4474904295729829044",
title: "CS:GO fans want to change the meta by making the M4A1-S pricier",
url: "https://steamstore-a.akamaihd.net/news/externalpost/The Loadout/4474904295729829044",
is_external_url: true,
author: "editor@theloadout.com",
contents: '