{"name":"@skiffyard/steam","description":"A thick, friendly layer over Valve's Steam Web API","versions":{"0.4.0":{"version":"0.4.0","kind":"git","url":"https://github.com/skiffyard/deck-steam.git","ref":"0.4.0","commit":"12867ab8bee5551db102016c3c1998b85d247c43","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{},"engines":{"jennifer":"\u003e=0.28.0"},"capabilities":["net"],"keywords":["steam","valve","games","rest","api"],"description":"A thick, friendly layer over Valve's Steam Web API","publishedAt":"1795879362","repoId":1432116115,"repoOwnerId":362133827,"repoOwner":"skiffyard"}},"readme":"# @skiffyard/steam\n\n[![test](https://github.com/skiffyard/deck-steam/actions/workflows/test.yml/badge.svg)](https://github.com/skiffyard/deck-steam/actions/workflows/test.yml)\n[![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://skiffyard.github.io/deck-steam/)\n[![release](https://img.shields.io/github/v/release/skiffyard/deck-steam)](https://github.com/skiffyard/deck-steam/releases/latest)\n\nA typed client for Valve™'s Steam™ Web API (`ISteamUser`, `IPlayerService`,\n`ISteamUserStats`, `ISteamApps`, `ISteamNews`, `ISteamRemoteStorage`,\n`IEconService`, `IGameServersService`), the storefront on\n`store.steampowered.com` and the Community Market on `steamcommunity.com`,\nfor [Jennifer](https://jennifer-lang.dev/). Replies come back as structs,\nSteam ids are accepted in all three notations, arguments are checked before\nany request, and every failure is a `SteamError` (kind `\"steam\"`, with the\nHTTP `status`), except the generic kinds: a reached cap (`\"limit\"`), a\ndeadline (`\"timeout\"`), a connection closed mid-reply (`\"closed\"`), a\ncancelled task (`\"cancelled\"`) and a host that cannot be reached\n(`net.NetError`, kind `\"net\"`).\n\nThis deck is part of [Skiffyard](https://github.com/skiffyard), small community decks for [Jennifer](https://jennifer-lang.dev/).\n\n## Install\n\n```sh\njvc add @skiffyard/steam\n```\n\n`jvc` vendors `src/` to `vendor/skiffyard/steam/`. To vendor by hand, unpack\n`src/` from the release archive `skiffyard-steam-\u003cversion\u003e.tar.gz` there.\nNeeds Jennifer 0.28.0 or newer and the default `jennifer` binary\n(`jennifer-tiny` has no `net`).\n\n## Example\n\n```jennifer\nimport \"@skiffyard/steam/\" as steam;\n\ndef c as steam.Client init steam.clientFromEnv();      # reads STEAM_API_KEY\n\n# needs a key: profiles, libraries, achievements\ndef id as string init steam.resolveAccount($c, \"gabelogannewell\");\ndef p as steam.PlayerSummary init steam.playerSummary($c, $id);\nio.printf(\"%s is %s\\n\", $p.personaName, steam.personaStateName($p.personaState));\ndef lib as list of steam.OwnedGame init steam.ownedGames($c, $id, true, true);\nfor (def g in steam.mostPlayed($lib, 5)) {\n    io.printf(\"%s|pad=40 %f|prec=1 h\\n\", $g.name, steam.playtimeHours($g.playtimeForever));\n}\n\n# keyless: player counts, the storefront, the market, news\nio.printf(\"%d in game\\n\", steam.currentPlayers($c, 730));\ndef d as steam.AppDetails init steam.appDetails($c, 620);\ndef q as steam.MarketPrice init steam.priceOverview($c, 440, \"Mann Co. Supply Crate Key\");\nfor (def n in steam.newsForApp($c, 440, 3, 0)) {\n    io.printf(\"%s\\n  %s\\n\", $n.title, steam.summarize(steam.plainText($n.contents), 120));\n}\n\n# no request at all\nsteam.toSteamId2(\"76561197960287930\");    # STEAM_1:0:11101\n```\n\nGet a key at \u003chttps://steamcommunity.com/dev/apikey\u003e. `STEAM_VERBOSE=1`\nprints each request with the key redacted. [`examples/`](examples/) has one\nrunnable program per topic.\n\n## Documentation\n\n\u003chttps://skiffyard.github.io/deck-steam/\u003e: a guide per topic and the\n[cheatsheet](docs/cheatsheet.md) of every export. Valve's own reference:\n[Steam Web API documentation](https://partner.steamgames.com/doc/webapi_overview).\n\n## Disclaimer\n\nValve changes the Web API without notice and has retired endpoints before\n(see [apps](docs/apps.md#the-catalogue)). Respect the\n[Steam Web API Terms of Use](https://steamcommunity.com/dev/apiterms) and the\nrate limits; hammering the Community Market gets an address blocked. Use at\nyour own risk; no warranty of any kind.\n\n## License\n\nLGPL-3.0-only, see [LICENSE](LICENSE). Copyright (C) 2026 mplx \u0026lt;mplx@jennifer-lang.dev\u0026gt;.\n\n## Trademarks\n\nSteam™, Valve™ and the Steam logo are trademarks of Valve Corporation. Other\nproduct and company names may be trademarks of their respective owners. They\nare used only to identify the products this deck works with. This deck is an\nindependent project, not affiliated with, sponsored, endorsed or supported\nby Valve Corporation.\n","movedFrom":["@deckyard/steam"]}