steam_api 0.1.0
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 +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +2 -0
- data/lib/steam_api/client.rb +47 -0
- data/lib/steam_api/i_player_service.rb +65 -0
- data/lib/steam_api/i_steam_user.rb +53 -0
- data/lib/steam_api/i_steam_user_stats.rb +52 -0
- data/lib/steam_api/urls.rb +116 -0
- data/lib/steam_api/version.rb +4 -0
- data/lib/steam_api.rb +14 -0
- data/spec/fixtures/vcr_cassettes/client_get.yml +38 -0
- data/spec/fixtures/vcr_cassettes/get_badges.yml +77 -0
- data/spec/fixtures/vcr_cassettes/get_badges_private.yml +38 -0
- data/spec/fixtures/vcr_cassettes/get_community_badge_progress.yml +64 -0
- data/spec/fixtures/vcr_cassettes/get_community_badge_progress_private.yml +64 -0
- data/spec/fixtures/vcr_cassettes/get_community_badge_progress_specific_badge.yml +64 -0
- data/spec/fixtures/vcr_cassettes/get_friend_list_not_found.yml +46 -0
- data/spec/fixtures/vcr_cassettes/get_friend_list_private.yml +39 -0
- data/spec/fixtures/vcr_cassettes/get_friend_list_public.yml +92 -0
- data/spec/fixtures/vcr_cassettes/get_global_achievement_percentages_for_app.yml +230 -0
- data/spec/fixtures/vcr_cassettes/get_global_achievement_percentages_for_app_not_found.yml +39 -0
- data/spec/fixtures/vcr_cassettes/get_number_of_current_players.yml +37 -0
- data/spec/fixtures/vcr_cassettes/get_number_of_current_players_not_found.yml +36 -0
- data/spec/fixtures/vcr_cassettes/get_owned_games.yml +261 -0
- data/spec/fixtures/vcr_cassettes/get_owned_games_all_args.yml +1302 -0
- data/spec/fixtures/vcr_cassettes/get_owned_games_include_appinfo.yml +1286 -0
- data/spec/fixtures/vcr_cassettes/get_owned_games_include_played_free_games.yml +264 -0
- data/spec/fixtures/vcr_cassettes/get_owned_games_private.yml +38 -0
- data/spec/fixtures/vcr_cassettes/get_player_achievements.yml +205 -0
- data/spec/fixtures/vcr_cassettes/get_player_achievements_game_no_stats.yml +37 -0
- data/spec/fixtures/vcr_cassettes/get_player_achievements_private.yml +37 -0
- data/spec/fixtures/vcr_cassettes/get_player_achievements_user_not_found.yml +37 -0
- data/spec/fixtures/vcr_cassettes/get_player_bans_not_found.yml +36 -0
- data/spec/fixtures/vcr_cassettes/get_player_bans_public.yml +38 -0
- data/spec/fixtures/vcr_cassettes/get_player_bans_public_private.yml +40 -0
- data/spec/fixtures/vcr_cassettes/get_player_summaries_multiple.yml +50 -0
- data/spec/fixtures/vcr_cassettes/get_player_summaries_not_found.yml +36 -0
- data/spec/fixtures/vcr_cassettes/get_player_summaries_single.yml +44 -0
- data/spec/fixtures/vcr_cassettes/get_recently_played_games.yml +47 -0
- data/spec/fixtures/vcr_cassettes/get_recently_played_games_count.yml +44 -0
- data/spec/fixtures/vcr_cassettes/get_recently_played_games_private.yml +38 -0
- data/spec/fixtures/vcr_cassettes/get_schema_for_game.yml +1205 -0
- data/spec/fixtures/vcr_cassettes/get_schema_for_game_not_found.yml +39 -0
- data/spec/fixtures/vcr_cassettes/get_steam_level.yml +38 -0
- data/spec/fixtures/vcr_cassettes/get_steam_level_private.yml +38 -0
- data/spec/fixtures/vcr_cassettes/get_user_group_list_not_found.yml +46 -0
- data/spec/fixtures/vcr_cassettes/get_user_group_list_private.yml +37 -0
- data/spec/fixtures/vcr_cassettes/get_user_group_list_public.yml +39 -0
- data/spec/fixtures/vcr_cassettes/get_user_stats_for_game.yml +407 -0
- data/spec/fixtures/vcr_cassettes/get_user_stats_for_game_game_not_found.yml +39 -0
- data/spec/fixtures/vcr_cassettes/get_user_stats_for_game_private.yml +46 -0
- data/spec/fixtures/vcr_cassettes/get_user_stats_for_game_user_not_found.yml +39 -0
- data/spec/fixtures/vcr_cassettes/resolve_vanity_url_not_found.yml +36 -0
- data/spec/fixtures/vcr_cassettes/resolve_vanity_url_private.yml +37 -0
- data/spec/fixtures/vcr_cassettes/resolve_vanity_url_public.yml +37 -0
- data/spec/spec_helper.rb +98 -0
- data/spec/steam_api/client_spec.rb +30 -0
- data/spec/steam_api/i_player_service_spec.rb +127 -0
- data/spec/steam_api/i_steam_user_spec.rb +163 -0
- data/spec/steam_api/i_steam_user_stats_spec.rb +143 -0
- data/spec/steam_api/urls_spec.rb +36 -0
- data/spec/steam_api/version_spec.rb +7 -0
- data/spec/steam_api_spec.rb +0 -0
- data/steam_api.gemspec +28 -0
- metadata +263 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.steampowered.com/ISteamUserStats/GetSchemaForGame/v2/?appid=12345&key=<API_KEY>
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- api.steampowered.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 400
|
21
|
+
message: Bad Request
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Thu, 30 Oct 2014 17:15:48 GMT
|
25
|
+
Expires:
|
26
|
+
- Thu, 30 Oct 2014 17:15:48 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=UTF-8
|
29
|
+
Content-Length:
|
30
|
+
- '4'
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
|
36
|
+
}
|
37
|
+
http_version:
|
38
|
+
recorded_at: Thu, 30 Oct 2014 17:15:49 GMT
|
39
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.steampowered.com/IPlayerService/GetSteamLevel/v1?key=<API_KEY>&steamid=76561197995163285
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- api.steampowered.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
X-Eresult:
|
24
|
+
- '1'
|
25
|
+
Date:
|
26
|
+
- Thu, 30 Oct 2014 17:15:28 GMT
|
27
|
+
Expires:
|
28
|
+
- Thu, 30 Oct 2014 17:15:28 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=UTF-8
|
31
|
+
Content-Length:
|
32
|
+
- '42'
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: "{\n\t\"response\": {\n\t\t\"player_level\": 20\n\t}\n}"
|
36
|
+
http_version:
|
37
|
+
recorded_at: Thu, 30 Oct 2014 17:15:30 GMT
|
38
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.steampowered.com/IPlayerService/GetSteamLevel/v1?key=<API_KEY>&steamid=76561198002572492
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- api.steampowered.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
X-Eresult:
|
24
|
+
- '1'
|
25
|
+
Date:
|
26
|
+
- Thu, 30 Oct 2014 17:15:28 GMT
|
27
|
+
Expires:
|
28
|
+
- Thu, 30 Oct 2014 17:15:28 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=UTF-8
|
31
|
+
Content-Length:
|
32
|
+
- '42'
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: "{\n\t\"response\": {\n\t\t\"player_level\": 20\n\t}\n}"
|
36
|
+
http_version:
|
37
|
+
recorded_at: Thu, 30 Oct 2014 17:15:30 GMT
|
38
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.steampowered.com/ISteamUser/GetUserGroupList/v1?key=<API_KEY>&steamid=67734658237465083465238745693
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- api.steampowered.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 500
|
21
|
+
message: Internal Server Error
|
22
|
+
headers:
|
23
|
+
Content-Length:
|
24
|
+
- '116'
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=UTF-8
|
27
|
+
Date:
|
28
|
+
- Thu, 30 Oct 2014 17:15:38 GMT
|
29
|
+
Expires:
|
30
|
+
- Mon, 26 Jul 1997 05:00:00 GMT
|
31
|
+
Cache-Control:
|
32
|
+
- no-cache,must-revalidate
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |-
|
36
|
+
<html>
|
37
|
+
<head>
|
38
|
+
<title>500 Internal Server Error</title>
|
39
|
+
</head>
|
40
|
+
<body>
|
41
|
+
<h1>Internal Server Error</h1>
|
42
|
+
</body>
|
43
|
+
</html>
|
44
|
+
http_version:
|
45
|
+
recorded_at: Thu, 30 Oct 2014 17:15:40 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.steampowered.com/ISteamUser/GetUserGroupList/v1?key=<API_KEY>&steamid=76561198002572492
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- api.steampowered.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 403
|
21
|
+
message: Forbidden
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Thu, 30 Oct 2014 17:15:38 GMT
|
25
|
+
Expires:
|
26
|
+
- Thu, 30 Oct 2014 17:15:38 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=UTF-8
|
29
|
+
Content-Length:
|
30
|
+
- '70'
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: "{\n\t\"response\": {\n\t\t\"success\": false,\n\t\t\"error\": \"Private
|
34
|
+
profile\"\n\t}\n}"
|
35
|
+
http_version:
|
36
|
+
recorded_at: Thu, 30 Oct 2014 17:15:40 GMT
|
37
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.steampowered.com/ISteamUser/GetUserGroupList/v1?key=<API_KEY>&steamid=76561197995163285
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- api.steampowered.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Thu, 30 Oct 2014 17:15:37 GMT
|
25
|
+
Expires:
|
26
|
+
- Thu, 30 Oct 2014 17:15:37 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=UTF-8
|
29
|
+
Content-Length:
|
30
|
+
- '252'
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: "{\n\t\"response\": {\n\t\t\"success\": true,\n\t\t\"groups\": [\n\t\t\t{\n\t\t\t\t\"gid\":
|
34
|
+
\"4458711\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"gid\": \"5115552\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"gid\":
|
35
|
+
\"5151157\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"gid\": \"5274870\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"gid\":
|
36
|
+
\"5590657\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"gid\": \"6473357\"\n\t\t\t}\n\t\t]\n\t\t\n\t}\n}"
|
37
|
+
http_version:
|
38
|
+
recorded_at: Thu, 30 Oct 2014 17:15:39 GMT
|
39
|
+
recorded_with: VCR 2.9.3
|