Class: Rito::FeaturedGames

Inherits:
ApiBase
  • Object
show all
Defined in:
lib/rito/featured_games.rb

Defined Under Namespace

Classes: BannedChampion, FeaturedGameInfo, Observer, Participant

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiBase

#attributes=, call_api, from_list, from_map, from_map_of_lists

Constructor Details

#initialize(attributes = {}) ⇒ FeaturedGames


5
6
7
8
# File 'lib/rito/featured_games.rb', line 5

def initialize(attributes = {})
	self.gameList = Rito::FeaturedGames::FeaturedGameInfo.from_list(attributes.delete('gameList')) if attributes['gameList']
	super
end

Instance Attribute Details

#clientRefreshIntervalObject

Returns the value of attribute clientRefreshInterval


3
4
5
# File 'lib/rito/featured_games.rb', line 3

def clientRefreshInterval
  @clientRefreshInterval
end

#gameListObject

Returns the value of attribute gameList


3
4
5
# File 'lib/rito/featured_games.rb', line 3

def gameList
  @gameList
end

Class Method Details

.allObject


11
12
13
14
15
# File 'lib/rito/featured_games.rb', line 11

def all
	url = featured_games_url
	response = call_api(url)
	new(response)
end

17
18
19
# File 'lib/rito/featured_games.rb', line 17

def featured_games_url
	Rito.root_url + "/observer-mode/rest/featured"
end