Module: Elvarg::Hiscores
- Defined in:
- lib/hiscores/skill.rb,
lib/hiscores/player.rb,
lib/hiscores/hiscores.rb
Overview
:nodoc:
Defined Under Namespace
Constant Summary collapse
- MODES =
Represents different modes base URL’s on the OldSchool RuneScape Hiscores.
{ default: 'https://secure.runescape.com/m=hiscore_oldschool/', ironman: 'http://services.runescape.com/m=hiscore_oldschool_ironman/', ultimate: 'http://services.runescape.com/m=hiscore_oldschool_ultimate/', hardcore: 'http://services.runescape.com/m=hiscore_oldschool_hardcore_ironman/', deadman: 'http://services.runescape.com/m=hiscore_oldschool_deadman/', seasonal: 'http://services.runescape.com/m=hiscore_oldschool_seasonal/', tournament: 'http://services.runescape.com/m=hiscore_oldschool_tournament/' }.freeze
- ENDPOINTS =
Represents different endpoints on the Hiscores.
{ stats: 'index_lite.ws?player=', scores: 'overall.ws?' }.freeze
Class Method Summary collapse
-
.search_for(username, mode = :default) ⇒ String
Searches for a particular player on the Hiscores and grabs data about the player.
Class Method Details
.search_for(username, mode = :default) ⇒ String
Searches for a particular player on the Hiscores and grabs data about the player.
32 33 34 |
# File 'lib/hiscores/hiscores.rb', line 32 def self.search_for(username, mode = :default) open(MODES[mode] + ENDPOINTS[:stats] + username, &:read) end |