dota 0.0.12 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Guardfile +1 -1
- data/README.md +145 -112
- data/data/heroes.yml +327 -0
- data/data/items.yml +714 -0
- data/lib/dota.rb +8 -1
- data/lib/dota/api/basic_match.rb +52 -0
- data/lib/dota/api/basic_player.rb +61 -0
- data/lib/dota/api/client.rb +12 -2
- data/lib/dota/api/cosmetic/rarity.rb +1 -9
- data/lib/dota/api/entity.rb +13 -0
- data/lib/dota/api/friend.rb +1 -9
- data/lib/dota/api/hero.rb +2 -111
- data/lib/dota/api/item.rb +1 -240
- data/lib/dota/api/league.rb +6 -8
- data/lib/dota/api/live_match.rb +29 -35
- data/lib/dota/api/live_match/player.rb +29 -22
- data/lib/dota/api/live_match/side.rb +25 -11
- data/lib/dota/api/match.rb +30 -117
- data/lib/dota/api/match/draft.rb +1 -9
- data/lib/dota/api/match/player.rb +7 -59
- data/lib/dota/api/match/side.rb +41 -0
- data/lib/dota/api/scheduled_match.rb +32 -0
- data/lib/dota/api/team.rb +1 -9
- data/lib/dota/version.rb +1 -1
- data/spec/dota/api/cosmetic/rarity_spec.rb +2 -2
- data/spec/dota/api/hero_spec.rb +2 -6
- data/spec/dota/api/item_spec.rb +1 -5
- data/spec/dota/api/live_match/player_spec.rb +76 -8
- data/spec/dota/api/live_match/side_spec.rb +42 -8
- data/spec/dota/api/live_match_spec.rb +5 -16
- data/spec/dota/api/match/draft_spec.rb +4 -1
- data/spec/dota/api/match/player_spec.rb +7 -3
- data/spec/dota/api/match/side_spec.rb +54 -0
- data/spec/dota/api/match_spec.rb +0 -62
- data/spec/dota/api/scheduled_match_spec.rb +36 -0
- data/spec/dota_spec.rb +56 -7
- data/spec/fixtures/vcr_cassettes/GetScheduledLeagueGames.yml +112 -0
- metadata +15 -5
- data/lib/dota/api/live_match/scoreboard.rb +0 -31
- 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
|