Module: Steam::Apps
- Defined in:
- lib/steam-api/steam/apps.rb
Overview
A Ruby DSL for communicating with the Apps portion of the Steam Web API.
Class Method Summary collapse
-
.get_all ⇒ Hash
Get Steam Applications.
-
.get_servers(addr: nil) ⇒ Hash
Get Servers at Address.
-
.up_to_date(appid: nil, version: nil) ⇒ Hash
Check if a given version of an App is current.
Class Method Details
.get_all ⇒ Hash
Get Steam Applications
11 12 13 14 15 16 |
# File 'lib/steam-api/steam/apps.rb', line 11 def self.get_all response = client.get('GetApplist/v2') .parse_key('applist') .parse_key('apps') response end |
.get_servers(addr: nil) ⇒ Hash
Get Servers at Address
22 23 24 25 26 27 28 |
# File 'lib/steam-api/steam/apps.rb', line 22 def self.get_servers(addr: nil) response = client.get 'GetServersAtAddress/v1', params: { addr: URI.escape(addr) } response = response.parse_key('response') response.check_success response.parse_key('servers') end |
.up_to_date(appid: nil, version: nil) ⇒ Hash
Check if a given version of an App is current
35 36 37 38 39 40 41 42 |
# File 'lib/steam-api/steam/apps.rb', line 35 def self.up_to_date(appid: nil, version: nil) response = client.get 'UpToDateCheck/v1', params: { appid: appid, version: version } response = response.parse_key('response') response.check_success response.delete('success') response end |