Skip to content
This repository was archived by the owner on Sep 19, 2018. It is now read-only.

Commit 6319fe6

Browse files
committed
add links to RLS docs on every endpoint, closes #5
1 parent 5423182 commit 6319fe6

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

lib/rls/api.rb

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ module API
1515
# The base URL of the RocketLeagueStats API
1616
APIBASE = 'https://api.rocketleaguestats.com/v1/'
1717

18-
# Retrieve a single player
18+
# Retrieve a single player.
19+
# [API docs for this method](http://documentation.rocketleaguestats.com/#single-player)
1920
# @param id [String, Integer] The unique identifier:
2021
# Steam 64 ID / PSN Username / Xbox GamerTag or XUID
2122
# @param platform [Platform, Integer] The platform to use
@@ -36,7 +37,8 @@ def player(id, platform = Platform::Steam)
3637
Player.new(response)
3738
end
3839

39-
# Retrieves a batch of up to 10 players at a time from different platforms
40+
# Retrieves a batch of up to 10 players at a time from different platforms.
41+
# [API docs for this method](http://documentation.rocketleaguestats.com/#batch-players)
4042
# @example Retrieve a batch of players from different platforms
4143
# client.players(
4244
# 76561198033338223, 1,
@@ -64,6 +66,7 @@ def players(*request_data)
6466

6567
# Searches RLS's database for players matching a given display name.
6668
# The response is paginated.
69+
# [API docs for this method](http://documentation.rocketleaguestats.com/#search-players)
6770
# @example Retrieve the results, one page at a time
6871
# results = client.search('player')
6972
# results.players #=> first page
@@ -90,7 +93,8 @@ def search(display_name, page = 0)
9093
SearchResults.new(self, response, display_name)
9194
end
9295

93-
# Retrieve the different platforms unless they've already been cached
96+
# Retrieve the different platforms unless they've already been cached.
97+
# [API docs for this method](http://documentation.rocketleaguestats.com/#platforms)
9498
# @param renew [true, false] Ignore the cache and make a new request
9599
# @return [Array<Platform>] An array of platform objects
96100
def platforms(renew = false)
@@ -107,7 +111,8 @@ def platforms(renew = false)
107111
end
108112
end
109113

110-
# Retrieve season information
114+
# Retrieve season information.
115+
# [API docs for this method](http://documentation.rocketleaguestats.com/#seasons)
111116
# @param renew [true, false] Ignore the cache and make a new request
112117
# @return [Hash<Integer => Season] The seasons by ID
113118
def seasons(renew = false)
@@ -124,7 +129,8 @@ def seasons(renew = false)
124129
end
125130
end
126131

127-
# Retrieve the current season's tiers
132+
# Retrieve the current season's tiers.
133+
# [API docs for this method](http://documentation.rocketleaguestats.com/#tiers)
128134
# @param renew [true, false] Ignore the cache and make a new request
129135
# @return [Hash<Integer => Tier] The tiers by ID
130136
def tiers(renew = false)
@@ -141,7 +147,8 @@ def tiers(renew = false)
141147
end
142148
end
143149

144-
# Retrieve the current playlists
150+
# Retrieve the current playlists.
151+
# [API docs for this method](http://documentation.rocketleaguestats.com/#playlists)
145152
# @param renew [true, false] Ignore the cache and make a new request
146153
# @return [Hash<Integer => Playlist] The playlist by ID
147154
def playlists(renew = false)
@@ -158,7 +165,8 @@ def playlists(renew = false)
158165
end
159166
end
160167

161-
# Returns the top 100 players for the current season on a particular playlist
168+
# Returns the top 100 players for the current season on a particular playlist.
169+
# [API docs for this method](http://documentation.rocketleaguestats.com/#ranked-leaderboard)
162170
# @param playlist_id [Integer]
163171
# @return [Array<Player>]
164172
def ranked_leaderboard(playlist_id)
@@ -177,7 +185,8 @@ def ranked_leaderboard(playlist_id)
177185
# Valid stat types for the leaderboard/stat endpoint
178186
VALID_STAT_TYPE = %i[wins goals mvps saves shots assists].freeze
179187

180-
# Returns the top 100 players for the current season by a particular stat
188+
# Returns the top 100 players for the current season by a particular stat.
189+
# [API docs for this method](http://documentation.rocketleaguestats.com/#stat-leaderboard)
181190
# @param type [Symbol, String]
182191
# @return [Array<Player>]
183192
# @raise [ArgumentError] if an unsupported type is specified

0 commit comments

Comments
 (0)