riot_games_api 0.0.2
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.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rubocop.yml +28 -0
- data/.travis.yml +8 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +192 -0
- data/Rakefile +5 -0
- data/lib/riot_games_api/lol/client.rb +57 -0
- data/lib/riot_games_api/lol/constant/champions.rb +125 -0
- data/lib/riot_games_api/lol/constant/items.rb +186 -0
- data/lib/riot_games_api/lol/model/champion/champion.rb +18 -0
- data/lib/riot_games_api/lol/model/champion.rb +10 -0
- data/lib/riot_games_api/lol/model/corecion/time.rb +16 -0
- data/lib/riot_games_api/lol/model/game/game.rb +27 -0
- data/lib/riot_games_api/lol/model/game/player.rb +15 -0
- data/lib/riot_games_api/lol/model/game/raw_stats.rb +88 -0
- data/lib/riot_games_api/lol/model/game/recent_game.rb +14 -0
- data/lib/riot_games_api/lol/model/game.rb +13 -0
- data/lib/riot_games_api/lol/model/league/league.rb +17 -0
- data/lib/riot_games_api/lol/model/league/league_item.rb +35 -0
- data/lib/riot_games_api/lol/model/league/mini_series.rb +17 -0
- data/lib/riot_games_api/lol/model/league.rb +12 -0
- data/lib/riot_games_api/lol/model/static_data/basic_data.rb +35 -0
- data/lib/riot_games_api/lol/model/static_data/basic_data_stats.rb +77 -0
- data/lib/riot_games_api/lol/model/static_data/block.rb +14 -0
- data/lib/riot_games_api/lol/model/static_data/block_item.rb +14 -0
- data/lib/riot_games_api/lol/model/static_data/champion.rb +29 -0
- data/lib/riot_games_api/lol/model/static_data/champion_list.rb +17 -0
- data/lib/riot_games_api/lol/model/static_data/champion_list_data_by_id.rb +11 -0
- data/lib/riot_games_api/lol/model/static_data/champion_spell.rb +32 -0
- data/lib/riot_games_api/lol/model/static_data/gold.rb +16 -0
- data/lib/riot_games_api/lol/model/static_data/group.rb +14 -0
- data/lib/riot_games_api/lol/model/static_data/image.rb +19 -0
- data/lib/riot_games_api/lol/model/static_data/info.rb +16 -0
- data/lib/riot_games_api/lol/model/static_data/item.rb +35 -0
- data/lib/riot_games_api/lol/model/static_data/item_list.rb +18 -0
- data/lib/riot_games_api/lol/model/static_data/item_tree.rb +14 -0
- data/lib/riot_games_api/lol/model/static_data/level_tip.rb +14 -0
- data/lib/riot_games_api/lol/model/static_data/mastery.rb +19 -0
- data/lib/riot_games_api/lol/model/static_data/mastery_list.rb +16 -0
- data/lib/riot_games_api/lol/model/static_data/mastery_tree.rb +15 -0
- data/lib/riot_games_api/lol/model/static_data/mastery_tree_item.rb +14 -0
- data/lib/riot_games_api/lol/model/static_data/mastery_tree_list.rb +13 -0
- data/lib/riot_games_api/lol/model/static_data/meta_data.rb +18 -0
- data/lib/riot_games_api/lol/model/static_data/passive.rb +16 -0
- data/lib/riot_games_api/lol/model/static_data/realm.rb +21 -0
- data/lib/riot_games_api/lol/model/static_data/recommended.rb +19 -0
- data/lib/riot_games_api/lol/model/static_data/rune.rb +35 -0
- data/lib/riot_games_api/lol/model/static_data/rune_list.rb +16 -0
- data/lib/riot_games_api/lol/model/static_data/skin.rb +15 -0
- data/lib/riot_games_api/lol/model/static_data/spell_vars.rb +16 -0
- data/lib/riot_games_api/lol/model/static_data/stats.rb +32 -0
- data/lib/riot_games_api/lol/model/static_data/summoner_spell.rb +35 -0
- data/lib/riot_games_api/lol/model/static_data/summoner_spell_list.rb +15 -0
- data/lib/riot_games_api/lol/model/static_data/summoner_spell_list_data_by_id.rb +11 -0
- data/lib/riot_games_api/lol/model/static_data.rb +47 -0
- data/lib/riot_games_api/lol/model/stats/aggregated_stats.rb +68 -0
- data/lib/riot_games_api/lol/model/stats/champion_stats.rb +14 -0
- data/lib/riot_games_api/lol/model/stats/player_stats_summary.rb +17 -0
- data/lib/riot_games_api/lol/model/stats/player_stats_summary_list.rb +14 -0
- data/lib/riot_games_api/lol/model/stats/ranked_stats.rb +15 -0
- data/lib/riot_games_api/lol/model/stats.rb +15 -0
- data/lib/riot_games_api/lol/model/summoner/mastery.rb +14 -0
- data/lib/riot_games_api/lol/model/summoner/mastery_page.rb +16 -0
- data/lib/riot_games_api/lol/model/summoner/mastery_page_list.rb +14 -0
- data/lib/riot_games_api/lol/model/summoner/rune_page.rb +16 -0
- data/lib/riot_games_api/lol/model/summoner/rune_page_list.rb +14 -0
- data/lib/riot_games_api/lol/model/summoner/rune_slot.rb +14 -0
- data/lib/riot_games_api/lol/model/summoner/summoner.rb +17 -0
- data/lib/riot_games_api/lol/model/summoner.rb +16 -0
- data/lib/riot_games_api/lol/model/team/match_history_summary.rb +23 -0
- data/lib/riot_games_api/lol/model/team/message_of_day.rb +15 -0
- data/lib/riot_games_api/lol/model/team/roster.rb +14 -0
- data/lib/riot_games_api/lol/model/team/team.rb +27 -0
- data/lib/riot_games_api/lol/model/team/team_member_info.rb +16 -0
- data/lib/riot_games_api/lol/model/team/team_stat_detail.rb +17 -0
- data/lib/riot_games_api/lol/model/team/team_stat_summary.rb +14 -0
- data/lib/riot_games_api/lol/model/team.rb +16 -0
- data/lib/riot_games_api/lol/model.rb +16 -0
- data/lib/riot_games_api/lol/resource/base.rb +22 -0
- data/lib/riot_games_api/lol/resource/champion.rb +39 -0
- data/lib/riot_games_api/lol/resource/game.rb +23 -0
- data/lib/riot_games_api/lol/resource/league.rb +65 -0
- data/lib/riot_games_api/lol/resource/static_data.rb +91 -0
- data/lib/riot_games_api/lol/resource/stats.rb +28 -0
- data/lib/riot_games_api/lol/resource/summoner.rb +52 -0
- data/lib/riot_games_api/lol/resource/team.rb +34 -0
- data/lib/riot_games_api/lol/resource.rb +15 -0
- data/lib/riot_games_api/version.rb +3 -0
- data/lib/riot_games_api.rb +15 -0
- data/riot_games_api.gemspec +34 -0
- data/spec/lol/resource/champion_spec.rb +27 -0
- data/spec/lol/resource/game_spec.rb +40 -0
- data/spec/lol/resource/league_spec.rb +93 -0
- data/spec/lol/resource/static_data_spec.rb +215 -0
- data/spec/lol/resource/stats_spec.rb +57 -0
- data/spec/lol/resource/summoner_spec.rb +80 -0
- data/spec/lol/resource/team_spec.rb +31 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Champion/_all/should_first_record_is_Aatrox.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Champion/_by_champion_id/should_be_Teemo.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Champion/_free/should_be_only_free_champions.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_champinons_is_Talon_in_first_game_record.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_first_fellow_player_s_team_is_blue.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_first_game_is_win.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_game_record_have_player_model.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_game_record_have_raw_stats_model.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_game_records_count_is_10.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_have_summoner_id.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_summoner_id/should_have_league_item_entries.yml +1497 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_summoner_id/should_phantoml0ad_is_in_league_which_name_is_Nasus_s_Agents.yml +1497 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_summoner_id_only_own_entry/should_ojarusang_is_in_series.yml +43 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_summoner_id_only_own_entry/should_ojarusang_s_tier_is_platinum.yml +43 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_team_id/should_have_league_item_entries.yml +864 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_team_id/should_rascal_jester_is_in_league_which_name_is_Nunu_s_Outriders.yml +864 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_team_id_only_own_entry/should_ffg_practice_is_not_in_series.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_team_id_only_own_entry/should_ffg_practice_tier_is_challenger.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_solo_5v5/should_queue_is_ranked_solo_5v5.yml +1281 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_solo_5v5/should_tier_is_challenger.yml +1281 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_team_3v3/should_queue_is_ranked_team_3v3.yml +123 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_team_3v3/should_tier_is_challenger.yml +123 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_team_5v5/should_queue_is_ranked_team_5v5.yml +61 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_team_5v5/should_tier_is_challenger.yml +61 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/_realm/should_have_data_cdn_is_cdn_url.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/_realm/should_have_static_data_of_realm.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_all/key_by_id_is_false/should_have_inputed_data_version.yml +38011 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_all/key_by_id_is_false/should_have_static_data_key_with_champion_name.yml +38011 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_all/key_by_id_is_false/should_have_static_data_of_champions.yml +38011 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_all/key_by_id_is_true/should_have_static_data_keys_is_champion_id.yml +38000 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_all/key_by_id_is_true/should_have_static_data_of_champion.yml +38000 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_by_id/should_have_data_key_is_shaco.yml +151 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_by_id/should_have_static_data_of_champion.yml +151 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_all/should_have_inputed_data_version.yml +2388 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_all/should_have_static_data_of_items.yml +2388 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_all/should_have_static_data_with_item_name.yml +2388 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_by_id/should_have_data_name_is_biscuit.yml +46 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_by_id/should_have_static_data_of_item.yml +46 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_all/should_have_inputed_data_version.yml +240 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_all/should_have_static_data_of_masterys.yml +240 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_all/should_have_static_data_with_mastery_name.yml +240 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_by_id/should_have_data_name_is_sorcery.yml +47 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_by_id/should_have_static_data_of_mastery.yml +47 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_all/should_have_inputed_data_version.yml +733 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_all/should_have_static_data_of_runes.yml +733 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_all/should_have_static_data_with_rune_name.yml +733 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_by_id/should_have_data_name_is_rune_name.yml +45 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_by_id/should_have_static_data_of_rune.yml +45 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/summoner_spell/_summoner_spell_all/key_by_id_is_false/should_have_inputed_data_version.yml +156 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/summoner_spell/_summoner_spell_all/key_by_id_is_false/should_have_static_data_key_with_summoner_spell_name.yml +156 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/summoner_spell/_summoner_spell_all/key_by_id_is_false/should_have_static_data_of_summoner_spell.yml +156 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/summoner_spell/_summoner_spell_all/key_by_id_is_true/should_have_static_data_keys_is_sumoner_spell_id.yml +156 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/summoner_spell/_summoner_spell_all/key_by_id_is_true/should_have_static_data_of_summoner_spell.yml +156 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/summoner_spell/_summoner_spell_by_id/should_have_data_name_is_teleport.yml +55 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/summoner_spell/_summoner_spell_by_id/should_have_static_data_of_summoner_spell.yml +55 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_ranked/latest_season/should_not_found_ranked_stats.yml +57 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_ranked/season3/should_have_champion_stats.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_ranked/season3/should_have_modify_data_which_unixtime_milliseconds.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_summary/latest_season/should_have_player_stat_summaries.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_summary/latest_season/should_have_summoner_id_inputed.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_summary/season3/should_have_player_stat_summaries.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_summary/season3/should_have_summoner_id_inputed.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_id/should_have_key_which_is_summoner_id.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_id/should_have_summoner_model.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_id/should_summoner_model_have_summoner_level.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_name/should_have_key_which_is_summoner_name.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_name/should_have_summoner_model.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_name/should_summoner_model_have_summoner_level.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_masteries/should_have_key_which_is_summoner_id.yml +52 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_masteries/should_have_mastery_page_list_model.yml +52 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_masteries/should_have_mastery_page_model.yml +52 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_name/should_have_summoner_name.yml +44 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_runes/should_have_key_which_is_summoner_id.yml +56 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_runes/should_have_rune_page_list_model.yml +56 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_runes/should_have_rune_page_model.yml +56 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Team/_by_summoner_id/should_have_focus_me_s_full_id.yml +314 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Team/_by_summoner_id/should_have_team_model.yml +314 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Team/_by_team_id/should_have_key_which_is_team_id.yml +165 -0
- data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Team/_by_team_id/should_have_team_model.yml +165 -0
- metadata +484 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe RiotGamesApi::LOL::Resource::Game, :vcr do
|
|
4
|
+
let(:client) { RiotGamesApi::LOL::Client.new }
|
|
5
|
+
let(:summoner_id) { 42139310 }
|
|
6
|
+
let(:talon) { 91 }
|
|
7
|
+
let(:blue_team) { 100 }
|
|
8
|
+
|
|
9
|
+
describe '#recent' do
|
|
10
|
+
let(:recent_games) { client.games.recent summoner_id }
|
|
11
|
+
|
|
12
|
+
it 'should have summoner id' do
|
|
13
|
+
recent_games.summoner_id.should eq summoner_id
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'should champinons is Talon in first game record' do
|
|
17
|
+
recent_games.games.first.champion_id.should eq talon
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it 'should game records count is 10' do
|
|
21
|
+
recent_games.games.count.should eq 10
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it 'should game record have player model' do
|
|
25
|
+
recent_games.games.first.fellow_players.first.class.should eq RiotGamesApi::LOL::Model::Game::Player
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it "should first fellow player's team is blue" do
|
|
29
|
+
recent_games.games.first.fellow_players.first.team_id.should eq blue_team
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
it 'should game record have raw stats model' do
|
|
33
|
+
recent_games.games.first.stats.class.should eq RiotGamesApi::LOL::Model::Game::RawStats
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it 'should first game is win' do
|
|
37
|
+
recent_games.games.first.stats.win.should be_true
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe RiotGamesApi::LOL::Resource::League, :vcr do
|
|
4
|
+
let(:client) { RiotGamesApi::LOL::Client.new }
|
|
5
|
+
let(:phantoml0ad) { 19347723 } # famous player
|
|
6
|
+
let(:ojarusang) { 34682697 } # my friend
|
|
7
|
+
let(:rascal_jester) { 'TEAM-a3641570-5f29-11e3-bf0e-782bcb4d0bb2' } # japanese pro LoL team
|
|
8
|
+
let(:ffg_practice) { 'TEAM-1991eb20-a33e-11e3-b439-782bcb4d1861' } # team in challenger
|
|
9
|
+
|
|
10
|
+
describe '#by_summoner_id' do
|
|
11
|
+
let(:league_first) { client.leagues.by_summoner_id(phantoml0ad).first }
|
|
12
|
+
|
|
13
|
+
it "should phantoml0ad is in league which name is Nasus's Agents" do
|
|
14
|
+
league_first.name.should eq "Nasus's Agents"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'should have league item entries' do
|
|
18
|
+
league_first.entries.first.class.should eq RiotGamesApi::LOL::Model::League::LeagueItem
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
describe '#by_summoner_id_only_own_entry' do
|
|
23
|
+
let(:league_first) { client.leagues.by_summoner_id_only_own_entry(ojarusang).first }
|
|
24
|
+
|
|
25
|
+
it "should ojarusang's tier is platinum" do
|
|
26
|
+
league_first.tier.should eq 'PLATINUM'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it 'should ojarusang is in series' do
|
|
30
|
+
league_first.mini_series.should_not nil
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
describe '#by_team_id' do
|
|
35
|
+
let(:league_first) { client.leagues.by_team_id(rascal_jester).first }
|
|
36
|
+
|
|
37
|
+
it "should rascal jester is in league which name is Nunu's Outriders" do
|
|
38
|
+
league_first.name.should eq "Nunu's Outriders"
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it 'should have league item entries' do
|
|
42
|
+
league_first.entries.first.class.should eq RiotGamesApi::LOL::Model::League::LeagueItem
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe '#by_team_id_only_own_entry' do
|
|
47
|
+
let(:league_first) { client.leagues.by_team_id_only_own_entry(ffg_practice).first }
|
|
48
|
+
|
|
49
|
+
it 'should ffg practice tier is challenger' do
|
|
50
|
+
league_first.tier.should eq 'CHALLENGER'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
it 'should ffg practice is not in series' do
|
|
54
|
+
league_first.mini_series.should nil
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe '#challenger_solo_5v5' do
|
|
59
|
+
let(:player_in_challenger) { client.leagues.challenger_solo_5v5.entries.sample }
|
|
60
|
+
|
|
61
|
+
it 'should tier is challenger' do
|
|
62
|
+
player_in_challenger.tier.should eq 'CHALLENGER'
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
it 'should queue is ranked solo 5v5' do
|
|
66
|
+
player_in_challenger.queue_type.should eq 'RANKED_SOLO_5x5'
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
describe '#challenger_team_5v5' do
|
|
71
|
+
let(:team_in_challenger) { client.leagues.challenger_team_5v5.entries.sample }
|
|
72
|
+
|
|
73
|
+
it 'should tier is challenger' do
|
|
74
|
+
team_in_challenger.tier.should eq 'CHALLENGER'
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
it 'should queue is ranked team 5v5' do
|
|
78
|
+
team_in_challenger.queue_type.should eq 'RANKED_TEAM_5x5'
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
describe '#challenger_team_3v3' do
|
|
83
|
+
let(:team_in_challenger) { client.leagues.challenger_team_3v3.entries.sample }
|
|
84
|
+
|
|
85
|
+
it 'should tier is challenger' do
|
|
86
|
+
team_in_challenger.tier.should eq 'CHALLENGER'
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
it 'should queue is ranked team 3v3' do
|
|
90
|
+
team_in_challenger.queue_type.should eq 'RANKED_TEAM_3x3'
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe RiotGamesApi::LOL::Resource::StaticData, :vcr do
|
|
4
|
+
let(:client) { RiotGamesApi::LOL::Client.new }
|
|
5
|
+
let(:data_version){ '4.5.4' }
|
|
6
|
+
|
|
7
|
+
describe 'champion' do
|
|
8
|
+
let(:shaco_id) { 35 }
|
|
9
|
+
let(:shaco_key) { 'shaco' }
|
|
10
|
+
let(:shaco_name) { 'Shaco' }
|
|
11
|
+
|
|
12
|
+
# very heavy spec cause test data is too huge
|
|
13
|
+
describe '#champion_all' do
|
|
14
|
+
context 'key_by_id is false' do
|
|
15
|
+
let(:champion_list) { client.static_data.champion_all false, data_version }
|
|
16
|
+
|
|
17
|
+
it 'should have static data of champions' do
|
|
18
|
+
champion_list.data.values.first.class.should eq RiotGamesApi::LOL::Model::StaticData::Champion
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it 'should have static data key with champion name' do
|
|
22
|
+
champion_list.data[shaco_key].name.should eq shaco_name
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it 'should have inputed data version' do
|
|
26
|
+
champion_list.version.should eq data_version
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
context 'key_by_id is true' do
|
|
31
|
+
let(:champion_list) { client.static_data.champion_all true }
|
|
32
|
+
|
|
33
|
+
it 'should have static data of champion' do
|
|
34
|
+
champion_list.data.values.first.class.should eq RiotGamesApi::LOL::Model::StaticData::Champion
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'should have static data keys is champion id' do
|
|
38
|
+
champion_list.data[shaco_id].name.should eq shaco_name
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
describe '#champion_by_id' do
|
|
44
|
+
let(:shaco) { client.static_data.champion_by_id shaco_id }
|
|
45
|
+
|
|
46
|
+
it 'should have static data of champion' do
|
|
47
|
+
shaco.class.should eq RiotGamesApi::LOL::Model::StaticData::Champion
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
it 'should have data key is shaco' do
|
|
51
|
+
shaco.key.should eq shaco_name
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
describe 'item' do
|
|
57
|
+
let(:biscuit_name) { 'Total Biscuit of Rejuvenation' }
|
|
58
|
+
let(:biscuit_id) { 2009 }
|
|
59
|
+
|
|
60
|
+
describe '#item_all' do
|
|
61
|
+
let(:item_list) { client.static_data.item_all data_version }
|
|
62
|
+
|
|
63
|
+
it 'should have static data with item name' do
|
|
64
|
+
item_list.data[biscuit_id].name.should eq biscuit_name
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
it 'should have static data of items' do
|
|
68
|
+
item_list.data.values.first.class.should eq RiotGamesApi::LOL::Model::StaticData::Item
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
it 'should have inputed data version' do
|
|
72
|
+
item_list.version.should eq data_version
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
describe '#item_by_id' do
|
|
77
|
+
let(:biscuit) { client.static_data.item_by_id biscuit_id }
|
|
78
|
+
|
|
79
|
+
it 'should have static data of item' do
|
|
80
|
+
biscuit.class.should eq RiotGamesApi::LOL::Model::StaticData::Item
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
it 'should have data name is biscuit' do
|
|
84
|
+
biscuit.name.should eq biscuit_name
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
describe 'mastery' do
|
|
90
|
+
let(:sorcery_name) { 'Sorcery' }
|
|
91
|
+
let(:sorcery_id) { 4113 }
|
|
92
|
+
|
|
93
|
+
describe '#mastery_all' do
|
|
94
|
+
let(:mastery_list) { client.static_data.mastery_all data_version }
|
|
95
|
+
|
|
96
|
+
it 'should have static data of masterys' do
|
|
97
|
+
mastery_list.data.values.first.class.should eq RiotGamesApi::LOL::Model::StaticData::Mastery
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
it 'should have static data with mastery name' do
|
|
101
|
+
mastery_list.data[sorcery_id].name.should eq sorcery_name
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
it 'should have inputed data version' do
|
|
105
|
+
mastery_list.version.should eq data_version
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
describe '#mastery_by_id' do
|
|
110
|
+
let(:sorcery) { client.static_data.mastery_by_id sorcery_id }
|
|
111
|
+
|
|
112
|
+
it 'should have static data of mastery' do
|
|
113
|
+
sorcery.class.should eq RiotGamesApi::LOL::Model::StaticData::Mastery
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
it 'should have data name is sorcery' do
|
|
117
|
+
sorcery.name.should eq sorcery_name
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
describe '#realm' do
|
|
123
|
+
let(:realm) { client.static_data.realm }
|
|
124
|
+
let(:cdn_url) { 'http://ddragon.leagueoflegends.com/cdn' }
|
|
125
|
+
|
|
126
|
+
it 'should have static data of realm' do
|
|
127
|
+
realm.class.should eq RiotGamesApi::LOL::Model::StaticData::Realm
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
it 'should have data cdn is cdn_url' do
|
|
131
|
+
realm.cdn.should eq cdn_url
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
describe 'rune' do
|
|
136
|
+
let(:rune_name) { 'Quintessence of Ability Power' }
|
|
137
|
+
let(:rune_id) { 5235 }
|
|
138
|
+
|
|
139
|
+
describe '#rune_all' do
|
|
140
|
+
let(:rune_list) { client.static_data.rune_all data_version }
|
|
141
|
+
|
|
142
|
+
it 'should have static data of runes' do
|
|
143
|
+
rune_list.data.values.first.class.should eq RiotGamesApi::LOL::Model::StaticData::Rune
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
it 'should have static data with rune name' do
|
|
147
|
+
rune_list.data[rune_id].name.should eq rune_name
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
it 'should have inputed data version' do
|
|
151
|
+
rune_list.version.should eq data_version
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
describe '#rune_by_id' do
|
|
156
|
+
let(:rune) { client.static_data.rune_by_id rune_id }
|
|
157
|
+
|
|
158
|
+
it 'should have static data of rune' do
|
|
159
|
+
rune.class.should eq RiotGamesApi::LOL::Model::StaticData::Rune
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
it 'should have data name is rune name' do
|
|
163
|
+
rune.name.should eq rune_name
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
describe 'summoner_spell' do
|
|
169
|
+
let(:teleport_id) { 12 }
|
|
170
|
+
let(:teleport_key) { 'summoner_teleport' }
|
|
171
|
+
let(:teleport_name) { 'Teleport' }
|
|
172
|
+
|
|
173
|
+
describe '#summoner_spell_all' do
|
|
174
|
+
context 'key_by_id is false' do
|
|
175
|
+
let(:summoner_spell_list) { client.static_data.summoner_spell_all false, data_version }
|
|
176
|
+
|
|
177
|
+
it 'should have static data of summoner spell' do
|
|
178
|
+
summoner_spell_list.data.values.first.class.should eq RiotGamesApi::LOL::Model::StaticData::SummonerSpell
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
it 'should have static data key with summoner spell name' do
|
|
182
|
+
summoner_spell_list.data[teleport_key].name.should eq teleport_name
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
it 'should have inputed data version' do
|
|
186
|
+
summoner_spell_list.version.should eq data_version
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
context 'key_by_id is true' do
|
|
191
|
+
let(:summoner_spell_list) { client.static_data.summoner_spell_all true }
|
|
192
|
+
|
|
193
|
+
it 'should have static data of summoner spell' do
|
|
194
|
+
summoner_spell_list.data.values.first.class.should eq RiotGamesApi::LOL::Model::StaticData::SummonerSpell
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
it 'should have static data keys is sumoner spell id' do
|
|
198
|
+
summoner_spell_list.data[teleport_id].name.should eq teleport_name
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
describe '#summoner_spell_by_id' do
|
|
204
|
+
let(:teleport) { client.static_data.summoner_spell_by_id teleport_id }
|
|
205
|
+
|
|
206
|
+
it 'should have static data of summoner spell' do
|
|
207
|
+
teleport.class.should eq RiotGamesApi::LOL::Model::StaticData::SummonerSpell
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
it 'should have data name is teleport' do
|
|
211
|
+
teleport.name.should eq teleport_name
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe RiotGamesApi::LOL::Resource::Stats, :vcr do
|
|
4
|
+
let(:client) { RiotGamesApi::LOL::Client.new }
|
|
5
|
+
let(:summoner_id) { 42139310 }
|
|
6
|
+
let(:season3) { 'SEASON3' }
|
|
7
|
+
|
|
8
|
+
describe '#ranked' do
|
|
9
|
+
context 'season3' do
|
|
10
|
+
let(:ranked_stats) { client.stats.ranked summoner_id, season3 }
|
|
11
|
+
let(:last_modified) { Time.at(1378635320) }
|
|
12
|
+
|
|
13
|
+
it 'should have modify_data which unixtime milliseconds' do
|
|
14
|
+
p ranked_stats.modify_date
|
|
15
|
+
ranked_stats.modify_date.should eq last_modified
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it 'should have champion stats' do
|
|
19
|
+
ranked_stats.champions.first.class.should eq RiotGamesApi::LOL::Model::Stats::ChampionStats
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
context 'latest season' do
|
|
24
|
+
let(:ranked_stats) { client.stats.ranked summoner_id }
|
|
25
|
+
|
|
26
|
+
it 'should not found ranked stats' do
|
|
27
|
+
expect{ ranked_stats }.to raise_error Faraday::Error::ResourceNotFound
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
describe '#summary' do
|
|
33
|
+
context 'season3' do
|
|
34
|
+
let(:summary_stats) { client.stats.summary summoner_id, season3 }
|
|
35
|
+
|
|
36
|
+
it 'should have summoner id inputed' do
|
|
37
|
+
summary_stats.summoner_id.should eq summoner_id
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it 'should have player stat summaries' do
|
|
41
|
+
summary_stats.player_stat_summaries.first.class.should eq RiotGamesApi::LOL::Model::Stats::PlayerStatsSummary
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
context 'latest season' do
|
|
46
|
+
let(:summary_stats) { client.stats.summary summoner_id, season3 }
|
|
47
|
+
|
|
48
|
+
it 'should have summoner id inputed' do
|
|
49
|
+
summary_stats.summoner_id.should eq summoner_id
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
it 'should have player stat summaries' do
|
|
53
|
+
summary_stats.player_stat_summaries.first.class.should eq RiotGamesApi::LOL::Model::Stats::PlayerStatsSummary
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe RiotGamesApi::LOL::Resource::Summoner, :vcr do
|
|
4
|
+
let(:client) { RiotGamesApi::LOL::Client.new }
|
|
5
|
+
let(:summoner_id) { 42139310 }
|
|
6
|
+
let(:summoner_name) { 'shishisn' }
|
|
7
|
+
let(:summoner_level) { 30 }
|
|
8
|
+
|
|
9
|
+
describe '#by_name' do
|
|
10
|
+
let(:summoner) { client.summoner.by_name summoner_name }
|
|
11
|
+
|
|
12
|
+
it 'should have key which is summoner name' do
|
|
13
|
+
summoner.keys.first.should eq summoner_name
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'should have summoner model' do
|
|
17
|
+
summoner.values.first.class.should eq RiotGamesApi::LOL::Model::Summoner::Summoner
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it 'should summoner model have summoner level' do
|
|
21
|
+
summoner.values.first.summoner_level.should eq summoner_level
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
describe '#by_id' do
|
|
26
|
+
let(:summoner) { client.summoner.by_id summoner_id }
|
|
27
|
+
|
|
28
|
+
it 'should have key which is summoner id' do
|
|
29
|
+
summoner.keys.first.should eq summoner_id
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
it 'should have summoner model' do
|
|
33
|
+
summoner.values.first.class.should eq RiotGamesApi::LOL::Model::Summoner::Summoner
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it 'should summoner model have summoner level' do
|
|
37
|
+
summoner.values.first.summoner_level.should eq summoner_level
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe '#masteries' do
|
|
42
|
+
let(:masteries) { client.summoner.masteries summoner_id }
|
|
43
|
+
|
|
44
|
+
it 'should have key which is summoner id' do
|
|
45
|
+
masteries.keys.first.should eq summoner_id
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
it 'should have mastery page list model' do
|
|
49
|
+
masteries.values.first.class.should eq RiotGamesApi::LOL::Model::Summoner::MasteryPageList
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
it 'should have mastery page model' do
|
|
53
|
+
masteries.values.first.pages.first.class.should eq RiotGamesApi::LOL::Model::Summoner::MasteryPage
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
describe '#name' do
|
|
58
|
+
let(:name) { client.summoner.name summoner_id }
|
|
59
|
+
|
|
60
|
+
it 'should have summoner name' do
|
|
61
|
+
name.values.first.should eq summoner_name
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe '#runes' do
|
|
66
|
+
let(:runes) { client.summoner.runes summoner_id }
|
|
67
|
+
|
|
68
|
+
it 'should have key which is summoner id' do
|
|
69
|
+
runes.keys.first.should eq summoner_id
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
it 'should have rune page list model' do
|
|
73
|
+
runes.values.first.class.should eq RiotGamesApi::LOL::Model::Summoner::RunePageList
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
it 'should have rune page model' do
|
|
77
|
+
runes.values.first.pages.first.class.should eq RiotGamesApi::LOL::Model::Summoner::RunePage
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe RiotGamesApi::LOL::Resource::Team, :vcr do
|
|
4
|
+
let(:client) { RiotGamesApi::LOL::Client.new }
|
|
5
|
+
let(:yutaproid) { 21374340 } # one of the best japanese player
|
|
6
|
+
let(:focus_me) { 'TEAM-e4651800-bec9-11e1-a3be-782bcb4d0bb2' } # lol team yutaproid belongs to
|
|
7
|
+
|
|
8
|
+
describe '#by_summoner_id' do
|
|
9
|
+
let(:teams) { client.team.by_summoner_id yutaproid }
|
|
10
|
+
|
|
11
|
+
it 'should have team model' do
|
|
12
|
+
teams.first.class.should eq RiotGamesApi::LOL::Model::Team::Team
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
it "should have focus me's full id" do
|
|
16
|
+
teams[1].full_id.should eq focus_me
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
describe '#by_team_id' do
|
|
21
|
+
let(:team) { client.team.by_team_id focus_me }
|
|
22
|
+
|
|
23
|
+
it 'should have team model' do
|
|
24
|
+
team.values.first.class.should eq RiotGamesApi::LOL::Model::Team::Team
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it "should have key which is team id" do
|
|
28
|
+
team.keys.first.should eq focus_me
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'codeclimate-test-reporter'
|
|
2
|
+
CodeClimate::TestReporter.start
|
|
3
|
+
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'riot_games_api'
|
|
6
|
+
|
|
7
|
+
require 'rspec/autorun'
|
|
8
|
+
require 'webmock/rspec'
|
|
9
|
+
require 'vcr'
|
|
10
|
+
|
|
11
|
+
RSpec.configure do |c|
|
|
12
|
+
c.treat_symbols_as_metadata_keys_with_true_values = true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
VCR.configure do |c|
|
|
16
|
+
c.cassette_library_dir = 'spec/vcr_cassettes'
|
|
17
|
+
c.hook_into :webmock
|
|
18
|
+
c.filter_sensitive_data('test_key') { ENV['RIOT_GAMES_API_KEY'] }
|
|
19
|
+
c.configure_rspec_metadata!
|
|
20
|
+
c.ignore_hosts 'codeclimate.com'
|
|
21
|
+
end
|
data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Champion/_all/should_first_record_is_Aatrox.yml
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: http://prod.api.pvp.net/api/lol/na/v1.2/champion?api_key=test_key&locale=en_US
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
User-Agent:
|
|
11
|
+
- Faraday v0.8.9
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
Accept:
|
|
15
|
+
- "*/*"
|
|
16
|
+
response:
|
|
17
|
+
status:
|
|
18
|
+
code: 200
|
|
19
|
+
message: OK
|
|
20
|
+
headers:
|
|
21
|
+
Access-Control-Allow-Headers:
|
|
22
|
+
- Content-Type
|
|
23
|
+
Access-Control-Allow-Methods:
|
|
24
|
+
- GET, POST, DELETE, PUT
|
|
25
|
+
Access-Control-Allow-Origin:
|
|
26
|
+
- "*"
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=UTF-8
|
|
29
|
+
Date:
|
|
30
|
+
- Sun, 13 Apr 2014 20:17:22 GMT
|
|
31
|
+
Server:
|
|
32
|
+
- Jetty(9.1.1.v20140108)
|
|
33
|
+
Vary:
|
|
34
|
+
- Accept-Encoding, User-Agent
|
|
35
|
+
Transfer-Encoding:
|
|
36
|
+
- chunked
|
|
37
|
+
Connection:
|
|
38
|
+
- keep-alive
|
|
39
|
+
body:
|
|
40
|
+
encoding: UTF-8
|
|
41
|
+
string: "{\"champions\":[{\"id\":266,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":103,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":84,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":12,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":32,\"active\":true,\"botEnabled\":false,\"freeToPlay\":true,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":34,\"active\":true,\"botEnabled\":false,\"freeToPlay\":true,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":1,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":22,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":53,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":63,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":51,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":69,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":31,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":42,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":122,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":131,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":119,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":36,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":60,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":28,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":81,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":9,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":114,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":105,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":3,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":41,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":86,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":79,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":104,\"active\":true,\"botEnabled\":true,\"freeToPlay\":true,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":120,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":74,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":39,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":40,\"active\":true,\"botEnabled\":false,\"freeToPlay\":true,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":59,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":24,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":126,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":222,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":43,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":30,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":38,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":55,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":10,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":85,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":121,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":96,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":7,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":64,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":89,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":127,\"active\":true,\"botEnabled\":false,\"freeToPlay\":true,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":236,\"active\":true,\"botEnabled\":false,\"freeToPlay\":true,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":117,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":99,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":54,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":90,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":57,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":11,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":21,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":62,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":82,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":25,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":267,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":75,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":111,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":76,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":56,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":20,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":2,\"active\":true,\"botEnabled\":false,\"freeToPlay\":true,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":61,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":80,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":78,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":133,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":33,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":58,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":107,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":92,\"active\":true,\"botEnabled\":false,\"freeToPlay\":true,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":68,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":13,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":113,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":35,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":98,\"active\":true,\"botEnabled\":true,\"freeToPlay\":true,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":102,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":27,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":14,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":15,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":72,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":37,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":16,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":50,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":134,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":91,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":44,\"active\":true,\"botEnabled\":true,\"freeToPlay\":true,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":17,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":412,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":18,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":48,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":23,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":4,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":29,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":77,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":6,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":110,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":67,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":45,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":161,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":254,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":112,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":8,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":106,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":19,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":101,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":5,\"active\":true,\"botEnabled\":true,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":157,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":83,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":154,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":238,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true},{\"id\":115,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":26,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true},{\"id\":143,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":true,\"rankedPlayEnabled\":true}]}"
|
|
42
|
+
http_version:
|
|
43
|
+
recorded_at: Sun, 13 Apr 2014 20:17:48 GMT
|
|
44
|
+
recorded_with: VCR 2.9.0
|
data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Champion/_by_champion_id/should_be_Teemo.yml
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: http://prod.api.pvp.net/api/lol/na/v1.2/champion/17?api_key=test_key&locale=en_US
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
User-Agent:
|
|
11
|
+
- Faraday v0.8.9
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
Accept:
|
|
15
|
+
- "*/*"
|
|
16
|
+
response:
|
|
17
|
+
status:
|
|
18
|
+
code: 200
|
|
19
|
+
message: OK
|
|
20
|
+
headers:
|
|
21
|
+
Access-Control-Allow-Headers:
|
|
22
|
+
- Content-Type
|
|
23
|
+
Access-Control-Allow-Methods:
|
|
24
|
+
- GET, POST, DELETE, PUT
|
|
25
|
+
Access-Control-Allow-Origin:
|
|
26
|
+
- "*"
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=UTF-8
|
|
29
|
+
Date:
|
|
30
|
+
- Mon, 14 Apr 2014 14:34:27 GMT
|
|
31
|
+
Server:
|
|
32
|
+
- Jetty(9.1.1.v20140108)
|
|
33
|
+
Vary:
|
|
34
|
+
- Accept-Encoding, User-Agent
|
|
35
|
+
Content-Length:
|
|
36
|
+
- '91'
|
|
37
|
+
Connection:
|
|
38
|
+
- keep-alive
|
|
39
|
+
body:
|
|
40
|
+
encoding: UTF-8
|
|
41
|
+
string: "{\"id\":17,\"active\":true,\"botEnabled\":false,\"freeToPlay\":false,\"botMmEnabled\":false,\"rankedPlayEnabled\":true}"
|
|
42
|
+
http_version:
|
|
43
|
+
recorded_at: Mon, 14 Apr 2014 14:34:55 GMT
|
|
44
|
+
recorded_with: VCR 2.9.0
|