steam_api 0.1.0 → 0.1.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 +4 -4
- data/lib/steam_api/urls.rb +15 -15
- data/lib/steam_api/version.rb +1 -1
- data/steam_api-0.1.0.gem +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e49ca45fa897940f9ba1b2fa376bb32aadfa5e9
|
4
|
+
data.tar.gz: a39577601f217480d3992ab6a83d79cd0af97e12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ec35f4677b872d351336155e478017f3208545dd96868a926b2970d982edef77aa8b7445affe546b1ae406118e1d21efe8ad5953732b01a4809befd6b29a4a0
|
7
|
+
data.tar.gz: 2324ac8acd535d34647568adda132f6a6870511ba11e582bae770978befef1da4eec1b8bb0fe3ec5f608aa01208adc67ce03dfc15e5cdf90de931b17e6b9e272
|
data/lib/steam_api/urls.rb
CHANGED
@@ -7,49 +7,49 @@ module SteamApi
|
|
7
7
|
# @return [String] An interpolated string for the API call to get a users friends list.
|
8
8
|
# It contains the users ID, but not the API key
|
9
9
|
def self.friend_list(id, relationship)
|
10
|
-
"http://API.steampowered.com/ISteamUser/GetFriendList/v0001/?steamid
|
10
|
+
"http://API.steampowered.com/ISteamUser/GetFriendList/v0001/?steamid=#{id}&relationship=#{relationship}"
|
11
11
|
end
|
12
12
|
|
13
13
|
# A helper method which gets the base url for API call to get info about player bans
|
14
14
|
# @param ids [String] A string containing a single steam_id_64 or multiple comma delimited steam_id_64s
|
15
15
|
# @return [String] An interpolated string for the API call (without the API key)
|
16
16
|
def self.player_bans(ids)
|
17
|
-
"http://api.steampowered.com/ISteamUser/GetPlayerBans/v1?&steamids
|
17
|
+
"http://api.steampowered.com/ISteamUser/GetPlayerBans/v1?&steamids=#{ids}"
|
18
18
|
end
|
19
19
|
|
20
20
|
# A helper method which gets the base url for API call to get info about player summaries
|
21
21
|
# @param ids [String] A string containing a single steam_id_64 or multiple comma delimited steam_id_64s
|
22
22
|
# @return [String] An interpolated string for the API call (without the API key)
|
23
23
|
def self.player_summaries(ids)
|
24
|
-
"http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?&steamids
|
24
|
+
"http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?&steamids=#{ids}"
|
25
25
|
end
|
26
26
|
|
27
27
|
# A helper method which gets the base url for API call to get info about a players groups
|
28
28
|
# @param id [String] A single users steam_id_64
|
29
29
|
# @return [String] An interpolated string for the API call (without the API key)
|
30
30
|
def self.user_group_list(id)
|
31
|
-
"http://api.steampowered.com/ISteamUser/GetUserGroupList/v1?steamid
|
31
|
+
"http://api.steampowered.com/ISteamUser/GetUserGroupList/v1?steamid=#{id}"
|
32
32
|
end
|
33
33
|
|
34
34
|
# A helper method which gets the base url for API call to get a users steam_id_64
|
35
35
|
# @param vanity_url [String] A single users vanity url
|
36
36
|
# @return [String] An interpolated string for the API call (without the API key)
|
37
37
|
def self.vanity_url(vanity_url)
|
38
|
-
"http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/?&vanityurl
|
38
|
+
"http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/?&vanityurl=#{vanity_url}"
|
39
39
|
end
|
40
40
|
|
41
41
|
# A helper method which gets the base url for API call to get global achievement percentages for app
|
42
42
|
# @param id [String] A single Steam app id
|
43
43
|
# @return [String] An interpolated string for the API call (without the API key)
|
44
44
|
def self.global_achievement_percentages_for_app(id)
|
45
|
-
"http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0002/?&gameid
|
45
|
+
"http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0002/?&gameid=#{id}"
|
46
46
|
end
|
47
47
|
|
48
48
|
# A helper method which gets the base url for API call to get current number of players for an app
|
49
49
|
# @param id [String] A single Steam app id
|
50
50
|
# @return [String] An interpolated string for the API call (without the API key)
|
51
51
|
def self.number_of_current_players(id)
|
52
|
-
"http://api.steampowered.com/ISteamUserStats/GetNumberOfCurrentPlayers/v1/?appid
|
52
|
+
"http://api.steampowered.com/ISteamUserStats/GetNumberOfCurrentPlayers/v1/?appid=#{id}"
|
53
53
|
end
|
54
54
|
|
55
55
|
# A helper method which gets the base url for API call to get achievement completion for a player and app
|
@@ -57,14 +57,14 @@ module SteamApi
|
|
57
57
|
# @param appid [String] A single Steam app id
|
58
58
|
# @return [String] An interpolated string for the API call (without the API key)
|
59
59
|
def self.player_achievements(userid, appid)
|
60
|
-
"http://api.steampowered.com/ISteamUserStats/GetPlayerAchievements/v1/?&steamid
|
60
|
+
"http://api.steampowered.com/ISteamUserStats/GetPlayerAchievements/v1/?&steamid=#{userid}&appid=#{appid}"
|
61
61
|
end
|
62
62
|
|
63
63
|
# A helper method which gets the base url for API call to get a schema for a game
|
64
64
|
# @param appid [String] A single game steam id
|
65
65
|
# @return [String] An interpolated string for the API call (without the API key)
|
66
66
|
def self.schema_for_game(appid)
|
67
|
-
"http://api.steampowered.com/ISteamUserStats/GetSchemaForGame/v2/?&appid
|
67
|
+
"http://api.steampowered.com/ISteamUserStats/GetSchemaForGame/v2/?&appid=#{appid}"
|
68
68
|
end
|
69
69
|
|
70
70
|
# A helper method which gets the base url for API call to get users stats for a game
|
@@ -72,7 +72,7 @@ module SteamApi
|
|
72
72
|
# @param appid [String] A single game steam id
|
73
73
|
# @return [String] An interpolated string for the API call (without the API key)
|
74
74
|
def self.user_stats_for_game(userid, appid)
|
75
|
-
"http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/?&appid
|
75
|
+
"http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/?&appid=#{appid}&steamid=#{userid}"
|
76
76
|
end
|
77
77
|
|
78
78
|
# A helper method which gets the base url for API call to get info about users recently played games
|
@@ -80,7 +80,7 @@ module SteamApi
|
|
80
80
|
# @param count [Fixnum] The max number of games to find
|
81
81
|
# @return [String] An interpolated string for the API call (without the API key)
|
82
82
|
def self.recently_played_games(userid, count)
|
83
|
-
"http://api.steampowered.com/IPlayerService/GetRecentlyPlayedGames/v1?&steamid
|
83
|
+
"http://api.steampowered.com/IPlayerService/GetRecentlyPlayedGames/v1?&steamid=#{userid}&count=#{count}"
|
84
84
|
end
|
85
85
|
|
86
86
|
# A helper method which gets the base url for API call to get a list of users owned games
|
@@ -89,28 +89,28 @@ module SteamApi
|
|
89
89
|
# @param include_played_free_games [Boolean] (Optional) A boolean indicating whether to include free to play games
|
90
90
|
# @return [String] An interpolated string for the API call (without the API key)
|
91
91
|
def self.owned_games(userid, include_appinfo, include_played_free_games)
|
92
|
-
"http://api.steampowered.com/IPlayerService/GetOwnedGames/v1?&steamid
|
92
|
+
"http://api.steampowered.com/IPlayerService/GetOwnedGames/v1?&steamid=#{userid}&include_played_free_games=#{include_played_free_games}&include_appinfo=#{include_appinfo}"
|
93
93
|
end
|
94
94
|
|
95
95
|
# A helper method which gets the base url for API call to get a users Steam level
|
96
96
|
# @param userid [String] A single user Steam id 64
|
97
97
|
# @return [String] An interpolated string for the API call (without the API key)
|
98
98
|
def self.steam_level(userid)
|
99
|
-
"http://api.steampowered.com/IPlayerService/GetSteamLevel/v1?&steamid
|
99
|
+
"http://api.steampowered.com/IPlayerService/GetSteamLevel/v1?&steamid=#{userid}"
|
100
100
|
end
|
101
101
|
|
102
102
|
# A helper method which gets the base url for API call to get users badges
|
103
103
|
# @param userid [String] A single user Steam id 64
|
104
104
|
# @return [String] An interpolated string for the API call (without the API key)
|
105
105
|
def self.badges(userid)
|
106
|
-
"http://api.steampowered.com/IPlayerService/GetBadges/v1?&steamid
|
106
|
+
"http://api.steampowered.com/IPlayerService/GetBadges/v1?&steamid=#{userid}"
|
107
107
|
end
|
108
108
|
|
109
109
|
# A helper method which gets the base url for API call to get users badges
|
110
110
|
# @param userid [String] A single user Steam id 64
|
111
111
|
# @return [String] An interpolated string for the API call (without the API key)
|
112
112
|
def self.community_badge_progress(userid, badge_id)
|
113
|
-
"http://api.steampowered.com/IPlayerService/GetCommunityBadgeProgress/v1?&steamid
|
113
|
+
"http://api.steampowered.com/IPlayerService/GetCommunityBadgeProgress/v1?&steamid=#{userid}&badgeid=#{badge_id}"
|
114
114
|
end
|
115
115
|
end
|
116
116
|
end
|
data/lib/steam_api/version.rb
CHANGED
data/steam_api-0.1.0.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: steam_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yusef Ouda
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- spec/steam_api/urls_spec.rb
|
182
182
|
- spec/steam_api/version_spec.rb
|
183
183
|
- spec/steam_api_spec.rb
|
184
|
+
- steam_api-0.1.0.gem
|
184
185
|
- steam_api.gemspec
|
185
186
|
homepage: http://github.com/YusefOuda/steam-api
|
186
187
|
licenses:
|