steam_api_client 1.0.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d69cc1b3c7d853d973708c6ec1c4eacebb60122b0f338dbbec3eb0766ae63464
4
- data.tar.gz: 4df0c047832658d3ecbc4505a0308682ab93121c834e44c9515cb63e5e8f17be
3
+ metadata.gz: fff398c488310a8cd495c37bc213bc6b41645c21aef707a5b83a951c4ee7550e
4
+ data.tar.gz: '0191bdcd553d89bcf7f15cf247eb5aa2e6a616377e791a544ee8ccfefcdc9e7d'
5
5
  SHA512:
6
- metadata.gz: 14c25c60ca63dbc6eee90a07060b0a34d87a61c5d2808a9ac5b12aab5aeb1b2ca769e1f58b2dd638cbb32f4b00740dede05f83534105b80d39599fa9b47eec35
7
- data.tar.gz: c36ccb50189c59e39be4420bc9419594457fa4383a614506b68770621df445d487a223fa4f7e2450ffd9dc7911a398b29dfb6967f8a8c13e791ff3779d5db9e1
6
+ metadata.gz: eee77c9968b4a7ba64330c7fde66690509e2f8c6e9ea77bacd16b7e61a097f6e4ac8daa4226d38c6c33fbf6ed2d753dbf4c5527d58951672a2d33d18c91d27d5
7
+ data.tar.gz: e9fae7d714e744f4131951f3c45f73f4e8e81725b01b61d7ed6a9fc365293fe94808b58a6e96be457904e89c64b4fd3d073d1a1616051c6b5354a76d01c62a1e
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.1.0] - 2026-11-02
10
+
11
+ ### Added
12
+
13
+ - `player_wishlist`, `player_wishlist_count` and `player_followed_games`: a player's wishlist and the apps they follow in the store. No API key needed (#104).
14
+
9
15
  ## [1.0.0] - 2026-10-24
10
16
 
11
17
  ### Added
@@ -198,7 +204,8 @@ The versions below were bumped in `version.rb` during development but **never pu
198
204
 
199
205
  - Initial gem skeleton.
200
206
 
201
- [Unreleased]: https://github.com/jpechaves/steam_api/compare/v1.0.0...HEAD
207
+ [Unreleased]: https://github.com/jpechaves/steam_api/compare/v1.1.0...HEAD
208
+ [1.1.0]: https://github.com/jpechaves/steam_api/compare/v1.0.0...v1.1.0
202
209
  [1.0.0]: https://github.com/jpechaves/steam_api/compare/v0.10.0...v1.0.0
203
210
  [0.11.0]: https://github.com/jpechaves/steam_api/compare/v0.10.0...v0.11.0
204
211
  [0.10.0]: https://github.com/jpechaves/steam_api/compare/v0.9.1...v0.10.0
data/docs/USAGE.md CHANGED
@@ -191,6 +191,33 @@ stats.achievements.first # => #<data SteamApiClient::PlayerGameStats::Achievemen
191
191
 
192
192
  Stat values are Integers or Floats, as the game defines them. A private profile, or a game without stats, raises `Errors::HttpBadRequest`.
193
193
 
194
+ #### `player_wishlist`
195
+
196
+ The apps on a player's wishlist. No key needed.
197
+
198
+ ```ruby
199
+ client.player_wishlist.retrieve(steamid: 76561198000000001).first
200
+ # => #<data SteamApiClient::WishlistItem app_id=202350, priority=3, date_added=1403384867>
201
+ ```
202
+
203
+ `priority` is the player's ranking of the app, and `date_added` a unix timestamp. A private or empty wishlist is `[]`. An ID that isn't a valid SteamID (e.g. `1`) raises `Errors::HttpBadRequest`, here and in the two endpoints below.
204
+
205
+ #### `player_wishlist_count`
206
+
207
+ The number of apps on a player's wishlist, or `nil` when it's private or empty. No key needed.
208
+
209
+ ```ruby
210
+ client.player_wishlist_count.retrieve(steamid: 76561198000000001) # => 19
211
+ ```
212
+
213
+ #### `player_followed_games`
214
+
215
+ The app IDs a player follows in the store, or `[]` when the profile is private. No key needed.
216
+
217
+ ```ruby
218
+ client.player_followed_games.retrieve(steamid: 76561198000000001) # => [400, 440, 620, ...]
219
+ ```
220
+
194
221
  ### Apps
195
222
 
196
223
  #### `app_details`
@@ -321,6 +348,6 @@ Don't retry other 4xx errors: they won't succeed on their own.
321
348
 
322
349
  - **Rate limits.** Steam's [Web API terms](https://steamcommunity.com/dev/apiterms) allow 100,000 calls per day per key. The Storefront API (`app_details`) is rate limited per IP address, commonly reported at about 200 requests per 5 minutes. Both answer `429` when you go over. Cache what you can.
323
350
  - **The Storefront API is unofficial.** `app_details` uses the API behind Steam's store and Big Picture mode. Valve doesn't document it, and its fields change without notice.
324
- - **Private profiles.** What a player hides depends on their privacy settings. Depending on the endpoint, Steam answers with an error (`player_achievements`: 403, `player_game_stats`: 400, `player_friends`: 401) or with empty data, which the gem returns as `nil` (`player_owned_games`, `player_recent_games`, `player_level`). `player_summaries` still returns the public part of the profile.
351
+ - **Private profiles.** What a player hides depends on their privacy settings. Depending on the endpoint, Steam answers with an error (`player_achievements`: 403, `player_game_stats`: 400, `player_friends`: 401) or with empty data, which the gem returns as `nil` or `[]` (`player_owned_games`, `player_recent_games`, `player_level`, `player_wishlist`, `player_wishlist_count`, `player_followed_games`). Steam answers the same way for an empty wishlist, so the wishlist endpoints can't tell the two apart. `player_summaries` still returns the public part of the profile.
325
352
  - **The key is in the URL.** Steam requires `?key=...` in the query string. Treat logs of request URLs as secrets (see [Configuration](#configuration)), and [rotate your key](https://steamcommunity.com/dev/apikey) if it leaks.
326
353
  - **SteamIDs are 64 bit Integers** (e.g. `76561197960435530`). Use `player_steamid` to get one from a vanity URL.
@@ -62,6 +62,13 @@ module SteamApiClient
62
62
  params: {appid: param.integer, steamid: param.integer}
63
63
  ),
64
64
 
65
+ # The apps a player follows in the store => [Integer] app IDs ([] when not public)
66
+ # @see https://steamapi.xpaw.me/#IStoreService/GetGamesFollowed
67
+ Endpoint.new(
68
+ :player_followed_games, "IStoreService/GetGamesFollowed/v1/", key: false, returns: [:integer], at: %i[response appids],
69
+ params: {steamid: param.integer}
70
+ ),
71
+
65
72
  # A player's friend list, if public => [Friend]
66
73
  # @see https://developer.valvesoftware.com/wiki/Steam_Web_API#GetFriendList_.28v0001.29
67
74
  Endpoint.new(
@@ -116,6 +123,20 @@ module SteamApiClient
116
123
  Endpoint.new(
117
124
  :player_summaries, "ISteamUser/GetPlayerSummaries/v0002/", returns: [PlayerSummary], at: %i[response players],
118
125
  params: {steamids: param.integer_list}
126
+ ),
127
+
128
+ # A player's wishlist => [WishlistItem] ([] when empty or not public)
129
+ # @see https://steamapi.xpaw.me/#IWishlistService/GetWishlist
130
+ Endpoint.new(
131
+ :player_wishlist, "IWishlistService/GetWishlist/v1/", key: false, returns: [WishlistItem], at: %i[response items],
132
+ params: {steamid: param.integer}
133
+ ),
134
+
135
+ # The number of apps on a player's wishlist => Integer, or nil when empty or not public
136
+ # @see https://steamapi.xpaw.me/#IWishlistService/GetWishlistItemCount
137
+ Endpoint.new(
138
+ :player_wishlist_count, "IWishlistService/GetWishlistItemCount/v1/", key: false, returns: :integer, at: %i[response count],
139
+ params: {steamid: param.integer}
119
140
  )
120
141
  ].to_h { |endpoint| [endpoint.name, endpoint] }.freeze
121
142
  end
@@ -0,0 +1,11 @@
1
+ module SteamApiClient
2
+ # An app on a player's wishlist, from `player_wishlist`
3
+ # @see https://steamapi.xpaw.me/#IWishlistService/GetWishlist
4
+ WishlistItem = Model.define(
5
+ app_id: [:integer, from: :appid],
6
+ # The player's ranking of the app in their wishlist
7
+ priority: :integer,
8
+ # In unix time
9
+ date_added: :integer
10
+ )
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SteamApiClient
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -30,6 +30,7 @@ require_relative "steam_api_client/models/player_game_stats"
30
30
  require_relative "steam_api_client/models/news_item"
31
31
  require_relative "steam_api_client/models/global_achievement"
32
32
  require_relative "steam_api_client/models/app_details"
33
+ require_relative "steam_api_client/models/wishlist_item"
33
34
 
34
35
  require_relative "steam_api_client/endpoints"
35
36
  require_relative "steam_api_client/client"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steam_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Pedro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-24 00:00:00.000000000 Z
11
+ date: 2026-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -61,6 +61,7 @@ files:
61
61
  - lib/steam_api_client/models/player_achievements.rb
62
62
  - lib/steam_api_client/models/player_game_stats.rb
63
63
  - lib/steam_api_client/models/player_summary.rb
64
+ - lib/steam_api_client/models/wishlist_item.rb
64
65
  - lib/steam_api_client/request.rb
65
66
  - lib/steam_api_client/requestor.rb
66
67
  - lib/steam_api_client/response.rb