dota_api_wrapper 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -3
- data/lib/dota_api_wrapper/player.rb +7 -0
- data/lib/dota_api_wrapper/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8aaef0467fb32a6013f11cbce10ff606b1b3788
|
4
|
+
data.tar.gz: d851bc5b7d3f16f281dd26144ab512374a064896
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc64411c79a637fe1cbb9eb3d6be6d7cbf7c01c7edff3705148d9fd8c2f44e2bf5577800fc746d6bc6f7f332402a155d458ddb23d52d4823a6524027e3edb55e
|
7
|
+
data.tar.gz: fd9b87dc5a38b827e59f0e87cb54561653d81f6a89af985cd7c8df9a9b7ecc82924e4997ea7924069fba17cff0afa3ea4858437a4879dd6d469d2152b949db27
|
data/README.md
CHANGED
@@ -35,13 +35,25 @@ This gem will read your key from an environment variable, so once you have it yo
|
|
35
35
|
|
36
36
|
`heroes = DotaApiWrapper::Resource.retrieve_heroes`
|
37
37
|
|
38
|
-
|
38
|
+
heroes[56] => {
|
39
|
+
"name" => "npc_dota_hero_clinkz",
|
40
|
+
"id" = >56,
|
41
|
+
"localized_name" => "Clinkz"
|
42
|
+
}
|
39
43
|
|
40
44
|
### Items
|
41
45
|
|
42
|
-
`items = DotaApiWrapper::Resource.retrieve_items
|
46
|
+
`items = DotaApiWrapper::Resource.retrieve_items`
|
43
47
|
|
44
|
-
|
48
|
+
items[25] => {
|
49
|
+
"id" => 25,
|
50
|
+
"name" => "item_gloves",
|
51
|
+
"cost" => 500,
|
52
|
+
"secret_shop" => 0,
|
53
|
+
"side_shop" => 1,
|
54
|
+
"recipe" => 0,
|
55
|
+
"localized_name" => "Gloves of Haste"
|
56
|
+
}
|
45
57
|
|
46
58
|
### Steam User's Summary
|
47
59
|
|
@@ -17,6 +17,13 @@ module DotaApiWrapper
|
|
17
17
|
player_info.key?(name.to_s) ? player_info[name.to_s] : super
|
18
18
|
end
|
19
19
|
|
20
|
+
# Converts 64bits steam id to 32bits
|
21
|
+
def account_id
|
22
|
+
return if player_info['steamid'].nil?
|
23
|
+
|
24
|
+
player_info['steamid'].to_i - 76561197960265728
|
25
|
+
end
|
26
|
+
|
20
27
|
def player_info
|
21
28
|
@player_info ||= retrieve_info
|
22
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dota_api_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project:
|
168
|
-
rubygems_version: 2.6.
|
168
|
+
rubygems_version: 2.6.4
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: Wrapper for Valve's DOTA 2 API.
|