module Taric::Operation::Champion
Constants
- CHAMPIONS
- CHAMPION_BASE_URL
- CHAMPION_BY_ID
Public Instance Methods
champion(id:)
click to toggle source
Returns champion data by id.
@see developer.riotgames.com/api/methods#!/958/3289 @param id [Fixnum] id of champion @return [Hash] of champion data
@example
champion = client.champion(id: 266)
# File lib/taric/operation/champion.rb, line 36 def champion(id:) response_for CHAMPION_BY_ID, id: id end
champions(free_to_play: nil)
click to toggle source
Returns champion data.
@see developer.riotgames.com/api/methods#!/958/3290 @param free_to_play [Boolean] optional, nil returns all, true or false to filter if they're free to play or not @return [Hash] embedding [Array] of champions keyed off of “champions”
@example
all_champions = client.champions["champions"] free_champions = client.champions(free_to_play: true)["champions"] nonfree_champions = client.champions(free_to_play: false)["champions"]
# File lib/taric/operation/champion.rb, line 24 def champions(free_to_play: nil) response_for CHAMPIONS, freeToPlay: free_to_play end