Skip to content

Commit

Permalink
STATIC-DATA-V3 (#30)
Browse files Browse the repository at this point in the history
* MATCH-V3

* timeline endpoint for match-v3

* SPECTATOR-V3
  • Loading branch information
josephyi committed Apr 30, 2017
1 parent 691f1a5 commit 28955c2
Show file tree
Hide file tree
Showing 12 changed files with 811 additions and 1,185 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Or install it yourself as:
- [x] MASTERIES-V3
- [x] MATCH-V3
- [x] RUNES-V3
- [ ] SPECTATOR-V3
- [x] SPECTATOR-V3
- [ ] STATIC-DATA-V3
- [x] SUMMONER-V3
- [x] ~~CURRENT-GAME-V1.0~~ replaced by SPECTATOR-V3
Expand Down
8 changes: 2 additions & 6 deletions lib/taric/operation/api.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
require_relative 'champion'
require_relative 'champion_mastery'
require_relative 'current_game'
require_relative 'featured_games'
require_relative 'game'
require_relative 'league'
require_relative 'lol_static_data'
require_relative 'lol_status'
require_relative 'masteries'
require_relative 'match'
require_relative 'runes'
require_relative 'spectator'
require_relative 'stats'
require_relative 'summoner'
require_relative 'team'
Expand All @@ -20,15 +18,13 @@ module Operation
module API
include Taric::Operation::Champion
include Taric::Operation::ChampionMastery
include Taric::Operation::CurrentGame
include Taric::Operation::FeaturedGames
include Taric::Operation::Game
include Taric::Operation::League
include Taric::Operation::LolStaticData
include Taric::Operation::LolStatus
include Taric::Operation::Masteries
include Taric::Operation::Match
include Taric::Operation::Runes
include Taric::Operation::Spectator
include Taric::Operation::Stats
include Taric::Operation::Summoner
include Taric::Operation::Team
Expand Down
20 changes: 0 additions & 20 deletions lib/taric/operation/current_game.rb

This file was deleted.

19 changes: 0 additions & 19 deletions lib/taric/operation/featured_games.rb

This file was deleted.

24 changes: 0 additions & 24 deletions lib/taric/operation/game.rb

This file was deleted.

24 changes: 24 additions & 0 deletions lib/taric/operation/spectator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require_relative 'endpoint_template'
module Taric
module Operation
module Spectator
CURRENT_GAME_V3 = EndpointTemplate.new(template_url: 'https://{host}/lol/spectator/v3/active-games/by-summoner/{summonerId}{?api_key}')
FEATURED_GAMES_V3 = EndpointTemplate.new(template_url: 'https://{host}/lol/spectator/v3/featured-games{?api_key}')

# Returns current game data for summoner id.
#
# @see https://developer.riotgames.com/api-methods/#spectator-v3/GET_getCurrentGameInfoBySummoner
# @param summoner_id [Fixnum] ID of summoner
# @return [Response] current game
def current_game(summoner_id: )
response_for CURRENT_GAME_V3, {summonerId: summoner_id}
end

#
# @see https://developer.riotgames.com/api-methods/#spectator-v3/GET_getFeaturedGames
def featured_games
response_for FEATURED_GAMES_V3
end
end
end
end
Loading

0 comments on commit 28955c2

Please sign in to comment.