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.
Files changed (180) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.rubocop.yml +28 -0
  4. data/.travis.yml +8 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +192 -0
  8. data/Rakefile +5 -0
  9. data/lib/riot_games_api/lol/client.rb +57 -0
  10. data/lib/riot_games_api/lol/constant/champions.rb +125 -0
  11. data/lib/riot_games_api/lol/constant/items.rb +186 -0
  12. data/lib/riot_games_api/lol/model/champion/champion.rb +18 -0
  13. data/lib/riot_games_api/lol/model/champion.rb +10 -0
  14. data/lib/riot_games_api/lol/model/corecion/time.rb +16 -0
  15. data/lib/riot_games_api/lol/model/game/game.rb +27 -0
  16. data/lib/riot_games_api/lol/model/game/player.rb +15 -0
  17. data/lib/riot_games_api/lol/model/game/raw_stats.rb +88 -0
  18. data/lib/riot_games_api/lol/model/game/recent_game.rb +14 -0
  19. data/lib/riot_games_api/lol/model/game.rb +13 -0
  20. data/lib/riot_games_api/lol/model/league/league.rb +17 -0
  21. data/lib/riot_games_api/lol/model/league/league_item.rb +35 -0
  22. data/lib/riot_games_api/lol/model/league/mini_series.rb +17 -0
  23. data/lib/riot_games_api/lol/model/league.rb +12 -0
  24. data/lib/riot_games_api/lol/model/static_data/basic_data.rb +35 -0
  25. data/lib/riot_games_api/lol/model/static_data/basic_data_stats.rb +77 -0
  26. data/lib/riot_games_api/lol/model/static_data/block.rb +14 -0
  27. data/lib/riot_games_api/lol/model/static_data/block_item.rb +14 -0
  28. data/lib/riot_games_api/lol/model/static_data/champion.rb +29 -0
  29. data/lib/riot_games_api/lol/model/static_data/champion_list.rb +17 -0
  30. data/lib/riot_games_api/lol/model/static_data/champion_list_data_by_id.rb +11 -0
  31. data/lib/riot_games_api/lol/model/static_data/champion_spell.rb +32 -0
  32. data/lib/riot_games_api/lol/model/static_data/gold.rb +16 -0
  33. data/lib/riot_games_api/lol/model/static_data/group.rb +14 -0
  34. data/lib/riot_games_api/lol/model/static_data/image.rb +19 -0
  35. data/lib/riot_games_api/lol/model/static_data/info.rb +16 -0
  36. data/lib/riot_games_api/lol/model/static_data/item.rb +35 -0
  37. data/lib/riot_games_api/lol/model/static_data/item_list.rb +18 -0
  38. data/lib/riot_games_api/lol/model/static_data/item_tree.rb +14 -0
  39. data/lib/riot_games_api/lol/model/static_data/level_tip.rb +14 -0
  40. data/lib/riot_games_api/lol/model/static_data/mastery.rb +19 -0
  41. data/lib/riot_games_api/lol/model/static_data/mastery_list.rb +16 -0
  42. data/lib/riot_games_api/lol/model/static_data/mastery_tree.rb +15 -0
  43. data/lib/riot_games_api/lol/model/static_data/mastery_tree_item.rb +14 -0
  44. data/lib/riot_games_api/lol/model/static_data/mastery_tree_list.rb +13 -0
  45. data/lib/riot_games_api/lol/model/static_data/meta_data.rb +18 -0
  46. data/lib/riot_games_api/lol/model/static_data/passive.rb +16 -0
  47. data/lib/riot_games_api/lol/model/static_data/realm.rb +21 -0
  48. data/lib/riot_games_api/lol/model/static_data/recommended.rb +19 -0
  49. data/lib/riot_games_api/lol/model/static_data/rune.rb +35 -0
  50. data/lib/riot_games_api/lol/model/static_data/rune_list.rb +16 -0
  51. data/lib/riot_games_api/lol/model/static_data/skin.rb +15 -0
  52. data/lib/riot_games_api/lol/model/static_data/spell_vars.rb +16 -0
  53. data/lib/riot_games_api/lol/model/static_data/stats.rb +32 -0
  54. data/lib/riot_games_api/lol/model/static_data/summoner_spell.rb +35 -0
  55. data/lib/riot_games_api/lol/model/static_data/summoner_spell_list.rb +15 -0
  56. data/lib/riot_games_api/lol/model/static_data/summoner_spell_list_data_by_id.rb +11 -0
  57. data/lib/riot_games_api/lol/model/static_data.rb +47 -0
  58. data/lib/riot_games_api/lol/model/stats/aggregated_stats.rb +68 -0
  59. data/lib/riot_games_api/lol/model/stats/champion_stats.rb +14 -0
  60. data/lib/riot_games_api/lol/model/stats/player_stats_summary.rb +17 -0
  61. data/lib/riot_games_api/lol/model/stats/player_stats_summary_list.rb +14 -0
  62. data/lib/riot_games_api/lol/model/stats/ranked_stats.rb +15 -0
  63. data/lib/riot_games_api/lol/model/stats.rb +15 -0
  64. data/lib/riot_games_api/lol/model/summoner/mastery.rb +14 -0
  65. data/lib/riot_games_api/lol/model/summoner/mastery_page.rb +16 -0
  66. data/lib/riot_games_api/lol/model/summoner/mastery_page_list.rb +14 -0
  67. data/lib/riot_games_api/lol/model/summoner/rune_page.rb +16 -0
  68. data/lib/riot_games_api/lol/model/summoner/rune_page_list.rb +14 -0
  69. data/lib/riot_games_api/lol/model/summoner/rune_slot.rb +14 -0
  70. data/lib/riot_games_api/lol/model/summoner/summoner.rb +17 -0
  71. data/lib/riot_games_api/lol/model/summoner.rb +16 -0
  72. data/lib/riot_games_api/lol/model/team/match_history_summary.rb +23 -0
  73. data/lib/riot_games_api/lol/model/team/message_of_day.rb +15 -0
  74. data/lib/riot_games_api/lol/model/team/roster.rb +14 -0
  75. data/lib/riot_games_api/lol/model/team/team.rb +27 -0
  76. data/lib/riot_games_api/lol/model/team/team_member_info.rb +16 -0
  77. data/lib/riot_games_api/lol/model/team/team_stat_detail.rb +17 -0
  78. data/lib/riot_games_api/lol/model/team/team_stat_summary.rb +14 -0
  79. data/lib/riot_games_api/lol/model/team.rb +16 -0
  80. data/lib/riot_games_api/lol/model.rb +16 -0
  81. data/lib/riot_games_api/lol/resource/base.rb +22 -0
  82. data/lib/riot_games_api/lol/resource/champion.rb +39 -0
  83. data/lib/riot_games_api/lol/resource/game.rb +23 -0
  84. data/lib/riot_games_api/lol/resource/league.rb +65 -0
  85. data/lib/riot_games_api/lol/resource/static_data.rb +91 -0
  86. data/lib/riot_games_api/lol/resource/stats.rb +28 -0
  87. data/lib/riot_games_api/lol/resource/summoner.rb +52 -0
  88. data/lib/riot_games_api/lol/resource/team.rb +34 -0
  89. data/lib/riot_games_api/lol/resource.rb +15 -0
  90. data/lib/riot_games_api/version.rb +3 -0
  91. data/lib/riot_games_api.rb +15 -0
  92. data/riot_games_api.gemspec +34 -0
  93. data/spec/lol/resource/champion_spec.rb +27 -0
  94. data/spec/lol/resource/game_spec.rb +40 -0
  95. data/spec/lol/resource/league_spec.rb +93 -0
  96. data/spec/lol/resource/static_data_spec.rb +215 -0
  97. data/spec/lol/resource/stats_spec.rb +57 -0
  98. data/spec/lol/resource/summoner_spec.rb +80 -0
  99. data/spec/lol/resource/team_spec.rb +31 -0
  100. data/spec/spec_helper.rb +21 -0
  101. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Champion/_all/should_first_record_is_Aatrox.yml +44 -0
  102. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Champion/_by_champion_id/should_be_Teemo.yml +44 -0
  103. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Champion/_free/should_be_only_free_champions.yml +44 -0
  104. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_champinons_is_Talon_in_first_game_record.yml +44 -0
  105. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_first_fellow_player_s_team_is_blue.yml +44 -0
  106. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_first_game_is_win.yml +44 -0
  107. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_game_record_have_player_model.yml +44 -0
  108. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_game_record_have_raw_stats_model.yml +44 -0
  109. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_game_records_count_is_10.yml +44 -0
  110. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Game/_recent/should_have_summoner_id.yml +44 -0
  111. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_summoner_id/should_have_league_item_entries.yml +1497 -0
  112. 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
  113. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_summoner_id_only_own_entry/should_ojarusang_is_in_series.yml +43 -0
  114. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_summoner_id_only_own_entry/should_ojarusang_s_tier_is_platinum.yml +43 -0
  115. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_team_id/should_have_league_item_entries.yml +864 -0
  116. 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
  117. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_team_id_only_own_entry/should_ffg_practice_is_not_in_series.yml +44 -0
  118. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_by_team_id_only_own_entry/should_ffg_practice_tier_is_challenger.yml +44 -0
  119. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_solo_5v5/should_queue_is_ranked_solo_5v5.yml +1281 -0
  120. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_solo_5v5/should_tier_is_challenger.yml +1281 -0
  121. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_team_3v3/should_queue_is_ranked_team_3v3.yml +123 -0
  122. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_team_3v3/should_tier_is_challenger.yml +123 -0
  123. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_team_5v5/should_queue_is_ranked_team_5v5.yml +61 -0
  124. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_League/_challenger_team_5v5/should_tier_is_challenger.yml +61 -0
  125. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/_realm/should_have_data_cdn_is_cdn_url.yml +44 -0
  126. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/_realm/should_have_static_data_of_realm.yml +44 -0
  127. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_all/key_by_id_is_false/should_have_inputed_data_version.yml +38011 -0
  128. 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
  129. 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
  130. 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
  131. 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
  132. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_by_id/should_have_data_key_is_shaco.yml +151 -0
  133. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/champion/_champion_by_id/should_have_static_data_of_champion.yml +151 -0
  134. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_all/should_have_inputed_data_version.yml +2388 -0
  135. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_all/should_have_static_data_of_items.yml +2388 -0
  136. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_all/should_have_static_data_with_item_name.yml +2388 -0
  137. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_by_id/should_have_data_name_is_biscuit.yml +46 -0
  138. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/item/_item_by_id/should_have_static_data_of_item.yml +46 -0
  139. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_all/should_have_inputed_data_version.yml +240 -0
  140. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_all/should_have_static_data_of_masterys.yml +240 -0
  141. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_all/should_have_static_data_with_mastery_name.yml +240 -0
  142. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_by_id/should_have_data_name_is_sorcery.yml +47 -0
  143. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/mastery/_mastery_by_id/should_have_static_data_of_mastery.yml +47 -0
  144. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_all/should_have_inputed_data_version.yml +733 -0
  145. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_all/should_have_static_data_of_runes.yml +733 -0
  146. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_all/should_have_static_data_with_rune_name.yml +733 -0
  147. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_by_id/should_have_data_name_is_rune_name.yml +45 -0
  148. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/rune/_rune_by_id/should_have_static_data_of_rune.yml +45 -0
  149. 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
  150. 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
  151. 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
  152. 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
  153. 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
  154. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/summoner_spell/_summoner_spell_by_id/should_have_data_name_is_teleport.yml +55 -0
  155. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_StaticData/summoner_spell/_summoner_spell_by_id/should_have_static_data_of_summoner_spell.yml +55 -0
  156. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_ranked/latest_season/should_not_found_ranked_stats.yml +57 -0
  157. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_ranked/season3/should_have_champion_stats.yml +44 -0
  158. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_ranked/season3/should_have_modify_data_which_unixtime_milliseconds.yml +44 -0
  159. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_summary/latest_season/should_have_player_stat_summaries.yml +44 -0
  160. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_summary/latest_season/should_have_summoner_id_inputed.yml +44 -0
  161. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_summary/season3/should_have_player_stat_summaries.yml +44 -0
  162. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Stats/_summary/season3/should_have_summoner_id_inputed.yml +44 -0
  163. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_id/should_have_key_which_is_summoner_id.yml +44 -0
  164. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_id/should_have_summoner_model.yml +44 -0
  165. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_id/should_summoner_model_have_summoner_level.yml +44 -0
  166. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_name/should_have_key_which_is_summoner_name.yml +44 -0
  167. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_name/should_have_summoner_model.yml +44 -0
  168. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_by_name/should_summoner_model_have_summoner_level.yml +44 -0
  169. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_masteries/should_have_key_which_is_summoner_id.yml +52 -0
  170. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_masteries/should_have_mastery_page_list_model.yml +52 -0
  171. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_masteries/should_have_mastery_page_model.yml +52 -0
  172. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_name/should_have_summoner_name.yml +44 -0
  173. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_runes/should_have_key_which_is_summoner_id.yml +56 -0
  174. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_runes/should_have_rune_page_list_model.yml +56 -0
  175. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Summoner/_runes/should_have_rune_page_model.yml +56 -0
  176. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Team/_by_summoner_id/should_have_focus_me_s_full_id.yml +314 -0
  177. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Team/_by_summoner_id/should_have_team_model.yml +314 -0
  178. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Team/_by_team_id/should_have_key_which_is_team_id.yml +165 -0
  179. data/spec/vcr_cassettes/RiotGamesApi_LOL_Resource_Team/_by_team_id/should_have_team_model.yml +165 -0
  180. metadata +484 -0
@@ -0,0 +1,16 @@
1
+ require 'virtus'
2
+
3
+ module RiotGamesApi
4
+ module LOL
5
+ module Model
6
+ module Corecion
7
+ class Time < Virtus::Attribute
8
+ def coerce(value)
9
+ unixtime_remove_millisecond = value / 1000
10
+ ::Time.at(unixtime_remove_millisecond)
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,27 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module Game
5
+ class Game
6
+ include Virtus.model
7
+
8
+ attribute :champion_id, Integer
9
+ attribute :create_date, RiotGamesApi::LOL::Model::Corecion::Time
10
+ attribute :fellow_players, Array[RiotGamesApi::LOL::Model::Game::Player]
11
+ attribute :game_id, Integer
12
+ attribute :game_mode, String
13
+ attribute :game_type, String
14
+ attribute :invalid, Boolean
15
+ attribute :ip_earned, Integer
16
+ attribute :level, Integer
17
+ attribute :map_id, Integer
18
+ attribute :spell1, Integer
19
+ attribute :spell2, Integer
20
+ attribute :stats, RiotGamesApi::LOL::Model::Game::RawStats
21
+ attribute :sub_type, String
22
+ attribute :team_id, Integer
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,15 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module Game
5
+ class Player
6
+ include Virtus.model
7
+
8
+ attribute :champion_id, Integer
9
+ attribute :summoner_id, Integer
10
+ attribute :team_id, Integer
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,88 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module Game
5
+ class RawStats
6
+ include Virtus.model
7
+
8
+ attribute :assists, Integer
9
+ attribute :barracks_killed, Integer
10
+ attribute :champions_killed, Integer
11
+ attribute :combat_player_score, Integer
12
+ attribute :consumables_purchased, Integer
13
+ attribute :damage_dealt_player, Integer
14
+ attribute :double_kills, Integer
15
+ attribute :first_blood, Integer
16
+ attribute :gold, Integer
17
+ attribute :gold_earned, Integer
18
+ attribute :gold_spent, Integer
19
+ attribute :item0, Integer
20
+ attribute :item1, Integer
21
+ attribute :item2, Integer
22
+ attribute :item3, Integer
23
+ attribute :item4, Integer
24
+ attribute :item5, Integer
25
+ attribute :item6, Integer
26
+ attribute :items_purchased, Integer
27
+ attribute :killing_sprees, Integer
28
+ attribute :largest_critical_strike, Integer
29
+ attribute :largest_killing_spree, Integer
30
+ attribute :largest_multi_kill, Integer
31
+ attribute :legendary_items_created, Integer
32
+ attribute :level, Integer
33
+ attribute :magic_damage_dealt_player, Integer
34
+ attribute :magic_damage_dealt_to_champions, Integer
35
+ attribute :magic_damage_taken, Integer
36
+ attribute :minions_denied, Integer
37
+ attribute :minions_killed, Integer
38
+ attribute :neutral_minions_killed, Integer
39
+ attribute :neutral_minions_killed_enemy_jungle, Integer
40
+ attribute :neutral_minions_killed_your_jungle, Integer
41
+ attribute :nexus_killed, Boolean
42
+ attribute :node_capture, Integer
43
+ attribute :node_capture_assist, Integer
44
+ attribute :node_neutralize, Integer
45
+ attribute :node_neutralize_assist, Integer
46
+ attribute :num_deaths, Integer
47
+ attribute :num_items_bought, Integer
48
+ attribute :objective_player_score, Integer
49
+ attribute :penta_kills, Integer
50
+ attribute :physical_damage_dealt_player, Integer
51
+ attribute :physical_damage_dealt_to_champions, Integer
52
+ attribute :physical_damage_taken, Integer
53
+ attribute :quadra_kills, Integer
54
+ attribute :sight_wards_bought, Integer
55
+ attribute :spell1_cast, Integer
56
+ attribute :spell2_cast, Integer
57
+ attribute :spell3_cast, Integer
58
+ attribute :spell4_cast, Integer
59
+ attribute :summon_spell1_cast, Integer
60
+ attribute :summon_spell2_cast, Integer
61
+ attribute :super_monster_killed, Integer
62
+ attribute :team, Integer
63
+ attribute :team_objective, Integer
64
+ attribute :time_played, Integer
65
+ attribute :total_damage_dealt, Integer
66
+ attribute :total_damage_dealt_to_champions, Integer
67
+ attribute :total_damage_taken, Integer
68
+ attribute :total_heal, Integer
69
+ attribute :total_player_score, Integer
70
+ attribute :total_score_rank, Integer
71
+ attribute :total_time_crowd_control_dealt, Integer
72
+ attribute :total_units_healed, Integer
73
+ attribute :triple_kills, Integer
74
+ attribute :true_damage_dealt_player, Integer
75
+ attribute :true_damage_dealt_to_champions, Integer
76
+ attribute :true_damage_taken, Integer
77
+ attribute :turrets_killed, Integer
78
+ attribute :unreal_kills, Integer
79
+ attribute :victory_point_total, Integer
80
+ attribute :vision_wards_bought, Integer
81
+ attribute :ward_killed, Integer
82
+ attribute :ward_placed, Integer
83
+ attribute :win, Boolean
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,14 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module Game
5
+ class RecentGame
6
+ include Virtus.model
7
+
8
+ attribute :games, Set[RiotGamesApi::LOL::Model::Game::Game]
9
+ attribute :summoner_id, Integer
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ require 'riot_games_api/lol/model/game/player'
2
+ require 'riot_games_api/lol/model/game/raw_stats'
3
+ require 'riot_games_api/lol/model/game/game'
4
+ require 'riot_games_api/lol/model/game/recent_game'
5
+
6
+ module RiotGamesApi
7
+ module LOL
8
+ module Model
9
+ module Game
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,17 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module League
5
+ class League
6
+ include Virtus.model
7
+
8
+ attribute :entries, Array[RiotGamesApi::LOL::Model::League::LeagueItem]
9
+ attribute :name, String
10
+ attribute :participant_id, Integer
11
+ attribute :queue, String
12
+ attribute :tier, String
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,35 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module League
5
+ class LeagueItem
6
+ include Virtus.model
7
+
8
+ attribute :is_fresh_blood, Boolean
9
+ attribute :is_hot_streak, Boolean
10
+ attribute :is_inactive, Boolean
11
+ attribute :is_veteran, Boolean
12
+ attribute :last_played, Integer
13
+ attribute :league_name, String
14
+ attribute :league_points, Integer
15
+ attribute :mini_series, RiotGamesApi::LOL::Model::League::MiniSeries
16
+ attribute :player_or_team_id, String
17
+ attribute :player_or_team_name, String
18
+ attribute :queue_type, String
19
+ attribute :rank, String
20
+ attribute :tier, String
21
+ attribute :wins, Integer
22
+
23
+ alias_method :fresh_blood, :is_fresh_blood
24
+ alias_method :fresh_blood?, :is_fresh_blood?
25
+ alias_method :hot_streak, :is_hot_streak
26
+ alias_method :hot_streak?, :is_hot_streak?
27
+ alias_method :inactive, :is_inactive
28
+ alias_method :inactive?, :is_inactive?
29
+ alias_method :veteran, :is_veteran
30
+ alias_method :veteran?, :is_veteran?
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,17 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module League
5
+ class MiniSeries
6
+ include Virtus.model
7
+
8
+ attribute :losses, Integer
9
+ attribute :progress, String
10
+ attribute :target, Integer
11
+ attribute :time_left_to_play_millis, Integer
12
+ attribute :wins, Integer
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,12 @@
1
+ require 'riot_games_api/lol/model/league/mini_series'
2
+ require 'riot_games_api/lol/model/league/league_item'
3
+ require 'riot_games_api/lol/model/league/league'
4
+
5
+ module RiotGamesApi
6
+ module LOL
7
+ module Model
8
+ module League
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,35 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class BasicData
6
+ include Virtus.model
7
+
8
+ attribute :colloq, String
9
+ attribute :consume_on_full, Boolean
10
+ attribute :consumed, Boolean
11
+ attribute :depth, Integer
12
+ attribute :description, String
13
+ attribute :from, Array[Integer]
14
+ attribute :gold, RiotGamesApi::LOL::Model::StaticData::Gold
15
+ attribute :group, String
16
+ attribute :hide_from_all, Boolean
17
+ attribute :id, Integer
18
+ attribute :image, RiotGamesApi::LOL::Model::StaticData::Image
19
+ attribute :in_store, Boolean
20
+ attribute :into, Array[Integer]
21
+ attribute :maps, Hash[Integer => Boolean]
22
+ attribute :name, String
23
+ attribute :plaintext, String
24
+ attribute :required_champion, String
25
+ attribute :rune, RiotGamesApi::LOL::Model::StaticData::MetaData
26
+ attribute :sanitized_description, String
27
+ attribute :special_recipe, Integer
28
+ attribute :stacks, Integer
29
+ attribute :stats, RiotGamesApi::LOL::Model::StaticData::BasicDataStats
30
+ attribute :tags, Array[String]
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,77 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class BasicDataStats
6
+ include Virtus.model
7
+
8
+ attribute :flat_armor_mod, Float
9
+ attribute :flat_attack_speed_mod, Float
10
+ attribute :flat_block_mod, Float
11
+ attribute :flat_crit_chance_mod, Float
12
+ attribute :flat_crit_damage_mod, Float
13
+ attribute :flat_exp_bonus, Float
14
+ attribute :flat_energy_pool_mod, Float
15
+ attribute :flat_energy_regen_mod, Float
16
+ attribute :flat_hp_pool_mod, Float
17
+ attribute :flat_hp_regen_mod, Float
18
+ attribute :flat_mp_pool_mod, Float
19
+ attribute :flat_mp_regen_mod, Float
20
+ attribute :flat_magic_damage_mod, Float
21
+ attribute :flat_movement_speed_mod, Float
22
+ attribute :flat_physical_damage_mod, Float
23
+ attribute :flat_spell_block_mod, Float
24
+ attribute :percent_armor_mod, Float
25
+ attribute :percent_attack_speed_mod, Float
26
+ attribute :percent_block_mod, Float
27
+ attribute :percent_crit_chance_mod, Float
28
+ attribute :percent_crit_damage_mod, Float
29
+ attribute :percent_dodge_mod, Float
30
+ attribute :percent_exp_bonus, Float
31
+ attribute :percent_hp_pool_mod, Float
32
+ attribute :percent_hp_regen_mod, Float
33
+ attribute :percent_life_steal_mod, Float
34
+ attribute :percent_mp_pool_mod, Float
35
+ attribute :percent_mp_regen_mod, Float
36
+ attribute :percent_magic_damage_mod, Float
37
+ attribute :percent_movement_speed_mod, Float
38
+ attribute :percent_physical_damage_mod, Float
39
+ attribute :percent_spell_block_mod, Float
40
+ attribute :percent_spell_vamp_mod, Float
41
+ attribute :r_flat_armor_mod_per_level, Float
42
+ attribute :r_flat_armor_penetration_mod, Float
43
+ attribute :r_flat_armor_penetration_mod_per_level, Float
44
+ attribute :r_flat_crit_chance_mod_per_level, Float
45
+ attribute :r_flat_crit_damage_mod_per_level, Float
46
+ attribute :r_flat_dodge_mod, Float
47
+ attribute :r_flat_dodge_mod_per_level, Float
48
+ attribute :r_flat_energy_mod_per_level, Float
49
+ attribute :r_flat_energy_regen_mod_per_level, Float
50
+ attribute :r_flat_gold_per10mod, Float
51
+ attribute :r_flat_hp_mod_per_level, Float
52
+ attribute :r_flat_hp_regen_mod_per_level, Float
53
+ attribute :r_flat_mp_mod_per_level, Float
54
+ attribute :r_flat_mp_regen_mod_per_level, Float
55
+ attribute :r_flat_magic_damage_mod_per_level, Float
56
+ attribute :r_flat_magic_penetration_mod, Float
57
+ attribute :r_flat_magic_penetration_mod_per_level, Float
58
+ attribute :r_flat_movement_speed_mod_per_level, Float
59
+ attribute :r_flat_physical_damage_mod_per_level, Float
60
+ attribute :r_flat_spell_block_mod_per_level, Float
61
+ attribute :r_flat_time_dead_mod, Float
62
+ attribute :r_flat_time_dead_mod_per_level, Float
63
+ attribute :r_percent_armor_penetration_mod, Float
64
+ attribute :r_percent_armor_penetration_mod_per_level, Float
65
+ attribute :r_percent_attack_speed_mod_per_level, Float
66
+ attribute :r_percent_cooldown_mod, Float
67
+ attribute :r_percent_cooldown_mod_per_level, Float
68
+ attribute :r_percent_magic_penetration_mod, Float
69
+ attribute :r_percent_magic_penetration_mod_per_level, Float
70
+ attribute :r_percent_movement_speed_mod_per_level, Float
71
+ attribute :r_percent_time_dead_mod, Float
72
+ attribute :r_percent_time_dead_mod_per_level, Float
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,14 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class Block
6
+ include Virtus.model
7
+
8
+ attribute :items, Array[RiotGamesApi::LOL::Model::StaticData::BlockItem]
9
+ attribute :type, Integer
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class BlockItem
6
+ include Virtus.model
7
+
8
+ attribute :count, Integer
9
+ attribute :id, Integer
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,29 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class Champion
6
+ include Virtus.model
7
+
8
+ attribute :allytips, Array[String]
9
+ attribute :blurb, String
10
+ attribute :enemytips, Array[String]
11
+ attribute :id, Integer
12
+ attribute :image, RiotGamesApi::LOL::Model::StaticData::Image
13
+ attribute :info, RiotGamesApi::LOL::Model::StaticData::Info
14
+ attribute :key, String
15
+ attribute :lore, String
16
+ attribute :name, String
17
+ attribute :partype, String
18
+ attribute :passive, RiotGamesApi::LOL::Model::StaticData::Passive
19
+ attribute :recommended, Array[RiotGamesApi::LOL::Model::StaticData::Recommended]
20
+ attribute :skins, Array[RiotGamesApi::LOL::Model::StaticData::Skin]
21
+ attribute :spells, Array[RiotGamesApi::LOL::Model::StaticData::ChampionSpell]
22
+ attribute :stats, RiotGamesApi::LOL::Model::StaticData::Stats
23
+ attribute :tags, Array[String]
24
+ attribute :title, String
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,17 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class ChampionList
6
+ include Virtus.model
7
+
8
+ attribute :data, Hash[String => RiotGamesApi::LOL::Model::StaticData::Champion]
9
+ attribute :format, String
10
+ attribute :keys, Hash[Integer => String]
11
+ attribute :type, String
12
+ attribute :version, String
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class ChampionListDataById < ChampionList
6
+ attribute :data, Hash[Integer => RiotGamesApi::LOL::Model::StaticData::Champion]
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,32 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class ChampionSpell
6
+ include Virtus.model
7
+
8
+ attribute :cooldown, Array[Integer]
9
+ attribute :cooldown_burn, String
10
+ attribute :cost, Array[Integer]
11
+ attribute :cost_burn, String
12
+ attribute :cost_type, String
13
+ attribute :description, String
14
+ attribute :effect, Array[Array[Integer]]
15
+ attribute :effect_burn, Array[String]
16
+ attribute :image, RiotGamesApi::LOL::Model::StaticData::Image
17
+ attribute :key, String
18
+ attribute :leveltip, RiotGamesApi::LOL::Model::StaticData::LevelTip
19
+ attribute :maxrank, Integer
20
+ attribute :name, String
21
+ attribute :range, Array # array of integer or string
22
+ attribute :range_burn, String
23
+ attribute :resource, String
24
+ attribute :sanitized_description, String
25
+ attribute :sanitized_tooltip, String
26
+ attribute :tooltip, String
27
+ attribute :vars, Array[RiotGamesApi::LOL::Model::StaticData::SpellVars]
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,16 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class Gold
6
+ include Virtus.model
7
+
8
+ attribute :base, Integer
9
+ attribute :purchasable, Boolean
10
+ attribute :sell, Integer
11
+ attribute :total, Integer
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,14 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class Group
6
+ include Virtus.model
7
+
8
+ attribute :max_group_ownable, String
9
+ attribute :key, String
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class Image
6
+ include Virtus.model
7
+
8
+ attribute :full, String
9
+ attribute :group, String
10
+ attribute :h, Integer
11
+ attribute :sprite, String
12
+ attribute :w, Integer
13
+ attribute :x, Integer
14
+ attribute :y, Integer
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,16 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class Info
6
+ include Virtus.model
7
+
8
+ attribute :attack, Integer
9
+ attribute :defense, Integer
10
+ attribute :difficulty, Integer
11
+ attribute :magic, Integer
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,35 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class Item
6
+ include Virtus.model
7
+
8
+ attribute :colloq, String
9
+ attribute :consume_on_full, Boolean
10
+ attribute :consumed, Boolean
11
+ attribute :depth, Integer
12
+ attribute :description, String
13
+ attribute :from, Array[String]
14
+ attribute :gold, RiotGamesApi::LOL::Model::StaticData::Gold
15
+ attribute :group, String
16
+ attribute :hide_from_all, Boolean
17
+ attribute :id, Integer
18
+ attribute :image, RiotGamesApi::LOL::Model::StaticData::Image
19
+ attribute :in_store, Boolean
20
+ attribute :into, Array[String]
21
+ attribute :maps, Hash[Integer => Boolean]
22
+ attribute :name, String
23
+ attribute :plaintext, String
24
+ attribute :required_champion, String
25
+ attribute :rune, RiotGamesApi::LOL::Model::StaticData::MetaData
26
+ attribute :sanitized_description, String
27
+ attribute :special_recipe, Integer
28
+ attribute :stacks, Integer
29
+ attribute :stats, RiotGamesApi::LOL::Model::StaticData::BasicDataStats
30
+ attribute :tags, Array[String]
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,18 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class ItemList
6
+ include Virtus.model
7
+
8
+ attribute :basic, RiotGamesApi::LOL::Model::StaticData::BasicData
9
+ attribute :data, Hash[Integer => RiotGamesApi::LOL::Model::StaticData::Item]
10
+ attribute :group, Array[RiotGamesApi::LOL::Model::StaticData::Group]
11
+ attribute :tree, Array[RiotGamesApi::LOL::Model::StaticData::ItemTree]
12
+ attribute :type, String
13
+ attribute :version, String
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,14 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class ItemTree
6
+ include Virtus.model
7
+
8
+ attribute :header, String
9
+ attribute :tags, Array[String]
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RiotGamesApi
2
+ module LOL
3
+ module Model
4
+ module StaticData
5
+ class LevelTip
6
+ include Virtus.model
7
+
8
+ attribute :effect, Array[String]
9
+ attribute :label, Array[String]
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end