Project

riot_api

0.01
No commit activity in last 3 years
No release in over 3 years
A Ruby gem for the Riot Games API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.7.0
~> 1.3.0
~> 2.1.0
~> 4.0.1
~> 10.1.0
~> 0.9.3
~> 2.0
~> 2.4

Runtime

~> 0.8.7
~> 1.8.1
~> 0.4.0
~> 1.0.1
 Project Readme

Riot API

Gem Version Coverage Status Build Status Dependency Status

A Ruby wrapper around connecting to the Riot API

Early days yet, but trying to make it as modular as possible 🐱

Installation

Add this line to your application's Gemfile:

gem 'riot_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install riot_api

Usage:

First, you'll need to go to http://developer.riotgames.com/ and get an API key.

require 'riot_api'

# Create Instace of the API
ra = RiotApi::API.new :api_key => 'API_KEY_HERE', :region => 'euw', :debug => true

# Search by Summoner name
summoner_details = ra.summoner.name('Best Lux EUW')
#<Hashie::Rash id=44600324 name="Best Lux EUW" profile_icon_id=7 revision_date=1375116256000 revision_date_str="07/29/2013 04:44 PM UTC" summoner_level=6>

summoner.name # => "Best Lux EUW"

Methods

RiotApi::API
  #summoner
    #name(summoner_name)
      should return information from a given summoner name
    #id(summoner_name)
      should return information from a given summoner id
    #names(summoner_name_1, summoner_name_2)
      should return an array of summoners with name set
  #stats
    #ranked(summoner_name)
      should return ranked information from a given summoner name
    #summary(summoner_name)
      should return summary information from a given summoner id
  #champions
    #list
      should return a list of all champions
    #free
      should return a list of all free champions
  #game
    #recent(summoner_name)
      should return a list of recent games played from a given summoner id
  #league
    #by_summoner(summoner_name)
      should return leagues data from a given summoner id
  #team
    #by_summoner(summoner_id)
      should return team data from a given summoner id

ChangeLog / History / Releases

see the CHANGELOG.md file.

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

Testing

bundle install

If adding new test:

RECORDING=1 RIOT_API_KEY=your-api-key rspec

If running existing tests:

rspec

Contributors

For more information and a complete list see the contributor page on GitHub.

License

MIT

Thanks

  • @rmoriz - For the excellent digital_ocean gem, which I used as a framework to setup this gem! 👍