dota 0.0.12 → 0.0.14

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/Guardfile +1 -1
  3. data/README.md +145 -112
  4. data/data/heroes.yml +327 -0
  5. data/data/items.yml +714 -0
  6. data/lib/dota.rb +8 -1
  7. data/lib/dota/api/basic_match.rb +52 -0
  8. data/lib/dota/api/basic_player.rb +61 -0
  9. data/lib/dota/api/client.rb +12 -2
  10. data/lib/dota/api/cosmetic/rarity.rb +1 -9
  11. data/lib/dota/api/entity.rb +13 -0
  12. data/lib/dota/api/friend.rb +1 -9
  13. data/lib/dota/api/hero.rb +2 -111
  14. data/lib/dota/api/item.rb +1 -240
  15. data/lib/dota/api/league.rb +6 -8
  16. data/lib/dota/api/live_match.rb +29 -35
  17. data/lib/dota/api/live_match/player.rb +29 -22
  18. data/lib/dota/api/live_match/side.rb +25 -11
  19. data/lib/dota/api/match.rb +30 -117
  20. data/lib/dota/api/match/draft.rb +1 -9
  21. data/lib/dota/api/match/player.rb +7 -59
  22. data/lib/dota/api/match/side.rb +41 -0
  23. data/lib/dota/api/scheduled_match.rb +32 -0
  24. data/lib/dota/api/team.rb +1 -9
  25. data/lib/dota/version.rb +1 -1
  26. data/spec/dota/api/cosmetic/rarity_spec.rb +2 -2
  27. data/spec/dota/api/hero_spec.rb +2 -6
  28. data/spec/dota/api/item_spec.rb +1 -5
  29. data/spec/dota/api/live_match/player_spec.rb +76 -8
  30. data/spec/dota/api/live_match/side_spec.rb +42 -8
  31. data/spec/dota/api/live_match_spec.rb +5 -16
  32. data/spec/dota/api/match/draft_spec.rb +4 -1
  33. data/spec/dota/api/match/player_spec.rb +7 -3
  34. data/spec/dota/api/match/side_spec.rb +54 -0
  35. data/spec/dota/api/match_spec.rb +0 -62
  36. data/spec/dota/api/scheduled_match_spec.rb +36 -0
  37. data/spec/dota_spec.rb +56 -7
  38. data/spec/fixtures/vcr_cassettes/GetScheduledLeagueGames.yml +112 -0
  39. metadata +15 -5
  40. data/lib/dota/api/live_match/scoreboard.rb +0 -31
  41. data/spec/dota/api/live_match/scoreboard_spec.rb +0 -25
@@ -1,31 +0,0 @@
1
- module Dota
2
- module API
3
- class LiveMatch
4
- class Scoreboard
5
- include Utilities::Inspectable
6
-
7
- attr_reader :raw
8
-
9
- def initialize(raw)
10
- @raw = raw
11
- end
12
-
13
- def duration
14
- raw["duration"]
15
- end
16
-
17
- def roshan_timer
18
- raw["roshan_respawn_timer"]
19
- end
20
-
21
- def radiant
22
- raw["radiant"] # this maps out much further. for now it'll act as a hash
23
- end
24
-
25
- def dire
26
- raw["dire"] # this maps out much further. for now it'll act as a hash
27
- end
28
- end
29
- end
30
- end
31
- end
@@ -1,25 +0,0 @@
1
- describe Dota::API::LiveMatch::Scoreboard do
2
- let(:scoreboard) do
3
- VCR.use_cassette("GetLiveLeagueGames") do
4
- matches = test_client.live_matches
5
- first_match = matches.first
6
- first_match.scoreboard
7
- end
8
- end
9
-
10
- specify "#duration" do
11
- expect(scoreboard.duration).to eq 2840.2998046875
12
- end
13
-
14
- specify "#roshan_timer" do
15
- expect(scoreboard.roshan_timer).to eq 278
16
- end
17
-
18
- xspecify "#radiant" do
19
- expect(scoreboard.radiant).to eq
20
- end
21
-
22
- xspecify "#dire" do
23
- expect(scoreboard.dire).to eq
24
- end
25
- end