Class: OpenDoto::API::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/open_doto/api/player.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Player

Returns a new instance of Player.



7
8
9
# File 'lib/open_doto/api/player.rb', line 7

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



6
7
8
# File 'lib/open_doto/api/player.rb', line 6

def response
  @response
end

Instance Method Details

#account_idObject



15
16
17
# File 'lib/open_doto/api/player.rb', line 15

def 
  profile['account_id']
end

#avatar(size = nil) ⇒ Object



19
20
21
# File 'lib/open_doto/api/player.rb', line 19

def avatar(size = nil)
  avatar_for(size)
end

#cheeseObject



23
24
25
# File 'lib/open_doto/api/player.rb', line 23

def cheese
  profile['cheese']
end

#last_login_atObject



27
28
29
# File 'lib/open_doto/api/player.rb', line 27

def 
  profile['last_login']
end

#location_country_codeObject



31
32
33
# File 'lib/open_doto/api/player.rb', line 31

def location_country_code
  profile['loccountrycode']
end

#nameObject



35
36
37
# File 'lib/open_doto/api/player.rb', line 35

def name
  profile['name']
end

#party_mmrObject



39
40
41
# File 'lib/open_doto/api/player.rb', line 39

def party_mmr
  response['competitive_rank']
end

#persona_nameObject



43
44
45
# File 'lib/open_doto/api/player.rb', line 43

def persona_name
  profile['personaname']
end

#profile_urlObject



47
48
49
# File 'lib/open_doto/api/player.rb', line 47

def profile_url
  profile['profileurl']
end

#solo_mmrObject



51
52
53
# File 'lib/open_doto/api/player.rb', line 51

def solo_mmr
  response['solo_competitive_rank']
end

#steam_idObject



55
56
57
# File 'lib/open_doto/api/player.rb', line 55

def steam_id
  profile['steamid']
end

#untracked_atObject



59
60
61
# File 'lib/open_doto/api/player.rb', line 59

def untracked_at
  response['tracked_until']
end

#valid?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/open_doto/api/player.rb', line 11

def valid?
  !.nil?
end