ruby-lol
ruby-lol is a wrapper to the Riot Games API.
Installation
Add this line to your application's Gemfile:
gem 'ruby-lol'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ruby-lol
Usage
require 'lol'
# defaults to euw
client = Lol::Client.new "my_api_key"
# => <Lol::Client:0x007fd09d1abb00 @api_key="my_api_key", @region="euw">
# na
na_client = Lol::Client.new "my_api_key", :region => "na"
# => <Lol::Client:0x007fd09d1abb00 @api_key="my_api_key", @region="na">
# gets all champions
champions = client.champion
# => Array of Lol::Champion
# let's play a bit, who is free to play?
client.champion.select {|c| c.free_to_play }.map {|c| c.name}
# => %w(Aatrox Cassiopeia Lux Malphite MissFortune MonkeyKing Nautilus Sivir Talon Taric)
# it's time to fetch some of my games, isn't it?
games = client.game my_summoner_id
# => Array of Lol::Game
# let's get one game and look into it
game = games.first
# who was I playing with?
game.fellow_players
# => Array of Lol::Player
# gimme some stats!
game.statistics
# => Array of Lol::RawStatistic
# let's get some info about my Leagues now
leagues = client.league my_summoner_id
# => Array of Lol::League
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request



