module Skyhook::Core::ISteamUserStats
Public Class Methods
global_achievenement_percentages( appid )
click to toggle source
# File lib/skyhook/i_steam_user_stats.rb, line 35 def self.global_achievenement_percentages( appid ) response = parent.request '/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0002', gameid: appid response['achievementpercentages']['achievements'] end
global_stats( appid, count = 1, options = {} )
click to toggle source
FIXME(ClikeX) this won't work without names. But names do use the [] url parameter encoding. This won't work with faraday
# File lib/skyhook/i_steam_user_stats.rb, line 28 def self.global_stats( appid, count = 1, options = {} ) startdate = options[:startdate] enddate = options[:enddate] parent.request '/ISteamUserStats/GetGlobalStatsForGame/v0001', appidid: appid, count: count, startdate: startdate, enddate: enddate end
number_of_current_players( appid )
click to toggle source
# File lib/skyhook/i_steam_user_stats.rb, line 22 def self.number_of_current_players( appid ) response = parent.request '/ISteamUserStats/GetNumberOfCurrentPlayers/v1', appid: appid response['response']['player_count'] end
player_achievements( appid, steamid, options = {} )
click to toggle source
# File lib/skyhook/i_steam_user_stats.rb, line 14 def self.player_achievements( appid, steamid, options = {} ) steamid = Skyhook::Core::ISteamUser.resolve_vanity steamid l = options[:l] || options[:language] response = parent.request '/ISteamUserStats/GetPlayerAchievements/v1', appid: appid, steamid: steamid, l: l response['playerstats'] end
player_stats( appid, steamid )
click to toggle source
ISteamUserStats
Methods relating to User
stats.
# File lib/skyhook/i_steam_user_stats.rb, line 7 def self.player_stats( appid, steamid ) steamid = Skyhook::Core::ISteamUser.resolve_vanity steamid response = parent.request '/ISteamUserStats/GetUserStatsForGame/v2', steamid: steamid, appid: appid response['playerstats'] end
schema_for_game(appid, options = {})
click to toggle source
# File lib/skyhook/i_steam_user_stats.rb, line 41 def self.schema_for_game(appid, options = {}) l = options[:l] || options[:language] result = parent.request '/ISteamUserStats/GetSchemaForGame/v2', appid: appid, l: l result['game'] end