riot_api 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/CHANGELOG.md +11 -0
  2. data/README.md +33 -1
  3. data/lib/riot_api/api.rb +36 -4
  4. data/lib/riot_api/model/base.rb +9 -0
  5. data/lib/riot_api/model/summoner.rb +13 -0
  6. data/lib/riot_api/model.rb +8 -0
  7. data/lib/riot_api/resource/base.rb +4 -3
  8. data/lib/riot_api/resource/base_v21.rb +9 -0
  9. data/lib/riot_api/resource/champions.rb +20 -0
  10. data/lib/riot_api/resource/game.rb +21 -0
  11. data/lib/riot_api/resource/league.rb +21 -0
  12. data/lib/riot_api/resource/stats.rb +3 -3
  13. data/lib/riot_api/resource/summoner.rb +18 -3
  14. data/lib/riot_api/resource/team.rb +21 -0
  15. data/lib/riot_api/resource.rb +6 -1
  16. data/lib/riot_api/version.rb +1 -1
  17. data/lib/riot_api.rb +1 -0
  18. data/riot_api.gemspec +1 -0
  19. data/spec/api_spec.rb +154 -9
  20. data/spec/model/summoner_spec.rb +14 -0
  21. data/spec/spec_helper.rb +6 -0
  22. data/spec/support/vcr.rb +1 -1
  23. data/spec/vcr/cassettes/RiotApi_API/_champions/_free/should_return_a_list_of_all_free_champions.yml +40 -0
  24. data/spec/vcr/cassettes/RiotApi_API/_champions/_list/should_return_a_list_of_all_champions.yml +40 -0
  25. data/spec/vcr/cassettes/RiotApi_API/_game/_recent/should_return_a_list_of_recent_games_played.yml +40 -0
  26. data/spec/vcr/cassettes/RiotApi_API/_league/_by_summoner/should_return_leagues_data_for_summoner.yml +862 -0
  27. data/spec/vcr/cassettes/RiotApi_API/_stats/_ranked/omitting_season/should_return_ranked_information_from_the_summoner_id.yml +40 -0
  28. data/spec/vcr/cassettes/RiotApi_API/_stats/_ranked/specifying_season/should_return_ranked_information_from_the_summoner_id_for_the_specified_season.yml +40 -0
  29. data/spec/vcr/cassettes/RiotApi_API/_stats/_summary/omitting_season/should_return_summary_information_from_the_summoner_id.yml +40 -0
  30. data/spec/vcr/cassettes/RiotApi_API/_stats/_summary/specifying_season/should_return_summary_information_from_the_summoner_id_for_the_specified_season.yml +40 -0
  31. data/spec/vcr/cassettes/RiotApi_API/_summoner/_masteries/should_return_a_list_of_mastery_pages_containing_lists_of_talents.yml +79 -0
  32. data/spec/vcr/cassettes/RiotApi_API/_summoner/_names/should_return_an_array_of_summoners_with_name_set.yml +40 -0
  33. data/spec/vcr/cassettes/RiotApi_API/_summoner/_runes/should_return_a_list_of_rune_pages_containing_lists_of_talents.yml +479 -0
  34. data/spec/vcr/cassettes/RiotApi_API/_team/_by_summoner/should_return_team_data_for_summoner.yml +201 -0
  35. metadata +89 -11
  36. checksums.yaml +0 -7
  37. data/spec/vcr/cassettes/RiotApi_API/_stats/_ranked/should_return_ranked_information_from_the_summoner_name.yml +0 -44
  38. data/spec/vcr/cassettes/RiotApi_API/_stats/_summary/should_return_summary_information_from_the_summoner_id.yml +0 -44
@@ -1,44 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://prod.api.pvp.net/api/lol/euw/v1.1/stats/by-summoner/19531813/summary?api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - riot_api rubygem v0.0.1
12
- response:
13
- status:
14
- code: 200
15
- message:
16
- headers:
17
- access-control-allow-headers:
18
- - Content-Type
19
- access-control-allow-methods:
20
- - GET, POST, DELETE, PUT
21
- access-control-allow-origin:
22
- - '*'
23
- content-type:
24
- - application/json;charset=UTF-8
25
- date:
26
- - Wed, 11 Dec 2013 02:36:46 GMT
27
- server:
28
- - Jetty(9.1.0.v20131115)
29
- x-newrelic-app-data:
30
- - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
31
- x-cache:
32
- - MISS from localhost
33
- x-cache-lookup:
34
- - MISS from localhost:3128
35
- via:
36
- - 1.1 localhost:3128 (squid/2.7.STABLE9)
37
- connection:
38
- - close
39
- body:
40
- encoding: UTF-8
41
- string: '{"summonerId":19531813,"playerStatSummaries":[{"playerStatSummaryType":"AramUnranked5x5","wins":24,"losses":0,"modifyDate":1386486416000,"modifyDateStr":1386486416000,"aggregatedStats":[{"id":34,"name":"TOTAL_ASSISTS","count":664},{"id":53,"name":"TOTAL_DECAYER","count":135},{"id":4,"name":"TOTAL_CHAMPION_KILLS","count":378},{"id":23,"name":"TOTAL_TURRETS_KILLED","count":19}]},{"playerStatSummaryType":"CoopVsAI","wins":2,"losses":0,"modifyDate":1341286655000,"modifyDateStr":1341286655000,"aggregatedStats":[{"id":34,"name":"TOTAL_ASSISTS","count":15},{"id":29,"name":"TOTAL_NEUTRAL_MINIONS_KILLED","count":32},{"id":4,"name":"TOTAL_CHAMPION_KILLS","count":57},{"id":23,"name":"TOTAL_TURRETS_KILLED","count":3},{"id":9,"name":"TOTAL_MINION_KILLS","count":274}]},{"playerStatSummaryType":"OdinUnranked","wins":55,"losses":0,"modifyDate":1382095875000,"modifyDateStr":1382095875000,"aggregatedStats":[{"id":1005,"name":"AVERAGE_OBJECTIVE_PLAYER_SCORE","count":790},{"id":1030,"name":"AVERAGE_CHAMPIONS_KILLED","count":14},{"id":1006,"name":"AVERAGE_NODE_CAPTURE_ASSIST","count":1},{"id":1020,"name":"MAX_NODE_CAPTURE","count":15},{"id":4,"name":"TOTAL_CHAMPION_KILLS","count":1160},{"id":1032,"name":"AVERAGE_ASSISTS","count":12},{"id":1024,"name":"MAX_COMBAT_PLAYER_SCORE","count":1160},{"id":1002,"name":"AVERAGE_TEAM_OBJECTIVE","count":1},{"id":1025,"name":"MAX_OBJECTIVE_PLAYER_SCORE","count":1323},{"id":1021,"name":"MAX_NODE_NEUTRALIZE","count":10},{"id":1027,"name":"MAX_NODE_NEUTRALIZE_ASSIST","count":6},{"id":1031,"name":"AVERAGE_NUM_DEATHS","count":8},{"id":1007,"name":"AVERAGE_NODE_NEUTRALIZE_ASSIST","count":2},{"id":1026,"name":"MAX_NODE_CAPTURE_ASSIST","count":3},{"id":1000,"name":"AVERAGE_NODE_CAPTURE","count":6},{"id":34,"name":"TOTAL_ASSISTS","count":971},{"id":1003,"name":"AVERAGE_TOTAL_PLAYER_SCORE","count":1348},{"id":1001,"name":"AVERAGE_NODE_NEUTRALIZE","count":4},{"id":48,"name":"MAX_CHAMPIONS_KILLED","count":27},{"id":53,"name":"TOTAL_DECAYER","count":150},{"id":1029,"name":"TOTAL_NODE_CAPTURE","count":600},{"id":1033,"name":"MAX_ASSISTS","count":27},{"id":1023,"name":"MAX_TOTAL_PLAYER_SCORE","count":2435},{"id":1004,"name":"AVERAGE_COMBAT_PLAYER_SCORE","count":559},{"id":1022,"name":"MAX_TEAM_OBJECTIVE","count":2},{"id":1028,"name":"TOTAL_NODE_NEUTRALIZE","count":362}]},{"playerStatSummaryType":"RankedPremade3x3","wins":1,"losses":0,"modifyDate":1347564241000,"modifyDateStr":1347564241000,"aggregatedStats":[{"id":34,"name":"TOTAL_ASSISTS","count":4},{"id":29,"name":"TOTAL_NEUTRAL_MINIONS_KILLED","count":4},{"id":4,"name":"TOTAL_CHAMPION_KILLS","count":18},{"id":23,"name":"TOTAL_TURRETS_KILLED","count":3},{"id":9,"name":"TOTAL_MINION_KILLS","count":122}]},{"playerStatSummaryType":"RankedPremade5x5","wins":46,"losses":24,"modifyDate":1362076627000,"modifyDateStr":1362076627000,"aggregatedStats":[{"id":34,"name":"TOTAL_ASSISTS","count":469},{"id":53,"name":"TOTAL_DECAYER","count":304},{"id":29,"name":"TOTAL_NEUTRAL_MINIONS_KILLED","count":905},{"id":4,"name":"TOTAL_CHAMPION_KILLS","count":437},{"id":23,"name":"TOTAL_TURRETS_KILLED","count":54},{"id":9,"name":"TOTAL_MINION_KILLS","count":11447}]},{"playerStatSummaryType":"RankedSolo5x5","wins":575,"losses":492,"modifyDate":1386583840000,"modifyDateStr":1386583840000,"aggregatedStats":[{"id":34,"name":"TOTAL_ASSISTS","count":7574},{"id":29,"name":"TOTAL_NEUTRAL_MINIONS_KILLED","count":25126},{"id":4,"name":"TOTAL_CHAMPION_KILLS","count":8032},{"id":23,"name":"TOTAL_TURRETS_KILLED","count":1192},{"id":9,"name":"TOTAL_MINION_KILLS","count":219447}]},{"playerStatSummaryType":"RankedTeam3x3","wins":9,"losses":3,"modifyDate":1334649890000,"modifyDateStr":1334649890000,"aggregatedStats":[{"id":34,"name":"TOTAL_ASSISTS","count":54},{"id":53,"name":"TOTAL_DECAYER","count":44},{"id":29,"name":"TOTAL_NEUTRAL_MINIONS_KILLED","count":842},{"id":4,"name":"TOTAL_CHAMPION_KILLS","count":85},{"id":23,"name":"TOTAL_TURRETS_KILLED","count":14},{"id":9,"name":"TOTAL_MINION_KILLS","count":1336}]},{"playerStatSummaryType":"RankedTeam5x5","wins":220,"losses":81,"modifyDate":1334316019000,"modifyDateStr":1334316019000,"aggregatedStats":[{"id":34,"name":"TOTAL_ASSISTS","count":1987},{"id":53,"name":"TOTAL_DECAYER","count":42},{"id":29,"name":"TOTAL_NEUTRAL_MINIONS_KILLED","count":7478},{"id":4,"name":"TOTAL_CHAMPION_KILLS","count":2321},{"id":23,"name":"TOTAL_TURRETS_KILLED","count":388},{"id":9,"name":"TOTAL_MINION_KILLS","count":59489}]},{"playerStatSummaryType":"Unranked","wins":2032,"losses":0,"modifyDate":1386694722000,"modifyDateStr":1386694722000,"aggregatedStats":[{"id":34,"name":"TOTAL_ASSISTS","count":25005},{"id":53,"name":"TOTAL_DECAYER","count":0},{"id":29,"name":"TOTAL_NEUTRAL_MINIONS_KILLED","count":82398},{"id":4,"name":"TOTAL_CHAMPION_KILLS","count":36159},{"id":23,"name":"TOTAL_TURRETS_KILLED","count":4223},{"id":9,"name":"TOTAL_MINION_KILLS","count":628811}]},{"playerStatSummaryType":"Unranked3x3","wins":0,"losses":0,"modifyDate":1352146280000,"modifyDateStr":1352146280000,"aggregatedStats":[{"id":53,"name":"TOTAL_DECAYER","count":150}]}]}'
42
- http_version:
43
- recorded_at: Wed, 11 Dec 2013 02:36:46 GMT
44
- recorded_with: VCR 2.6.0