steam-client 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,6 +2,7 @@ source "http://rubygems.org"
2
2
 
3
3
  gem 'rest-client', '1.6.7'
4
4
  gem 'crack', '0.3.1'
5
+ gem 'json', '1.7.5'
5
6
 
6
7
  group :test do
7
8
  gem 'rake', '0.9.2.2'
@@ -9,4 +10,4 @@ group :test do
9
10
  gem 'rspec-mocks', '2.12.0'
10
11
  gem 'webmock', '1.8.11'
11
12
  gem 'vcr', '2.3.0'
12
- end
13
+ end
@@ -4,6 +4,7 @@ GEM
4
4
  addressable (2.3.2)
5
5
  crack (0.3.1)
6
6
  diff-lcs (1.1.3)
7
+ json (1.7.5)
7
8
  mime-types (1.19)
8
9
  rake (0.9.2.2)
9
10
  rest-client (1.6.7)
@@ -26,6 +27,7 @@ PLATFORMS
26
27
 
27
28
  DEPENDENCIES
28
29
  crack (= 0.3.1)
30
+ json (= 1.7.5)
29
31
  rake (= 0.9.2.2)
30
32
  rest-client (= 1.6.7)
31
33
  rspec (= 2.12.0)
@@ -1,5 +1,6 @@
1
1
  require 'rest-client'
2
2
  require 'crack'
3
+ require 'json'
3
4
 
4
5
  module SteamClient
5
6
  class Client
@@ -9,41 +10,78 @@ module SteamClient
9
10
  def initialize(api_key = nil)
10
11
  @api_key = api_key
11
12
  end
13
+
14
+ def find_steam_id_by_name(name)
15
+ if not @api_key.nil?
16
+ url = "http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/?key=#{@api_key}&vanityurl=#{name}"
17
+ data = get_with_retries url
18
+ j = JSON.parse(data)
19
+ return j['response']['steamid']
20
+ end
21
+ end
12
22
 
13
23
  def find_profile_by_name(name)
14
- url = "http://steamcommunity.com/id/#{name}?xml=1"
15
- xml = get_with_retries url
16
- return Profile.from_xml(xml)
24
+ id = find_steam_id_by_name(name)
25
+ return find_profile_by_id(id)
17
26
  end
18
27
 
19
28
  def find_profile_by_id(id)
20
- url = "http://steamcommunity.com/profiles/#{id}?xml=1"
21
- xml = get_with_retries url
22
- return Profile.from_xml(xml)
29
+ url = ""
30
+ if not @api_key.nil?
31
+ url = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=#{@api_key}&steamids=#{id}"
32
+ data = get_with_retries url
33
+ return Profile.from_json(data)
34
+ else
35
+ url = "http://steamcommunity.com/profiles/#{id}?xml=1"
36
+ xml = get_with_retries url
37
+ return Profile.from_xml(xml)
38
+ end
23
39
  end
24
40
 
25
41
  def get_friends_from_profile(profile)
26
- url = "http://steamcommunity.com/profiles/#{profile.steamID64}/friends?xml=1"
42
+ friends = get_friends_from_id(profile.steamID64)
43
+ profile.friends = friends
44
+ return friends
45
+ end
46
+
47
+ def get_friends_from_id(id)
48
+ url = ""
49
+ if not @api_key.nil?
50
+ url = "http://api.steampowered.com/ISteamUser/GetFriendList/v0001/?key=#{@api_key}&steamid=#{id}&relationship=friend"
51
+ data = get_with_retries url
52
+ jFriends = JSON.parse(data)
53
+ friends = []
54
+ jFriends['friendslist']['friends'].each do |friend|
55
+ friends << Profile.new(friend['steamid'])
56
+ end
57
+ return friends
58
+ else
59
+ url = "http://steamcommunity.com/profiles/#{id}/friends?xml=1"
27
60
  xml = get_with_retries url
28
61
  hFriends = Crack::XML.parse xml
29
62
  friends = []
30
63
  hFriends['friendsList']['friends']['friend'].each do |friendID|
31
64
  friends << Profile.new(friendID)
32
65
  end
33
- profile.friends = friends
34
66
  return friends
67
+ end
35
68
  end
36
-
69
+
37
70
  def get_games_from_profile(profile)
38
- url = "http://steamcommunity.com/profiles/#{profile.steamID64}/games\?xml\=1"
39
- xml = get_with_retries url
40
- hGames = Crack::XML.parse xml
41
- games = []
42
- hGames['gamesList']['games']['game'].each do |game|
43
- games << Game.new(game)
44
- end
45
- profile.games = games
46
- return games
71
+ games = get_games_from_id(profile.steamID64)
72
+ profile.games = games
73
+ return games
74
+ end
75
+
76
+ def get_games_from_id(id)
77
+ url = "http://steamcommunity.com/profiles/#{id}/games\?tab=all&xml\=1"
78
+ xml = get_with_retries url
79
+ hGames = Crack::XML.parse xml
80
+ games = []
81
+ hGames['gamesList']['games']['game'].each do |game|
82
+ games << Game.new(game)
83
+ end
84
+ return games
47
85
  end
48
86
 
49
87
  def get_with_retries(url, retries = 10)
@@ -54,10 +92,11 @@ module SteamClient
54
92
  return resp
55
93
  rescue RestClient::ServiceUnavailable
56
94
  attempt += 1
95
+ sleep 0.5
57
96
  end
58
97
  end
59
98
 
60
- throw new RestClient::ServiceUnavailable
99
+ raise RestClient::ServiceUnavailable
61
100
  end
62
101
  end
63
102
  end
@@ -1,4 +1,5 @@
1
1
  require 'crack'
2
+ require 'json'
2
3
 
3
4
  module SteamClient
4
5
 
@@ -26,6 +27,32 @@ module SteamClient
26
27
  @games = []
27
28
  end
28
29
 
30
+ def self.from_json(json)
31
+ p = JSON.parse(json)
32
+
33
+ if p['response']['players'].empty?
34
+ raise SteamClient::Error::ProfileNotFound
35
+ end
36
+
37
+ player = p['response']['players'].first
38
+
39
+ profile = Profile.new
40
+ profile.steamID = player['personaname']
41
+ profile.steamID64 =player['steamid']
42
+ profile.avatarIcon = player['avatar']
43
+ profile.avatarMedium = player['avatarmedium']
44
+ profile.avatarFull = player['avatarfull']
45
+ profile.customURL = player['profileurl']
46
+ profile.hoursPlayed2Wk = 0.0
47
+ profile.location = "#{player['loccityid'] || ''} #{player['locstatecode'] || ''} #{player['loccountrycode']}".strip
48
+ profile.realname = player['realname']
49
+ profile.friends = []
50
+ profile.games = []
51
+ profile.onlineState = SteamClient::OnlineState::UNKNOWN
52
+
53
+ return profile
54
+ end
55
+
29
56
  def self.from_xml(xml)
30
57
  p = Crack::XML.parse(xml)
31
58
 
@@ -1,3 +1,3 @@
1
1
  module SteamClient
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -24,7 +24,17 @@ describe SteamClient::Client do
24
24
  profile.customURL.should match "robinwalker"
25
25
  end
26
26
  end
27
-
27
+
28
+ it "should get a profile without providing an API key" do
29
+ VCR.use_cassette('steam_profile_without_api_key') do
30
+ client = SteamClient::Client.new
31
+ profile = client.find_profile_by_id("76561197960435530")
32
+ profile.class.should == SteamClient::Profile
33
+ profile.steamID64.should match "76561197960435530"
34
+ profile.customURL.should match "robinwalker"
35
+ end
36
+ end
37
+
28
38
  it "should get a profile's friend list" do
29
39
  VCR.use_cassette('steam_profile_friends') do
30
40
  friends = @client.get_friends_from_profile(@profile)
@@ -33,11 +43,21 @@ describe SteamClient::Client do
33
43
  @profile.friends.empty?.should_not be true
34
44
  end
35
45
  end
46
+
47
+ it "should get a profile's friend list without providing an API key" do
48
+ VCR.use_cassette('steam_profile_friends_without_api_key') do
49
+ client = SteamClient::Client.new
50
+ friends = client.get_friends_from_profile(@profile)
51
+ friends.count.should eq(269)
52
+ friends.empty?.should_not be true
53
+ @profile.friends.empty?.should_not be true
54
+ end
55
+ end
36
56
 
37
57
  it "should get a profiles game list" do
38
58
  VCR.use_cassette('steam_profile_game_list') do
39
59
  games = @client.get_games_from_profile(@profile)
40
- games.count.should eq(2046)
60
+ games.count.should eq(2055)
41
61
  games.empty?.should_not be true
42
62
  @profile.games.empty?.should_not be true
43
63
  end
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://steamcommunity.com/profiles/1?xml=1
5
+ uri: http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=XXXXXXXXX&steamids=1
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -16,55 +16,19 @@ http_interactions:
16
16
  response:
17
17
  status:
18
18
  code: 200
19
- message: !binary |-
20
- T0s=
19
+ message: OK
21
20
  headers:
22
- !binary "U2VydmVy":
23
- - !binary |-
24
- QXBhY2hl
25
- !binary "U2V0LUNvb2tpZQ==":
26
- - !binary |-
27
- U3RlYW1fTGFuZ3VhZ2U9ZW5nbGlzaDsgZXhwaXJlcz1GcmksIDE1LURlYy0y
28
- MDE3IDAyOjM3OjM1IEdNVDsgcGF0aD0v
29
- - !binary |-
30
- c2Vzc2lvbmlkPU1qQTJNalEwTURReE5BJTNEJTNEOyBwYXRoPS8=
31
- !binary "RXhwaXJlcw==":
32
- - !binary |-
33
- U3VuLCAxNiBEZWMgMjAxMiAwMzozNzozNSBHTVQ=
34
- !binary "Q29udGVudC1FbmNvZGluZw==":
35
- - !binary |-
36
- Z3ppcA==
37
- !binary "VmFyeQ==":
38
- - !binary |-
39
- QWNjZXB0LUVuY29kaW5n
40
- !binary "Q29udGVudC1UeXBl":
41
- - !binary |-
42
- dGV4dC94bWw=
43
- !binary "Q29udGVudC1MZW5ndGg=":
44
- - !binary |-
45
- MTQ3
46
- !binary "RGF0ZQ==":
47
- - !binary |-
48
- U3VuLCAxNiBEZWMgMjAxMiAwMjozNzozNSBHTVQ=
49
- !binary "WC1WYXJuaXNo":
50
- - !binary |-
51
- MTcwOTk0ODYwMg==
52
- !binary "QWdl":
53
- - !binary |-
54
- MA==
55
- !binary "Vmlh":
56
- - !binary |-
57
- MS4xIHZhcm5pc2g=
58
- !binary "Q29ubmVjdGlvbg==":
59
- - !binary |-
60
- a2VlcC1hbGl2ZQ==
21
+ Date:
22
+ - Sat, 22 Dec 2012 07:19:42 GMT
23
+ Expires:
24
+ - Sat, 22 Dec 2012 07:19:42 GMT
25
+ Content-Type:
26
+ - application/json; charset=UTF-8
27
+ Content-Length:
28
+ - '44'
61
29
  body:
62
- encoding: ASCII-8BIT
63
- string: !binary |-
64
- H4sIAAAAAAAAAzzMMQ7CMAwAwK8Y77SwMSSpKhAvCFPVoSQuRErtKG4R/J4F
65
- 8YA7072XDC+qmoQtHpsDAnGQmPhh8eav+xOCrhPHKQuTxQ8pds5U0iKs5AzV
66
- KtWZ3XC+9L4f/JNAC4U0J4pQqswpEwTZcgSWFe4Es2wcm3F0pv3h9t99AQAA
67
- //8DAMxsI/+QAAAA
30
+ encoding: US-ASCII
31
+ string: ! "{\n\t\"response\": {\n\t\t\"players\": [\n\n\t\t]\n\t\t\n\t}\n}"
68
32
  http_version:
69
- recorded_at: Sun, 16 Dec 2012 02:37:34 GMT
33
+ recorded_at: Sat, 22 Dec 2012 07:19:26 GMT
70
34
  recorded_with: VCR 2.3.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://steamcommunity.com/id/robinwalker?xml=1
5
+ uri: http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/?key=XXXXXXXXX&vanityurl=robinwalker
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -16,109 +16,61 @@ http_interactions:
16
16
  response:
17
17
  status:
18
18
  code: 200
19
- message: !binary |-
20
- T0s=
19
+ message: OK
21
20
  headers:
22
- !binary "U2VydmVy":
23
- - !binary |-
24
- QXBhY2hl
25
- !binary "U2V0LUNvb2tpZQ==":
26
- - !binary |-
27
- U3RlYW1fTGFuZ3VhZ2U9ZW5nbGlzaDsgZXhwaXJlcz1GcmksIDE1LURlYy0y
28
- MDE3IDAxOjQ0OjM1IEdNVDsgcGF0aD0v
29
- - !binary |-
30
- c2Vzc2lvbmlkPU1UWTFOek0zTnpRNU9RJTNEJTNEOyBwYXRoPS8=
31
- !binary "RXhwaXJlcw==":
32
- - !binary |-
33
- U3VuLCAxNiBEZWMgMjAxMiAwMjo0NDozNSBHTVQ=
34
- !binary "Q29udGVudC1FbmNvZGluZw==":
35
- - !binary |-
36
- Z3ppcA==
37
- !binary "VmFyeQ==":
38
- - !binary |-
39
- QWNjZXB0LUVuY29kaW5n
40
- !binary "Q29udGVudC1UeXBl":
41
- - !binary |-
42
- dGV4dC94bWw7IGNoYXJzZXQ9dXRmLTg=
43
- !binary "Q29udGVudC1MZW5ndGg=":
44
- - !binary |-
45
- MjYwMA==
46
- !binary "RGF0ZQ==":
47
- - !binary |-
48
- U3VuLCAxNiBEZWMgMjAxMiAwMTo0NDozNyBHTVQ=
49
- !binary "WC1WYXJuaXNo":
50
- - !binary |-
51
- MTUyNzk3MjU2MQ==
52
- !binary "QWdl":
53
- - !binary |-
54
- MA==
55
- !binary "Vmlh":
56
- - !binary |-
57
- MS4xIHZhcm5pc2g=
58
- !binary "Q29ubmVjdGlvbg==":
59
- - !binary |-
60
- a2VlcC1hbGl2ZQ==
21
+ Date:
22
+ - Sat, 22 Dec 2012 07:18:56 GMT
23
+ Expires:
24
+ - Sat, 22 Dec 2012 07:18:56 GMT
25
+ Content-Type:
26
+ - application/json; charset=UTF-8
27
+ Content-Length:
28
+ - '70'
61
29
  body:
62
- encoding: ASCII-8BIT
63
- string: !binary |-
64
- H4sIAAAAAAAAA8Rby24jNxZdO0D+gfGmZwC3VHwViw23Aqc7HXjQj6Af6UUQ
65
- BKwiKVVcKgrFkj3azWJ+YrbzAfMR8yn5krmkZL3s2FJGpXYLbRV5eXlInvvg
66
- lXz+7d/HFbo2jS9d/fwU95JTZOrC6bIePj/99PHV0+wU+VbVWlWuNs9PZ8af
67
- fjs4nzTOlpUZfP3VyblvjRpfvkzZQKQ8xVgKmSaMck6T8/6qc010cP7Nzy9e
68
- Xny8+Pm9y8v6l18GS8Eo5uqqrM2HVrVm4KwND+f99ca5Lnj3xnivhmal8LXy
69
- LXoXRZ8hxtGo8WeIoXFZe6SGbjHV2sigatKU16qYzXVPpnlVFuf9jcYgdV36
70
- Mi+rsl200fP+dlMQU9eqVc1l4eoVqlHbTp71+2OjS9WLK524G9MY3SvceL50
71
- eDOe1qCpPwfQL8cAz/fn6nzfYnhpnSYKZ/BDC2UzopMit0VhTapylSiLBSWa
72
- 9X6bDONC16CskL0BENPxl8L26zhOvwVxgWkF8tW0qr4YRAuTbwGMeCIJVPGd
73
- qmujB0Du1UPoahulDTzPqfDWBdJutgWp0r8ux2Vr9EVRuGndBj132oJgMfWt
74
- G396/3q1D02wlhtVXZkmYluJhAFjM85N86GsCzP4YCZtfESYnCGSJEDW9f6l
75
- Mb5XLZj6AN+a6uI59I/ctPE/VmpmNPl8NRCiJ877W41Rzigd7G2FM4JbNgeZ
76
- yhWgeN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DH+wXmrlpmOwsvHlS
110
- VQCrDcqGzgG4y/ZJyMhuXFPpAGzi/OJ7BWVI2iBTHjlI32LWNK0hS84rgz6X
111
- tXY3Ho5Vl0U4P1hdE77JAdscjyvMFkaEqUfqOh5nbuJ2hUkCRS4tquH8gkSh
112
- 6vn5QW4Jq69cOB4Yocomd5CW927Xtf37xwr2EVYTEremzGE34rhwEHDoi4Pz
113
- 4XcDaOCIvmtgXX6EhtMZ+ksAOIJ8NNoECC52e+zqKzPzf+2hF4Ar4Auf6QJV
114
- FrxDKp+vEphZha98eDgrFTgWm+JCdKnrJ+GwTYWacjiK1ARV394i/5sLx+20
115
- ms03KkoG3IGD0DF2TeNuvjleJLQ5vJhQnGmcSkOspCo3VCWCcHDpRZGRXCqS
116
- YkO/QCTcA92Xi4T7gNw9ElKSUHqoXFQKsks8TBknj4XEh4LiQ2GR07thcUvx
117
- n9YtGOtKN5xC0pluznFXuikg70q3zLDsSDdnWdoVT4SUuKP9TsHSeUf7nVJG
118
- so5wZ0nK047OUoZLeSe4aQKuUTLejW6eUsppN7pTuBPdcz04jG7CRNKRbikS
119
- ck+t8hC6MU44FZ34b9AtOO2Ig6A7k1lHe8IymfBO7JJiDu6EiY50Z+BkO9oT
120
- gTFEzI50QzBOu9ItJGN363GH0E2YhA3vJO5QIqkkHdklkYJnshsfC8ZDuOjG
121
- D1KaSSkexb14Cp8Lhe/0z/9s4X8AAAD//wMAwNSEpPcwAAA=
30
+ encoding: US-ASCII
31
+ string: ! "{\n\t\"response\": {\n\t\t\"steamid\": \"76561197960435530\",\n\t\t\"success\":
32
+ 1\n\t}\n}"
33
+ http_version:
34
+ recorded_at: Sat, 22 Dec 2012 07:18:40 GMT
35
+ - request:
36
+ method: get
37
+ uri: http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=XXXXXXXXX&steamids=76561197960435530
38
+ body:
39
+ encoding: US-ASCII
40
+ string: ''
41
+ headers:
42
+ Accept:
43
+ - ! '*/*; q=0.5, application/xml'
44
+ Accept-Encoding:
45
+ - gzip, deflate
46
+ User-Agent:
47
+ - Ruby
48
+ response:
49
+ status:
50
+ code: 200
51
+ message: OK
52
+ headers:
53
+ Date:
54
+ - Sat, 22 Dec 2012 07:18:56 GMT
55
+ Expires:
56
+ - Sat, 22 Dec 2012 07:18:56 GMT
57
+ Content-Type:
58
+ - application/json; charset=UTF-8
59
+ Content-Length:
60
+ - '1032'
61
+ body:
62
+ encoding: US-ASCII
63
+ string: ! "{\n\t\"response\": {\n\t\t\"players\": [\n\t\t\t{\n\t\t\t\t\"steamid\":
64
+ \"76561197960435530\",\n\t\t\t\t\"communityvisibilitystate\": 3,\n\t\t\t\t\"profilestate\":
65
+ 1,\n\t\t\t\t\"personaname\": \"Robin\",\n\t\t\t\t\"lastlogoff\": 1356088564,\n\t\t\t\t\"profileurl\":
66
+ \"http://steamcommunity.com/id/robinwalker/\",\n\t\t\t\t\"avatar\": \"http://media.steampowered.com/steamcommunity/public/images/avatars/f1/f1dd60a188883caf82d0cbfccfe6aba0af1732d4.jpg\",\n\t\t\t\t\"avatarmedium\":
67
+ \"http://media.steampowered.com/steamcommunity/public/images/avatars/f1/f1dd60a188883caf82d0cbfccfe6aba0af1732d4_medium.jpg\",\n\t\t\t\t\"avatarfull\":
68
+ \"http://media.steampowered.com/steamcommunity/public/images/avatars/f1/f1dd60a188883caf82d0cbfccfe6aba0af1732d4_full.jpg\",\n\t\t\t\t\"personastate\":
69
+ 1,\n\t\t\t\t\"realname\": \"Robin Walker\",\n\t\t\t\t\"primaryclanid\": \"103582791429521412\",\n\t\t\t\t\"timecreated\":
70
+ 1063407589,\n\t\t\t\t\"gameserverip\": \"208.64.201.57:27019\",\n\t\t\t\t\"gameextrainfo\":
71
+ \"Dota 2\",\n\t\t\t\t\"gameid\": \"570\",\n\t\t\t\t\"gameserversteamid\":
72
+ \"90085752034797568\",\n\t\t\t\t\"loccountrycode\": \"US\",\n\t\t\t\t\"locstatecode\":
73
+ \"WA\",\n\t\t\t\t\"loccityid\": 3961\n\t\t\t}\n\t\t]\n\t\t\n\t}\n}"
122
74
  http_version:
123
- recorded_at: Sun, 16 Dec 2012 01:44:37 GMT
75
+ recorded_at: Sat, 22 Dec 2012 07:18:40 GMT
124
76
  recorded_with: VCR 2.3.0