valorant 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -6
- data/Gemfile.lock +1 -1
- data/lib/api/utils/match.rb +5 -0
- data/lib/api/utils/matches_history.rb +16 -0
- data/lib/api/utils/player.rb +4 -0
- data/lib/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af83d2af3234b500b0ee1f3473619b5362d290fbcf4c6712baf5051af1b7a8c6
|
4
|
+
data.tar.gz: e1d40bfaacc474da3eab78f992e4a7c07dda199567c179b4fa2665919eae6515
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be21b3466f2d24ce812b2fe17ab62f7901b43ba21d971d13b1511ef3609b81495df78d095570e07d1c091c4a0e3350948bd22c9f053baf783674bf6a8f6f9391
|
7
|
+
data.tar.gz: 77800ac5facd18a081a35e764b5b776424b5f435b78b51b6567525163076b9e66ba2394a8eab9c3dd44ab3451a540b5d204916b5da02caa5276ce52be5d04d08
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
## [
|
1
|
+
## [0.1.2] - 2022-11-21
|
2
2
|
|
3
|
-
|
3
|
+
- Minor bug fixes and improvements
|
4
4
|
|
5
|
-
-
|
5
|
+
## [0.1.3] - 2022-11-21
|
6
6
|
|
7
|
-
|
7
|
+
- Minor bug fixes and improvements
|
8
8
|
|
9
|
-
## [0.1.
|
9
|
+
## [0.1.4] - 2022-11-27
|
10
10
|
|
11
|
-
- Added
|
11
|
+
- Added ".accuracy" method
|
data/Gemfile.lock
CHANGED
data/lib/api/utils/match.rb
CHANGED
@@ -33,6 +33,11 @@ class Match
|
|
33
33
|
@blue_team.max_by(&:score)
|
34
34
|
end
|
35
35
|
|
36
|
+
def accuracy(name, tag)
|
37
|
+
player = @all_players.select { |player| player.name.gsub(' ', '') == name.gsub(' ', '') && player.tag == tag }
|
38
|
+
[player[0].headshots, player[0].bodyshots, player[0].legshots]
|
39
|
+
end
|
40
|
+
|
36
41
|
def fetch_game_info
|
37
42
|
@game_version = @meta_data['game_version']
|
38
43
|
@game_start_patched = @meta_data['game_start_patched']
|
@@ -10,6 +10,22 @@ class MatcheshHistory
|
|
10
10
|
@matches = fetch_matches(hash['data'])
|
11
11
|
end
|
12
12
|
|
13
|
+
def accuracy(name, tag)
|
14
|
+
body_shots = 0
|
15
|
+
head_shots = 0
|
16
|
+
leg_shots = 0
|
17
|
+
|
18
|
+
@matches.each do |match|
|
19
|
+
headshots, bodyshots, legshots = match.accuracy(name, tag)
|
20
|
+
|
21
|
+
head_shots += headshots
|
22
|
+
body_shots += bodyshots
|
23
|
+
leg_shots += legshots
|
24
|
+
end
|
25
|
+
|
26
|
+
[head_shots, body_shots, leg_shots]
|
27
|
+
end
|
28
|
+
|
13
29
|
private
|
14
30
|
|
15
31
|
def fetch_matches(matches_json)
|
data/lib/api/utils/player.rb
CHANGED
data/lib/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valorant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerard Hernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fast_jsonparser
|