steam_api_client 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/docs/USAGE.md +30 -0
- data/lib/steam_api_client/endpoints.rb +20 -0
- data/lib/steam_api_client/models/app_list.rb +22 -0
- data/lib/steam_api_client/version.rb +1 -1
- data/lib/steam_api_client.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 410a0d3b36b83ac8888323849214253b0d0ba26501d1218ad7f48176eb8dd2af
|
|
4
|
+
data.tar.gz: 89f42dc5315420c9cbe41b3bb5b0eb1c511c1ca6c7133d7305c4ec700e1a6f31
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ddff8c5f6b2a3b2e4faf56dccf572dd659517125b0f29a2c224b2eafb782319218c956a1b3cb2c131c988382da58eb05125c84a7bf80eb5de891d8a768cfe8fb
|
|
7
|
+
data.tar.gz: 34bd9e558c5d1a29453e02dfd76c709876765b2c1958744d5cdac985045e7b04c09cbc7c51d1706fe81df0d1ab54d2fdbaf4d411335ad2038ae86236b6a0da5e
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.6.0] - 2026-11-04
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `app_list`: the apps in the store, a page at a time (up to 50,000 per call), filtered by type or by last change (#109).
|
|
14
|
+
|
|
9
15
|
## [1.5.0] - 2026-11-04
|
|
10
16
|
|
|
11
17
|
### Added
|
|
@@ -228,7 +234,8 @@ The versions below were bumped in `version.rb` during development but **never pu
|
|
|
228
234
|
|
|
229
235
|
- Initial gem skeleton.
|
|
230
236
|
|
|
231
|
-
[Unreleased]: https://github.com/jpechaves/steam_api/compare/v1.
|
|
237
|
+
[Unreleased]: https://github.com/jpechaves/steam_api/compare/v1.6.0...HEAD
|
|
238
|
+
[1.6.0]: https://github.com/jpechaves/steam_api/compare/v1.5.0...v1.6.0
|
|
232
239
|
[1.5.0]: https://github.com/jpechaves/steam_api/compare/v1.4.0...v1.5.0
|
|
233
240
|
[1.4.0]: https://github.com/jpechaves/steam_api/compare/v1.3.0...v1.4.0
|
|
234
241
|
[1.3.0]: https://github.com/jpechaves/steam_api/compare/v1.2.0...v1.3.0
|
data/docs/USAGE.md
CHANGED
|
@@ -336,6 +336,36 @@ lists.top_sellers.items.map(&:name)
|
|
|
336
336
|
|
|
337
337
|
`SteamApiClient::FeaturedCategories` fields: `specials`, `coming_soon`, `top_sellers`, `new_releases`, each a `FeaturedCategories::Category` (`id`, `name` in the requested language, `items`: `FeaturedItem`), or `nil` when Steam leaves the list out. Steam also sends the spotlights, the daily deal, genres and trailers, whose shapes vary: use `retrieve_raw` for those.
|
|
338
338
|
|
|
339
|
+
#### `app_list`
|
|
340
|
+
|
|
341
|
+
🔑 One page of the apps in the store, in app ID order. It's the way to find an app's ID by name across the whole catalog (`store_search` returns at most 10 results). `nil` when there's nothing: past the last page, or no app changed since `if_modified_since`.
|
|
342
|
+
|
|
343
|
+
- `include_games:` (default `true`), `include_dlc:`, `include_software:`, `include_videos:`, `include_hardware:` (default `false`) pick the types.
|
|
344
|
+
- `max_results:` is the page size, 10,000 by default, up to 50,000.
|
|
345
|
+
- `last_appid:` starts after that app: pass the previous page's `last_app_id` to get the next page.
|
|
346
|
+
- `if_modified_since:` (unix time) only returns apps changed since then.
|
|
347
|
+
|
|
348
|
+
```ruby
|
|
349
|
+
page = client.app_list.retrieve(max_results: 5)
|
|
350
|
+
# => #<data SteamApiClient::AppList apps=[#<data SteamApiClient::AppList::App app_id=10, name="Counter-Strike",
|
|
351
|
+
# last_modified=1745368572, price_change_number=39636801>, ...], have_more_results=true, last_app_id=50>
|
|
352
|
+
|
|
353
|
+
# Every game, a page at a time (about 200,000 in 4 calls)
|
|
354
|
+
apps = []
|
|
355
|
+
last_appid = 0
|
|
356
|
+
loop do
|
|
357
|
+
page = client.app_list.retrieve(last_appid: last_appid, max_results: 50_000)
|
|
358
|
+
break unless page
|
|
359
|
+
|
|
360
|
+
apps.concat(page.apps)
|
|
361
|
+
break unless page.have_more_results
|
|
362
|
+
|
|
363
|
+
last_appid = page.last_app_id
|
|
364
|
+
end
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
On the last page Steam leaves out `have_more_results` (so `false`) and `last_app_id` (`nil`).
|
|
368
|
+
|
|
339
369
|
#### `app_news`
|
|
340
370
|
|
|
341
371
|
The latest news of an app. `count:` is required, `maxlength:` (default 300) shortens each item's contents.
|
|
@@ -44,6 +44,26 @@ module SteamApiClient
|
|
|
44
44
|
params: {appid: param.integer(as: :gameid)}
|
|
45
45
|
),
|
|
46
46
|
|
|
47
|
+
# One page of the apps in the store, by app ID => AppList, or nil when there's nothing
|
|
48
|
+
# (past the last page, or nothing modified since if_modified_since)
|
|
49
|
+
# @see https://steamapi.xpaw.me/#IStoreService/GetAppList
|
|
50
|
+
Endpoint.new(
|
|
51
|
+
:app_list, "IStoreService/GetAppList/v1/", returns: AppList, at: %i[response],
|
|
52
|
+
params: {
|
|
53
|
+
include_games: param.boolean(default: true),
|
|
54
|
+
include_dlc: param.boolean(default: false),
|
|
55
|
+
include_software: param.boolean(default: false),
|
|
56
|
+
include_videos: param.boolean(default: false),
|
|
57
|
+
include_hardware: param.boolean(default: false),
|
|
58
|
+
# Only apps changed since then, in unix time (0 for all)
|
|
59
|
+
if_modified_since: param.integer(default: 0),
|
|
60
|
+
# The previous page's last_app_id (0 for the first page)
|
|
61
|
+
last_appid: param.integer(default: 0),
|
|
62
|
+
# Apps per page, up to 50,000
|
|
63
|
+
max_results: param.integer(default: 10_000)
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
|
|
47
67
|
# Latest news of an app => [NewsItem]
|
|
48
68
|
# @see https://developer.valvesoftware.com/wiki/Steam_Web_API#GetNewsForApp_.28v0002.29
|
|
49
69
|
Endpoint.new(
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module SteamApiClient
|
|
2
|
+
# Built first, then named AppList::App below
|
|
3
|
+
app = Model.define(
|
|
4
|
+
app_id: [:integer, from: :appid],
|
|
5
|
+
name: :string,
|
|
6
|
+
# In unix time
|
|
7
|
+
last_modified: [:integer, optional: true],
|
|
8
|
+
# Changes whenever the app's price changes
|
|
9
|
+
price_change_number: [:integer, optional: true]
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
# One page of the apps in the store, from `app_list`
|
|
13
|
+
# @see https://steamapi.xpaw.me/#IStoreService/GetAppList
|
|
14
|
+
AppList = Model.define(
|
|
15
|
+
apps: [[app], default: []],
|
|
16
|
+
# Steam leaves these out on the last page
|
|
17
|
+
have_more_results: [:boolean, default: false],
|
|
18
|
+
# Pass as `last_appid:` to get the next page
|
|
19
|
+
last_app_id: [:integer, from: :last_appid, optional: true]
|
|
20
|
+
)
|
|
21
|
+
AppList.const_set(:App, app)
|
|
22
|
+
end
|
data/lib/steam_api_client.rb
CHANGED
|
@@ -32,6 +32,7 @@ require_relative "steam_api_client/models/player_game_stats"
|
|
|
32
32
|
require_relative "steam_api_client/models/news_item"
|
|
33
33
|
require_relative "steam_api_client/models/global_achievement"
|
|
34
34
|
require_relative "steam_api_client/models/app_schema"
|
|
35
|
+
require_relative "steam_api_client/models/app_list"
|
|
35
36
|
require_relative "steam_api_client/models/app_details"
|
|
36
37
|
require_relative "steam_api_client/models/package_details"
|
|
37
38
|
require_relative "steam_api_client/models/app_dlc"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: steam_api_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- João Pedro
|
|
@@ -55,6 +55,7 @@ files:
|
|
|
55
55
|
- lib/steam_api_client/model/scalars.rb
|
|
56
56
|
- lib/steam_api_client/models/app_details.rb
|
|
57
57
|
- lib/steam_api_client/models/app_dlc.rb
|
|
58
|
+
- lib/steam_api_client/models/app_list.rb
|
|
58
59
|
- lib/steam_api_client/models/app_schema.rb
|
|
59
60
|
- lib/steam_api_client/models/featured.rb
|
|
60
61
|
- lib/steam_api_client/models/featured_categories.rb
|