class Lolxin::LolStaticData
Attributes
endpoint[RW]
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
# File lib/lolxin/api/lol_static_data.rb, line 5 def initialize(options = {}) super @endpoint = "static-data/%{version}" % {version: @version} end
Public Instance Methods
champions(champion_id = nil)
click to toggle source
TODO: get Faraday block to work with optional params
# File lib/lolxin/api/lol_static_data.rb, line 11 def champions(champion_id = nil) url = if champion_id "#{endpoint}/champions/#{champion_id}" else "#{endpoint}/champions" end conn.get(url) end
items(item_id = nil)
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 21 def items(item_id = nil) url = if item_id "#{endpoint}/items/#{item_id}" else "#{endpoint}/items" end conn.get(url) end
language_strings()
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 31 def language_strings url = "#{endpoint}/language-strings" conn.get(url) end
languages()
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 36 def languages url = "#{endpoint}/languages" conn.get(url) end
maps()
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 41 def maps url = "#{endpoint}/maps" conn.get(url) end
masteries(mastery_id = nil)
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 46 def masteries(mastery_id = nil) url = if mastery_id "#{endpoint}/masteries/#{mastery_id}" else "#{endpoint}/masteries" end conn.get(url) end
profile_icons()
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 56 def profile_icons url = "#{endpoint}/profile-icons" conn.get(url) end
realms()
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 61 def realms url = "#{endpoint}/realms" conn.get(url) end
reforged_rune_paths(path_id = nil)
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 66 def reforged_rune_paths(path_id = nil) url = if path_id "#{endpoint}/reforged-rune-paths/#{path_id}" else "#{endpoint}/reforged-rune-paths" end conn.get(url) end
reforged_runes(reforged_rune_id = nil)
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 76 def reforged_runes(reforged_rune_id = nil) url = if reforged_rune_id "#{endpoint}/reforged-runes/#{reforged_rune_id}" else "#{endpoint}/reforged-runes" end conn.get(url) end
runes(rune_id = nil)
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 86 def runes(rune_id = nil) url = if rune_id "#{endpoint}/runes/#{rune_id}" else "#{endpoint}/runes" end conn.get(url) end
summoner_spells(spell_id = nil)
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 96 def summoner_spells(spell_id = nil) url = if spell_id "#{endpoint}/summoner-spells/#{spell_id}" else "#{endpoint}/summoner-spells" end conn.get(url) end
tarball_links()
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 106 def tarball_links url = "#{endpoint}/tarball-links" conn.get(url) end
versions()
click to toggle source
# File lib/lolxin/api/lol_static_data.rb, line 111 def versions url = "#{endpoint}/versions" conn.get(url) end