Module: Rito

Defined in:
lib/rito.rb,
lib/rito/base.rb,
lib/rito/shard.rb,
lib/rito/match.rb,
lib/rito/league.rb,
lib/rito/request.rb,
lib/rito/api_base.rb,
lib/rito/champion.rb,
lib/rito/stats_old.rb,
lib/rito/match/rune.rb,
lib/rito/match/team.rb,
lib/rito/match/frame.rb,
lib/rito/match/event.rb,
lib/rito/current_game.rb,
lib/rito/league/entry.rb,
lib/rito/match/player.rb,
lib/rito/recent_games.rb,
lib/rito/shard/service.rb,
lib/rito/match/mastery.rb,
lib/rito/shard/message.rb,
lib/rito/shard/incident.rb,
lib/rito/featured_games.rb,
lib/rito/match/position.rb,
lib/rito/match/timeline.rb,
lib/rito/error/rito_error.rb,
lib/rito/current_game/rune.rb,
lib/rito/recent_games/game.rb,
lib/rito/shard/translation.rb,
lib/rito/match_history_old.rb,
lib/rito/match/participant.rb,
lib/rito/error/region_error.rb,
lib/rito/league/mini_series.rb,
lib/rito/error/version_error.rb,
lib/rito/recent_games/player.rb,
lib/rito/current_game/mastery.rb,
lib/rito/match/banned_champion.rb,
lib/rito/current_game/observer.rb,
lib/rito/recent_games/raw_stats.rb,
lib/rito/match/participant_stats.rb,
lib/rito/match/participant_frame.rb,
lib/rito/featured_games/observer.rb,
lib/rito/current_game/participant.rb,
lib/rito/featured_games/participant.rb,
lib/rito/match/participant_identity.rb,
lib/rito/match/participant_timeline.rb,
lib/rito/current_game/banned_champion.rb,
lib/rito/featured_games/banned_champion.rb,
lib/rito/match/participant_timeline_data.rb,
lib/rito/featured_games/featured_game_info.rb

Defined Under Namespace

Modules: Error Classes: ApiBase, Base, Champion, CurrentGame, FeaturedGames, League, Match, MatchHistoryOld, RecentGames, Request, Shard, StatsOld

Constant Summary collapse

PLATFORM_MAP =
{
	'br'   => 'BR1',
   'eune' => 'EUN1',
  	'euw'  => 'EUW1',
 	'kr'   => 'KR',
	'lan'  => 'LA1',
	'las'  => 'LA2',
	'na'   => 'NA1',
	'oce'  => 'OC1',
	'ru'   => 'RU',
	'tr'   => 'TR1'
}

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_key=(value) ⇒ Object

Sets the attribute api_key

Parameters:

  • value

    the value to set the attribute api_key to.


74
75
76
# File 'lib/rito.rb', line 74

def api_key=(value)
  @api_key = value
end

Class Method Details

.default_paramsObject


89
90
91
# File 'lib/rito.rb', line 89

def self.default_params
	{ 'api_key' => api_key }
end

.platformObject


93
94
95
# File 'lib/rito.rb', line 93

def self.platform
	Rito::PLATFORM_MAP[region]
end

.regionObject


81
82
83
# File 'lib/rito.rb', line 81

def self.region
	@region ||= ENV['REGION'].downcase
end

.region=(region) ⇒ Object


77
78
79
# File 'lib/rito.rb', line 77

def self.region=(region)
	@region = region.downcase
end

.root_urlObject


85
86
87
# File 'lib/rito.rb', line 85

def self.root_url
	"https://#{region}.api.pvp.net"
end