lolxin 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.0
4
+ - 2.2.0
5
+ - 2.1.0
6
+
7
+ addons:
8
+ code_climate:
9
+ repo_token: 759ca8ab90af179e38b43faf1f62f60e14e30b47e818052654ec7e6faccad452
10
+
11
+ before_install: gem install bundler -v 1.10.6
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in lolxin.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Jon Ho
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ [![Gem Version](https://badge.fury.io/rb/lolxin.svg)](https://badge.fury.io/rb/lolxin)
2
+ [![Build Status](https://travis-ci.org/jonwho/lolxin.svg)](https://travis-ci.org/jonwho/lolxin)
3
+ [![Code Climate](https://codeclimate.com/github/jonwho/lolxin/badges/gpa.svg)](https://codeclimate.com/github/jonwho/lolxin)
4
+ [![Test Coverage](https://codeclimate.com/github/jonwho/lolxin/badges/coverage.svg)](https://codeclimate.com/github/jonwho/lolxin/coverage)
5
+ [![Issue Count](https://codeclimate.com/github/jonwho/lolxin/badges/issue_count.svg)](https://codeclimate.com/github/jonwho/lolxin)
6
+
7
+ # Lolxin
8
+
9
+ The not-so-smooth API wrapper for League of Legends.
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ ```ruby
16
+ gem 'lolxin'
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install lolxin
26
+
27
+ ## Usage
28
+
29
+ TODO: Document how to use
30
+
31
+ ## Development
32
+
33
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
34
+ `rake spec` to run the tests. You can also run `bin/console` for an interactive
35
+ prompt that will allow you to experiment.
36
+
37
+ For testing purposes I am using the gem
38
+ [dotenv](https://github.com/bkeepers/dotenv) to load my API key. I recommend
39
+ you do the same and not to commit your .env file to git to keep it a secret by
40
+ adding it to your .gitignore file. If you decide not to use dotenv for whatever
41
+ reason make sure to comment it out in the bin/console script. Also add/remove
42
+ any variables you see fit to speed up manual testing.
43
+
44
+ To install this gem onto your local machine, run `bundle exec rake install`.
45
+
46
+ To release a new version, update the version number in `version.rb`, and then
47
+ run `bundle exec rake release`, which will create a git tag for the version,
48
+ push git commits and tags, and push the `.gem` file to
49
+ [rubygems.org](https://rubygems.org).
50
+
51
+ ## Contributing
52
+
53
+ Bug reports and pull requests are welcome on GitHub at
54
+ https://github.com/jonwho/lolxin. This project is intended to be a safe,
55
+ welcoming space for collaboration, and contributors are expected to adhere
56
+ to the [Contributor Covenant](contributor-covenant.org) code of conduct.
57
+
58
+
59
+ ## License
60
+
61
+ The gem is available as open source under the terms of the
62
+ [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/bundler ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'bundler' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("bundler", "bundler")
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'cc-tddium-post-worker' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("codeclimate-test-reporter", "cc-tddium-post-worker")
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'codeclimate-test-reporter' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("codeclimate-test-reporter", "codeclimate-test-reporter")
data/bin/coderay ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'coderay' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("coderay", "coderay")
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "lolxin"
5
+ include Lolxin
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ require "dotenv"
11
+ Dotenv.load
12
+
13
+ # If you use this, don't forget to add pry to your Gemfile!
14
+ require "pry"
15
+ Pry.start(Client.new(ENV['API_KEY'], region: :na))
data/bin/dotenv ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'dotenv' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("dotenv", "dotenv")
data/bin/htmldiff ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'htmldiff' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("diff-lcs", "htmldiff")
data/bin/ldiff ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'ldiff' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("diff-lcs", "ldiff")
data/bin/pry ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'pry' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("pry", "pry")
data/bin/rake ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rake' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rake", "rake")
data/bin/rspec ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rspec' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rspec-core", "rspec")
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install --binstubs
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,16 @@
1
+ module Lolxin
2
+ module ApiVersion
3
+ CHAMPION = 'v1.2'
4
+ CHAMPION_MASTERY = 'Riot Games has not specified a version'
5
+ CURRENT_GAME = 'v1.0'
6
+ FEATURED_GAMES = 'v1.0'
7
+ GAME = 'v1.3'
8
+ LEAGUE = 'v2.5'
9
+ LOL_STATIC_DATA = 'v1.2'
10
+ LOL_STATUS = 'v1.0'
11
+ MATCH = 'v2.2'
12
+ MATCH_LIST = 'v2.2'
13
+ STATS = 'v1.3'
14
+ SUMMONER = 'v1.4'
15
+ end
16
+ end
@@ -0,0 +1,25 @@
1
+ module Lolxin
2
+ class Champion
3
+ BASE_ENDPOINT = "https://%s.api.pvp.net/api/lol/%s/%s/champion"
4
+
5
+ attr_accessor :conn
6
+
7
+ def initialize(options = {})
8
+ region = options[:region]
9
+ version = options[:version]
10
+ api_key = options[:api_key]
11
+ endpoint = BASE_ENDPOINT % [region, region, version]
12
+ @conn = Faraday.new(endpoint, options[:conn_options]) do |faraday|
13
+ faraday.request(:url_encoded)
14
+ faraday.response(:logger)
15
+ faraday.adapter(Faraday.default_adapter)
16
+ faraday.params[:api_key] = api_key
17
+ end
18
+ end
19
+
20
+ def champion(params = {}, &block)
21
+ id = params.delete(:id).to_s
22
+ conn.get(id, params, &block)
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,69 @@
1
+ module Lolxin
2
+ class ChampionMasteryError < StandardError; end
3
+
4
+ class ChampionMastery
5
+ BASE_ENDPOINT = "https://%s.api.pvp.net/championmastery/location"
6
+
7
+ REGIONS = %w[
8
+ BR1
9
+ EUN1
10
+ EUW1
11
+ JP1
12
+ KR
13
+ LA1
14
+ LA2
15
+ NA1
16
+ OC1
17
+ PBE1
18
+ RU
19
+ TR1
20
+ ]
21
+
22
+ attr_accessor :conn
23
+
24
+ def initialize(options = {})
25
+ region = options[:region]
26
+ api_key = options[:api_key]
27
+ endpoint = BASE_ENDPOINT % [region]
28
+ @conn = Faraday.new(endpoint, options[:conn_options]) do |faraday|
29
+ faraday.request(:url_encoded)
30
+ faraday.response(:logger)
31
+ faraday.adapter(Faraday.default_adapter)
32
+ faraday.params[:api_key] = api_key
33
+ end
34
+ end
35
+
36
+ def player_champion(params = {}, &block)
37
+ player_id = params.delete(:playerId)
38
+ champion_id = params.delete(:championId)
39
+ region = params.delete(:region)
40
+ raise(ChampionMasteryError, "Region given not in acceptable regions #{REGIONS}") unless REGIONS.include? region
41
+ endpoint = [region, 'player', player_id, 'champion', champion_id].join('/')
42
+ conn.get(endpoint, params, &block)
43
+ end
44
+
45
+ def player_champions(params = {}, &block)
46
+ player_id = params.delete(:playerId)
47
+ region = params.delete(:region)
48
+ raise(ChampionMasteryError, "Region given not in acceptable regions #{REGIONS}") unless REGIONS.include? region
49
+ endpoint = [region, 'player', player_id, 'champions'].join('/')
50
+ conn.get(endpoint, params, &block)
51
+ end
52
+
53
+ def player_score(params = {}, &block)
54
+ player_id = params.delete(:playerId)
55
+ region = params.delete(:region)
56
+ raise(ChampionMasteryError, "Region given not in acceptable regions #{REGIONS}") unless REGIONS.include? region
57
+ endpoint = [region, 'player', player_id, 'score'].join('/')
58
+ conn.get(endpoint, params, &block)
59
+ end
60
+
61
+ def player_top_champions(params = {}, &block)
62
+ player_id = params.delete(:playerId)
63
+ region = params.delete(:region)
64
+ raise(ChampionMasteryError, "Region given not in acceptable regions #{REGIONS}") unless REGIONS.include? region
65
+ endpoint = [region, 'player', player_id, 'topchampions'].join('/')
66
+ conn.get(endpoint, params, &block)
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,92 @@
1
+ module Lolxin
2
+ class ClientError < StandardError; end
3
+
4
+ # Client create connection clients for specific endpoints
5
+ class Client
6
+ attr_reader :region, :api_key
7
+
8
+ def initialize(api_key, options = {})
9
+ @api_key = api_key
10
+ @region = options[:region] if Region.valid?(options[:region])
11
+ raise ClientError, "Invalid region given" unless @region
12
+ end
13
+
14
+ def champion(options = {})
15
+ options[:api_key] = api_key
16
+ options[:region] = region
17
+ options[:version] = ApiVersion::CHAMPION
18
+ Champion.new(options)
19
+ end
20
+
21
+ def lol_static_data(options = {})
22
+ options[:api_key] ||= api_key
23
+ options[:region] ||= region
24
+ options[:version] ||= ApiVersion::LOL_STATIC_DATA
25
+ LolStaticData.new(options)
26
+ end
27
+
28
+ def lol_status(options = {})
29
+ LolStatus.new(options)
30
+ end
31
+
32
+ def current_game(options = {})
33
+ options[:api_key] ||= api_key
34
+ options[:region] ||= region
35
+ CurrentGame.new(options)
36
+ end
37
+
38
+ def featured_games(options = {})
39
+ options[:api_key] ||= api_key
40
+ options[:region] ||= region
41
+ FeaturedGames.new(options)
42
+ end
43
+
44
+ def game(options = {})
45
+ options[:api_key] ||= api_key
46
+ options[:region] ||= region
47
+ options[:version] ||= ApiVersion::GAME
48
+ Game.new(options)
49
+ end
50
+
51
+ def champion_mastery(options = {})
52
+ options[:api_key] ||= api_key
53
+ options[:region] ||= region
54
+ ChampionMastery.new(options)
55
+ end
56
+
57
+ def league(options = {})
58
+ options[:api_key] ||= api_key
59
+ options[:region] ||= region
60
+ options[:version] ||= ApiVersion::LEAGUE
61
+ League.new(options)
62
+ end
63
+
64
+ def match(options = {})
65
+ options[:api_key] ||= api_key
66
+ options[:region] ||= region
67
+ options[:version] ||= ApiVersion::MATCH
68
+ Match.new(options)
69
+ end
70
+
71
+ def match_list(options = {})
72
+ options[:api_key] ||= api_key
73
+ options[:region] ||= region
74
+ options[:version] ||= ApiVersion::MATCH_LIST
75
+ MatchList.new(options)
76
+ end
77
+
78
+ def stats(options = {})
79
+ options[:api_key] ||= api_key
80
+ options[:region] ||= region
81
+ options[:version] ||= ApiVersion::STATS
82
+ Stats.new(options)
83
+ end
84
+
85
+ def summoner(options = {})
86
+ options[:api_key] ||= api_key
87
+ options[:region] ||= region
88
+ options[:version] ||= ApiVersion::SUMMONER
89
+ Summoner.new(options)
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,44 @@
1
+ module Lolxin
2
+ class CurrentGameError < StandardError; end
3
+
4
+ class CurrentGame
5
+ BASE_ENDPOINT = "https://%s.api.pvp.net/observer-mode/rest/consumer/getSpectatorGameInfo"
6
+
7
+ REGIONS = %w[
8
+ BR1
9
+ EUN1
10
+ EUW1
11
+ JP1
12
+ KR
13
+ LA1
14
+ LA2
15
+ NA1
16
+ OC1
17
+ PBE1
18
+ RU
19
+ TR1
20
+ ]
21
+
22
+ attr_accessor :conn
23
+
24
+ def initialize(options = {})
25
+ region = options[:region]
26
+ api_key = options[:api_key]
27
+ endpoint = BASE_ENDPOINT % [region]
28
+ @conn = Faraday.new(endpoint, options[:conn_options]) do |faraday|
29
+ faraday.request(:url_encoded)
30
+ faraday.response(:logger)
31
+ faraday.adapter(Faraday.default_adapter)
32
+ faraday.params[:api_key] = api_key
33
+ end
34
+ end
35
+
36
+ def observe(params = {}, &block)
37
+ region = params.delete(:region).to_s
38
+ raise(CurrentGameError, "Region given not in acceptable regions #{REGIONS}") unless REGIONS.include? region
39
+ summ_id = params.delete(:summonerId).to_s
40
+ endpoint = [region, summ_id].join('/')
41
+ conn.get(endpoint, params, &block)
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,23 @@
1
+ module Lolxin
2
+ class FeaturedGames
3
+ BASE_ENDPOINT = "https://%s.api.pvp.net/observer-mode/rest/featured"
4
+
5
+ attr_accessor :conn
6
+
7
+ def initialize(options = {})
8
+ region = options[:region]
9
+ api_key = options[:api_key]
10
+ endpoint = BASE_ENDPOINT % [region]
11
+ @conn = Faraday.new(endpoint, options[:conn_options]) do |faraday|
12
+ faraday.request(:url_encoded)
13
+ faraday.response(:logger)
14
+ faraday.adapter(Faraday.default_adapter)
15
+ faraday.params[:api_key] = api_key
16
+ end
17
+ end
18
+
19
+ def observe(params = {}, &block)
20
+ conn.get("", params, &block)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ module Lolxin
2
+ class Game
3
+ BASE_ENDPOINT = "https://%s.api.pvp.net/api/lol/%s/%s/game/by-summoner"
4
+
5
+ attr_accessor :conn
6
+
7
+ def initialize(options = {})
8
+ region = options[:region]
9
+ version = options[:version]
10
+ api_key = options[:api_key]
11
+ endpoint = BASE_ENDPOINT % [region, region, version]
12
+ @conn = Faraday.new(endpoint, options[:conn_options]) do |faraday|
13
+ faraday.request(:url_encoded)
14
+ faraday.response(:logger)
15
+ faraday.adapter(Faraday.default_adapter)
16
+ faraday.params[:api_key] = api_key
17
+ end
18
+ end
19
+
20
+ def observe(params = {}, &block)
21
+ summ_id = params.delete(:summonerId).to_s
22
+ conn.get("#{summ_id}/recent", params, &block)
23
+ end
24
+ end
25
+ end