This commit is contained in:
danijoo
2013-12-13 19:10:36 +01:00
parent 83c04d8ffb
commit ebc571749e
2 changed files with 6 additions and 4 deletions

View File

@@ -5,10 +5,11 @@ require 'sightstone/modules/summoner_module'
require 'sightstone/modules/game_module' require 'sightstone/modules/game_module'
require 'sightstone/modules/league_module' require 'sightstone/modules/league_module'
require 'sightstone/modules/stats_module' require 'sightstone/modules/stats_module'
require 'sightstone/modules/team_module'
class Sightstone class Sightstone
attr_accessor :region, :api_key attr_accessor :region, :api_key
attr_accessor :summoner, :champion, :game, :league, :stats attr_accessor :summoner, :champion, :game, :league, :stats, :team
def initialize(api_key, region) def initialize(api_key, region)
@api_key = api_key @api_key = api_key
@@ -19,6 +20,7 @@ class Sightstone
@game = GameModule.new(self) @game = GameModule.new(self)
@league = LeagueModule.new(self) @league = LeagueModule.new(self)
@stats = StatsModule.new(self) @stats = StatsModule.new(self)
@team = TeamModule.new(self)
end end
end end

View File

@@ -2,13 +2,13 @@
class Summoner class Summoner
attr_accessor :name, :id, :profile_icon_id, :revision_date, :level attr_accessor :name, :id, :profileIconId, :revisionDate, :level
def initialize(data) def initialize(data)
@name = data['name'] @name = data['name']
@id = data['id'] @id = data['id']
@profile_icon_id = data['profileIconId'] @profileIconId = data['profileIconId']
@revision_date = data['revisionDate'] @revisionDate = data['revisionDate']
@level = data['summonerLevel'] @level = data['summonerLevel']
end end