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/league_module'
require 'sightstone/modules/stats_module'
require 'sightstone/modules/team_module'
class Sightstone
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)
@api_key = api_key
@@ -19,6 +20,7 @@ class Sightstone
@game = GameModule.new(self)
@league = LeagueModule.new(self)
@stats = StatsModule.new(self)
@team = TeamModule.new(self)
end
end

View File

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