Skip to content

mapteo/ruby-lol

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby-lol

Gem Version Coverage Status Build Status Code Climate Dependency Status

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">

    # Available Requests
    client.champion
    # => Lol::ChampionRequest
    client.game
    # => Lol::GameRequest
    client.league
    # => Lol::LeagueRequest
    client.stats
    # => Lol::StatsRequest
    client.summoner
    # => Lol::SummonerRequest
    client.team
    # => Lol::TeamRequest

    # Available methods for each request type
    client.champion.get
    # => Lol::Champion

    client.game.recent(summoner_id)
    # => Lol::Game

    client.league.get(summoner_id)
    # => Lol::League

    client.stats.summary(summoner_id)
    # => Lol::SummaryStats
    client.stats.ranked(summoner_id)
    # => Lol::RankedStats

    client.summoner.masteries(summoner_id)
    # => [Lol::Masterypage]
    client.summoner.runes(summoner_id)
    # => [Lol::Runepage]
    client.summoner.by_name(name)
    # => Lol::Summoner
    client.summoner.get(summoner_id)
    # => Lol::Summoner
    client.summoner.name(summoner_ids)
    # => [Hash]

    client.team.get(summoner_id)
    # => Array

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Changelog

  • 0.9.5 Fixed documentation
  • 0.9.4 Completed support for updated API

About

Ruby wrapper to Riot Games API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published