Class: Skyhook::User

Inherits:
Core show all
Defined in:
lib/skyhook/user.rb

Constant Summary

Constants inherited from Configuration

Configuration::BASE, Configuration::FORMATS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Core

api_reference, get_method, method_missing

Methods inherited from Configuration

configure

Constructor Details

#initialize(steamid) ⇒ User

Returns a new instance of User.



10
11
12
# File 'lib/skyhook/user.rb', line 10

def initialize( steamid )
  set_attributes Skyhook::Core::ISteamUser.user_summaries( steamid ).first
end

Instance Attribute Details

#avatarObject (readonly)

Returns the value of attribute avatar.



5
6
7
# File 'lib/skyhook/user.rb', line 5

def avatar
  @avatar
end

#avatarfullObject (readonly)

Returns the value of attribute avatarfull.



5
6
7
# File 'lib/skyhook/user.rb', line 5

def avatarfull
  @avatarfull
end

#avatarmediumObject (readonly)

Returns the value of attribute avatarmedium.



5
6
7
# File 'lib/skyhook/user.rb', line 5

def avatarmedium
  @avatarmedium
end

#commentpermissionObject (readonly)

Returns the value of attribute commentpermission.



6
7
8
# File 'lib/skyhook/user.rb', line 6

def commentpermission
  @commentpermission
end

#communityvisibilitystateObject (readonly)

Returns the value of attribute communityvisibilitystate.



6
7
8
# File 'lib/skyhook/user.rb', line 6

def communityvisibilitystate
  @communityvisibilitystate
end

#lastlogoffObject (readonly)

Returns the value of attribute lastlogoff.



6
7
8
# File 'lib/skyhook/user.rb', line 6

def lastlogoff
  @lastlogoff
end

#loccityidObject (readonly)

Returns the value of attribute loccityid.



8
9
10
# File 'lib/skyhook/user.rb', line 8

def loccityid
  @loccityid
end

#loccountrycodeObject (readonly)

Returns the value of attribute loccountrycode.



8
9
10
# File 'lib/skyhook/user.rb', line 8

def loccountrycode
  @loccountrycode
end

#locstatecodeObject (readonly)

Returns the value of attribute locstatecode.



8
9
10
# File 'lib/skyhook/user.rb', line 8

def locstatecode
  @locstatecode
end

#personanameObject (readonly)

Returns the value of attribute personaname.



4
5
6
# File 'lib/skyhook/user.rb', line 4

def personaname
  @personaname
end

#personastateObject (readonly)

Returns the value of attribute personastate.



7
8
9
# File 'lib/skyhook/user.rb', line 7

def personastate
  @personastate
end

#personastateflagsObject (readonly)

Returns the value of attribute personastateflags.



7
8
9
# File 'lib/skyhook/user.rb', line 7

def personastateflags
  @personastateflags
end

#primaryclanidObject (readonly)

Returns the value of attribute primaryclanid.



7
8
9
# File 'lib/skyhook/user.rb', line 7

def primaryclanid
  @primaryclanid
end

#profilestateObject (readonly)

Returns the value of attribute profilestate.



6
7
8
# File 'lib/skyhook/user.rb', line 6

def profilestate
  @profilestate
end

#profileurlObject (readonly)

Returns the value of attribute profileurl.



4
5
6
# File 'lib/skyhook/user.rb', line 4

def profileurl
  @profileurl
end

#realnameObject (readonly)

Returns the value of attribute realname.



4
5
6
# File 'lib/skyhook/user.rb', line 4

def realname
  @realname
end

#steamidObject (readonly)

Returns the value of attribute steamid.



4
5
6
# File 'lib/skyhook/user.rb', line 4

def steamid
  @steamid
end

#timecreatedObject (readonly)

Returns the value of attribute timecreated.



7
8
9
# File 'lib/skyhook/user.rb', line 7

def timecreated
  @timecreated
end

Instance Method Details

#friends(relationship = :all) ⇒ Object



18
19
20
# File 'lib/skyhook/user.rb', line 18

def friends( relationship = :all )
  @friends ||= Skyhook::Core::ISteamUser.friend_list @steamid, relationship.to_s
end

#game(appid) ⇒ Object



14
15
16
# File 'lib/skyhook/user.rb', line 14

def game( appid )
  Skyhook::Game.new( appid, self )
end