steam_stats 0.0.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b81709fab244b097f8bd693192319e6dacbfd30f
4
- data.tar.gz: df9bddd533e5cb741f657da6020b85d6ccb767ce
3
+ metadata.gz: 25b79e7443f8ece324f953fb46a4664c5294bb84
4
+ data.tar.gz: 962c7d93c5570606d757b78bdbb4187eeb1c7cdf
5
5
  SHA512:
6
- metadata.gz: 084a01c5ff321fd9ed044e39d921045c8de845fa8faa7f870a9e9145a3f11c18994b0f87be28e74a2d911ab9ab1aaa507ee1c639a8a62c36de9ba1a63ad385d0
7
- data.tar.gz: d81ea93fe0427380bac6168508d05a28dcdff6a86405ff3182bf3be3be028f6b5a3c7955e3101245e77a1284592ae977e68adf8f030ec08a1027d18c084d2800
6
+ metadata.gz: d3a48eb67949fc935e46ce45022ea0383060744ca08bf2d76673fbf6c5d0130a5e00b95a605c61328fed0543d8f00d3c111fc65df2409c34486fe014bb427792
7
+ data.tar.gz: b8ea45b38e9f9d78af5082465339b5f8b3b112eeab33a1ddcbf3628e53e3e6527c3a9e13972dc4eef45310b46ea3df4317aa3c302edda561352ce11011a7226e
data/README.md CHANGED
@@ -25,14 +25,16 @@ Or install it yourself as:
25
25
 
26
26
  ## Usage
27
27
 
28
- 1. Find user by ID (you have to get it by yourself by looking at URL in browser)
28
+ 1. Find user by ID or your customized address nick, check it by going to your profile page at [steamcommunity.com](http://steamcommunity.com/)
29
29
  ```ruby
30
- user = Steam.user '76561198041851025'
30
+ user = SteamStats::User.new '76561198041851025'
31
+ # or
32
+ user = SteamStats::User.new 'pewdie'
31
33
  ```
32
34
 
33
35
  2. Get array of played games
34
36
  ```ruby
35
- games = user.games #=> [{ name: 'Team Fortress 2', played_hours: 93 }, { name: 'Sniper Elite V2', played_hours: 2.4 }]
37
+ games = user.games #=> [{ name: 'Team Fortress 2', played_hours: 93 }, { name: 'Sniper Elite V2', played_hours: 2.4 }, ...]
36
38
  ```
37
39
 
38
40
  3. And now you have your stats, have fun with it!
@@ -26,7 +26,7 @@ module SteamStats
26
26
  @name = @user_page.css('.actual_persona_name')[0].text
27
27
  @real_name = @user_page.css('.header_real_name.ellipsis bdi')[0].text
28
28
  @avatar = @user_page.css('.playerAvatar img')[0]['src']
29
- @country = @user_page.css('.profile_flag')[0]['src'][-6..-5].upcase
29
+ @country = @user_page.css('.profile_flag')[0]['src'][-6..-5].upcase rescue nil
30
30
  @level = @user_page.css('.persona_name .friendPlayerLevelNum').text.to_i
31
31
 
32
32
  if @user_page.css('.profile_in_game_header').nil?
@@ -1,3 +1,3 @@
1
1
  module SteamStats
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steam_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Zbudniewek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-03 00:00:00.000000000 Z
11
+ date: 2015-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler