class Skyhook::User

Attributes

avatar[R]
avatarfull[R]
avatarmedium[R]
commentpermission[R]
communityvisibilitystate[R]
lastlogoff[R]
loccityid[R]
loccountrycode[R]
locstatecode[R]
personaname[R]
personastate[R]
personastateflags[R]
primaryclanid[R]
profilestate[R]
profileurl[R]
realname[R]
steamid[R]
timecreated[R]

Public Class Methods

new( steamid ) click to toggle source
# File lib/skyhook/user.rb, line 10
def initialize( steamid )
  set_attributes Skyhook::Core::ISteamUser.user_summaries( steamid ).first
end

Public Instance Methods

friends( relationship = :all ) click to toggle source
# File lib/skyhook/user.rb, line 18
def friends( relationship = :all )
  @friends ||= Skyhook::Core::ISteamUser.friend_list @steamid, relationship.to_s
end
game( appid ) click to toggle source
# File lib/skyhook/user.rb, line 14
def game( appid )
  Skyhook::Game.new( appid, self )
end

Private Instance Methods

set_attributes( response ) click to toggle source
# File lib/skyhook/user.rb, line 24
def set_attributes( response )
  @steamid = response["steamid"].to_i
  @personaname = response["personaname"]
  @communityvisibilitystate = response["communityvisibilitystate"]
  @profilestate = response["profilestate"]
  @lastlogoff = response["lastlogoff"]
  @commentpermission = response["commentpermission"]
  @profileurl = response["profileurl"]
  @avatar = response["avatar"]
  @avatarmedium = response["avatarmedium"]
  @avatarfull = response["avatarfull"]
  @personastate = response["personastate"]
  @realname = response["realname"]
  @primaryclanid = response["primaryclanid"]
  @timecreated = response["timecreated"]
  @personastateflags = response["personastateflags"]
  @loccountrycode = response["loccountrycode"]
  @locstatecode = response["locstatecode"]
  @loccityid = response["loccityid"]
end