Class: OpenDotaApi::Player
Constant Summary
collapse
- ENDPOINT =
'players'.freeze
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Entity
define_adder, #initialize
included
Class Method Details
.instantiate(_ = nil) ⇒ Object
9
10
11
|
# File 'lib/open_dota_api/player.rb', line 9
def self.instantiate(_ = nil)
raise NotImplementedError
end
|
Instance Method Details
#account_id ⇒ Object
22
23
24
|
# File 'lib/open_dota_api/player.rb', line 22
def account_id
data&.dig('profile', 'account_id')
end
|
#avatar ⇒ Object
38
39
40
|
# File 'lib/open_dota_api/player.rb', line 38
def avatar
data&.dig('profile', 'avatar')
end
|
#avatar_full ⇒ Object
54
55
56
|
# File 'lib/open_dota_api/player.rb', line 54
def avatar_full
data&.dig('profile', 'avatarfull')
end
|
#avatar_medium ⇒ Object
50
51
52
|
# File 'lib/open_dota_api/player.rb', line 50
def avatar_medium
data&.dig('profile', 'avatarmedium')
end
|
#cheese ⇒ Object
34
35
36
|
# File 'lib/open_dota_api/player.rb', line 34
def cheese
data&.dig('profile', 'cheese')
end
|
#contributor? ⇒ Boolean
42
43
44
|
# File 'lib/open_dota_api/player.rb', line 42
def contributor?
data&.dig('profile', 'is_contributor')
end
|
#last_login ⇒ Object
62
63
64
|
# File 'lib/open_dota_api/player.rb', line 62
def last_login
Time.parse(data&.dig('profile', 'last_login'))
end
|
#loc_country_code ⇒ Object
66
67
68
|
# File 'lib/open_dota_api/player.rb', line 66
def loc_country_code
data&.dig('profile', 'loccountrycode')
end
|
#mmr_estimate ⇒ Object
13
14
15
|
# File 'lib/open_dota_api/player.rb', line 13
def mmr_estimate
data&.dig('mmr_estimate', 'estimate')
end
|
#name ⇒ Object
26
27
28
|
# File 'lib/open_dota_api/player.rb', line 26
def name
data&.dig('profile', 'name')
end
|
#persona_name ⇒ Object
18
19
20
|
# File 'lib/open_dota_api/player.rb', line 18
def persona_name
data&.dig('profile', 'personaname')
end
|
#plus ⇒ Object
30
31
32
|
# File 'lib/open_dota_api/player.rb', line 30
def plus
data&.dig('profile', 'plus')
end
|
#profile_url ⇒ Object
58
59
60
|
# File 'lib/open_dota_api/player.rb', line 58
def profile_url
data&.dig('profile', 'profileurl')
end
|
#steam_id ⇒ Object
46
47
48
|
# File 'lib/open_dota_api/player.rb', line 46
def steam_id
data&.dig('profile', 'steamid')
end
|