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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fecc47c82194f8463fc05272fb7a313ccb866ae9
4
- data.tar.gz: e81fb8f619ac86e0614114f014aad024303c55e0
3
+ metadata.gz: c8aaef0467fb32a6013f11cbce10ff606b1b3788
4
+ data.tar.gz: d851bc5b7d3f16f281dd26144ab512374a064896
5
5
  SHA512:
6
- metadata.gz: 014817570948143b31089182cc33ca9aa15bbdbd22f5c5a9c06a61be4cd48e85bc87d45dc9fb5153e171a74cf331f6689d0f751b8a14e8cb2100d8608fc0f296
7
- data.tar.gz: 04f522074fd4ccd9a3375e38ff2a410930c29e23016388f8396e9891e3c46a8655c33497421c63db1e8c6129c79e372bce0747aa4eadc9dad1fdabf33a2b36d2
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
- `heroes[56] => {"name"=>"npc_dota_hero_clinkz", "id"=>56, "localized_name"=>"Clinkz"}`
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
- `items[25] => {"id"=>25, "name"=>"item_gloves", "cost"=>500, "secret_shop"=>0, "side_shop"=>1, "recipe"=>0, "localized_name"=>"Gloves of Haste"}`
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
@@ -1,3 +1,3 @@
1
1
  module DotaApiWrapper
2
- VERSION = '0.2.2'.freeze
2
+ VERSION = '0.2.3'.freeze
3
3
  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.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-04-09 00:00:00.000000000 Z
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.2
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.