steam-trade 0.2.5 → 0.2.6

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: fb2fe8bf2ef0d5c63b41474667de2564ddc82fe8
4
- data.tar.gz: 5dbbf87b851ea7360b5357edc546d6ddf8acfbd7
3
+ metadata.gz: 3c105188711518ed0d412ef93372b6278dda0711
4
+ data.tar.gz: ee53ccd2d956653b8feaa7d987e1e02a52e633cd
5
5
  SHA512:
6
- metadata.gz: 25a47166533837065dc83d06ea36b310a12266f67ee2070b3c0ca5fc9d8b46a64433cf2f73c38c7ea800a78da5b5aa651065f814f0382d54b9d5c3769646700c
7
- data.tar.gz: c05e29ebd2bbdc68fda220d4ea2850ad41b0aacaae84f3d6eab8d106ca274b4c060b579369ba7a4e8c38f092b35ad8e20c76b63c64a5deb9f3160fdf3c3386f1
6
+ metadata.gz: 2ed0991794e895c8379dc79242f2a9ce4b2b5888cf4c7438b5ca5f495ab9b047435b656ae1fd7ab5d9b5ba45918cf221722d0f61a79c7476e2448b3af86a30e8
7
+ data.tar.gz: bebff57108e5806dea9887356da7cce764945300ab64d1f7abf5dde4a45fe312d65e468af24edf7d4a760b46e6420fc09925d948df6a1f71b310e4fbba745426
data/README.md CHANGED
@@ -10,6 +10,9 @@ this gem is primarly for trading cards, tho can be used to CS:GO and other games
10
10
 
11
11
  # Changelog
12
12
  ```
13
+ 0.2.6:
14
+ - hotfix
15
+
13
16
  0.2.5:
14
17
  - added finish_queue() to collect Steam Sale Trading Cards
15
18
  - hotfix
@@ -108,16 +108,22 @@ module LoginCommands
108
108
  @session.cookie_jar << cookie
109
109
  @loggedin = true
110
110
  begin
111
- @api_key = Nokogiri::HTML(@session.get("https://steamcommunity.com/dev/apikey").content).css('#bodyContents_ex').css('p').first.text.sub('Key: ','')
111
+ text = Nokogiri::HTML(@session.get("https://steamcommunity.com/dev/apikey").content).css('#bodyContents_ex').css('p').first.text.sub('Key: ','')
112
+ if text.include?('Registering for a Steam Web API Key will enable you to access many Steam features from your own website') == false
113
+ @api_key = text
114
+ end
112
115
  rescue
113
116
  output "Could not retrieve api_key"
114
117
  end
115
- data = get_player_summaries(@steamid)
116
- data.each { |element|
117
- if element["steamid"].to_s == @steamid.to_s
118
- @persona = element["personaname"]
119
- end
120
- }
118
+
119
+ if !@api_key.nil?
120
+ data = get_player_summaries(@steamid) if !@api_key.nil?
121
+ data.each { |element|
122
+ if element["steamid"].to_s == @steamid.to_s
123
+ @persona = element["personaname"]
124
+ end
125
+ }
126
+ end
121
127
  output "logged in as #{@persona}"
122
128
  output "your steamid is #{@steamid}"
123
129
  output "loaded API_KEY : #{@api_key}" if !@api_key.nil?
@@ -1,4 +1,4 @@
1
1
  module Meta
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  GEM_NAME = "steam-trade"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steam-trade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - OmG3r
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-21 00:00:00.000000000 Z
11
+ date: 2018-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler