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 +4 -4
- data/README.md +3 -0
- data/lib/LoginExecutor.rb +13 -7
- data/lib/meta/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c105188711518ed0d412ef93372b6278dda0711
|
4
|
+
data.tar.gz: ee53ccd2d956653b8feaa7d987e1e02a52e633cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ed0991794e895c8379dc79242f2a9ce4b2b5888cf4c7438b5ca5f495ab9b047435b656ae1fd7ab5d9b5ba45918cf221722d0f61a79c7476e2448b3af86a30e8
|
7
|
+
data.tar.gz: bebff57108e5806dea9887356da7cce764945300ab64d1f7abf5dde4a45fe312d65e468af24edf7d4a760b46e6420fc09925d948df6a1f71b310e4fbba745426
|
data/README.md
CHANGED
data/lib/LoginExecutor.rb
CHANGED
@@ -108,16 +108,22 @@ module LoginCommands
|
|
108
108
|
@session.cookie_jar << cookie
|
109
109
|
@loggedin = true
|
110
110
|
begin
|
111
|
-
|
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
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
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?
|
data/lib/meta/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|