Skip to content

Commit

Permalink
champion-v3 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephyi committed Apr 28, 2017
1 parent 3f86895 commit 5968da8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@ Or install it yourself as:

> "What did I see upon the mountain? Rocks. Lots of rocks."
- [x] ~~CHAMPION-V1.2~~ replaced by CHAMPION-V3
- [ ] CHAMPION-V3
- [x] ~~CHAMPIONMASTERY~~ replaced by CHAMPION-MASTERY-V3
- [x] CHAMPION-V3
- [x] CHAMPION-MASTERY-V3
- [x] LEAGUE-V2.5
- [ ] LOL-STATUS-V3
- [ ] MASTERIES-V3
- [ ] RUNES-V3
- [ ] SPECTATOR-V3
- [ ] STATIC-DATA-V3
- [x] SUMMONER-V3
- [x] ~~CURRENT-GAME-V1.0~~ replaced by SPECTATOR-V3
- [x] ~~FEATURED-GAMES-V1.0~~ replaced by SPECTATOR-V3
- [x] ~~GAME-V1.3~~ replaced by MATCH-V3
- [x] LEAGUE-V2.5
- [x] ~~LOL-STATIC-DATA-V1.2~~ replaced by STATIC-DATA-V3
- [x] ~~LOL-STATUS-V1.0~~ replaced by LOL-STATUS-V3
- [ ] LOL-STATUS-V3
- [ ] MASTERIES-V3
- [x] ~~MATCH-V2.2~~ replaced by MATCH-V3
- [x] ~~MATCHLIST-V2.2~~ replaced by MATCH-V3
- [x] ~~RUNES-MASTERIES-V1.4~~ replaced by RUNES-V3 AND MASTERIES-V3
- [ ] RUNES-V3
- [ ] SPECTATOR-V3
- [ ] STATIC-DATA-V3
- [x] ~~CHAMPION-V1.2~~ replaced by CHAMPION-V3
- [x] ~~CHAMPIONMASTERY~~ replaced by CHAMPION-MASTERY-V3
- [x] ~~STATS-V1.3~~ no replacement
- [x] ~~SUMMONER-V1.4~~ replaced by SUMMONER-V3
- [x] SUMMONER-V3

## Configuration

Expand Down
3 changes: 1 addition & 2 deletions lib/taric/operation/champion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ module Operation
module Champion
include Taric::Operation::Base

CHAMPION_VERSION = 'v1.2'.freeze
CHAMPION_BASE_URL = "#{BASE_URL_FN.(CHAMPION_VERSION)}/champion"
CHAMPION_BASE_URL = "https://{host}/lol/platform/v3/champions"

CHAMPIONS = EndpointTemplate.new(template_url: "#{CHAMPION_BASE_URL}{?api_key,freeToPlay}")
CHAMPION_BY_ID = EndpointTemplate.new(template_url: "#{CHAMPION_BASE_URL}/{id}{?api_key}")
Expand Down
2 changes: 1 addition & 1 deletion lib/taric/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Taric
VERSION = '1.0.0-alpha.1'
VERSION = '1.0.0-alpha.2'
end
2 changes: 1 addition & 1 deletion spec/client/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
it 'returns an expanded Addressable template' do
template = Taric::Client.expand_template(api_key: 'test', region: :na, operation: Taric::Operation::Champion::CHAMPIONS.template_url)
expect(template).to be_an Addressable::URI
expect(template.to_s).to eq('https://na1.api.riotgames.com/api/lol/na/v1.2/champion?api_key=test')
expect(template.to_s).to eq('https://na1.api.riotgames.com/lol/platform/v3/champions?api_key=test')
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/operations/champion_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
let (:url) {expand_template(Taric::Operation::Champion::CHAMPIONS.template_url)}

it 'expanded template correctly' do
expect(url).to eq('https://na1.api.riotgames.com/api/lol/na/v1.2/champion?api_key=test')
expect(url).to eq('https://na1.api.riotgames.com/lol/platform/v3/champions?api_key=test')
end

context 'with no arguments' do
Expand Down

0 comments on commit 5968da8

Please sign in to comment.