espn_nba_fantasy 0.0.2.1 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5314f60e93b62ccdf2e1e3cf6049bff50dce041dea90267e6a55e9cf135bcb99
4
- data.tar.gz: dc2a8da15cadf81be9a528aac61389387da200e1aa32c6418c291f67e259029f
3
+ metadata.gz: 8af37d5a1de02fb8468cefc41d985f509e0093e8b0c8463785f6142d869e3435
4
+ data.tar.gz: 8437fad4fa2f5cca09c90a35672a59299f5272d975f406d9edcfc56f3939ea73
5
5
  SHA512:
6
- metadata.gz: 30d6f7e686ba062fc860ebe1a385d7d08161de1c36cf1400cfd59c037828b375bc04779f557636d1cf7af1e8e4dff0da1abcc63904dfb6a2b80541a57d8daf51
7
- data.tar.gz: 0b3d61a04c9515d96e580cee05a7208891b4a89a9b4aab116d468fd1fca9e6979e6b7ca7e7e2c5dd07ce7d14480b5822d173c71237bf9111a63a13d43582c680
6
+ metadata.gz: f108b5042c9c293a39b9024525d78d46dbf55141a71b6fc70cacfa577ad3a8ca04c2fad6243a735c90a68979598e622321787af53b248d5f49c79c76f0bcf6ec
7
+ data.tar.gz: ddd3beaea91b74251b6dd7802d779a1421aa683cddd1ee706598ef11c00c1e4df2679aa6b21e3f65446003421b5634e08cdd292b3ab3024c749ae9929f7e04ba
@@ -0,0 +1,94 @@
1
+ #these are some of the constants necessary to map ids from the ESPN Fantasy Library to,
2
+ #so that things like position, stat name, etc are readable!
3
+
4
+ POSITION_MAP = ['PG', 'SG', 'SF', 'PF', 'C', 'G', 'F', 'SG/SF', 'G/F', 'PF/C', 'F/C', 'UT', 'BE', 'IR', '', 'Rookie']
5
+
6
+ PRO_TEAM_MAP = ['FA', 'ATL','BOS','NOP','CHI','CLE','DAL','DEN','DET','GSW','HOU','IND',
7
+ 'LAC','LAL','MIA','MIL','MIN','BKN','NYK','ORL','PHL','PHO','POR','SAC','SAS','OKC',
8
+ 'UTA','WAS','TOR','MEM','CHA']
9
+
10
+ STATS_MAP = {
11
+ '0' => 'PTS',
12
+ '1' => 'BLK',
13
+ '2' => 'STL',
14
+ '3' => 'AST',
15
+ '4' => 'OREB',
16
+ '5' => 'DREB',
17
+ '6' => 'REB',
18
+ '7'=> '7',
19
+ '8'=> '8',
20
+ '9'=> 'PF',
21
+ '10'=> '10',
22
+ '11'=> 'TO',
23
+ '12'=> '12',
24
+ '13'=> 'FGM',
25
+ '14'=> 'FGA',
26
+ '15'=> 'FTM',
27
+ '16'=> 'FTA',
28
+ '17'=> '3PTM',
29
+ '18'=> '3PTA',
30
+ '19'=> 'FG%',
31
+ '20'=> 'FT%',
32
+ '21'=> '3PT%',
33
+ '22'=> '22',
34
+ '23'=> '23',
35
+ '24'=> '24',
36
+ '25'=> '25',
37
+ '26'=> '26',
38
+ '27'=> '27',
39
+ '28'=> 'MPG',
40
+ '29'=> '29',
41
+ '30'=> '30',
42
+ '31'=> '31',
43
+ '32'=> '32',
44
+ '33'=> '33',
45
+ '34'=> '34',
46
+ '35'=> '35',
47
+ '36'=> '36',
48
+ '37'=> '37',
49
+ '38'=> '38',
50
+ '39'=> '39',
51
+ '40'=> 'MIN',
52
+ '41'=> 'GS',
53
+ '42'=> 'GP',
54
+ '43'=> '43',
55
+ '44'=> '44',
56
+ '45'=> '45',
57
+ }
58
+
59
+ STAT_ID_MAP = {
60
+ '00': 'total',
61
+ '10': 'projected',
62
+ '01': 'last_7',
63
+ '02': 'last_15',
64
+ '03': 'last_30'
65
+ }
66
+
67
+ ACTIVITY_MAP = {
68
+ 178 => 'FA ADDED',
69
+ 180 => 'WAIVER ADDED',
70
+ 179 => 'DROPPED',
71
+ 181 => 'DROPPED',
72
+ 239 => 'DROPPED',
73
+ 244 => 'TRADED',
74
+ 'FA': 178,
75
+ 'WAIVER': 180,
76
+ 'TRADED': 244
77
+ }
78
+
79
+ NINE_CAT_STATS = [
80
+ '3PTM',
81
+ 'AST',
82
+ 'BLK',
83
+ 'FG%',
84
+ 'FT%',
85
+ 'PTS',
86
+ 'REB',
87
+ 'STL',
88
+ 'TO'
89
+ ]
90
+
91
+ STATS = ['PTS','BLK','STL','AST','OREB','DREB','TO','FGM','FTM','3PTM', 'FGA', '3PTA', 'FTA']
92
+
93
+ EMPTY_STATS = {'PTS'=>0,'BLK'=>0,'STL'=>0,'AST'=>0,'OREB'=>0,'DREB'=>0,'TO'=>0,'FGM'=>0,'FTM'=>0,'3PTM'=>0, 'FGA'=>0, '3PTA'=>0, 'FTA'=>0}
94
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: espn_nba_fantasy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Usborn Ocampo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-22 00:00:00.000000000 Z
11
+ date: 2023-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -89,6 +89,7 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - lib/espn_nba_fantasy.rb
91
91
  - lib/espn_nba_fantasy/calculate_stats.rb
92
+ - lib/espn_nba_fantasy/constants.rb
92
93
  - lib/espn_nba_fantasy/league.rb
93
94
  - lib/espn_nba_fantasy/player.rb
94
95
  - lib/espn_nba_fantasy/player_finder.rb
@@ -112,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  - !ruby/object:Gem::Version
113
114
  version: '0'
114
115
  requirements: []
115
- rubygems_version: 3.4.14
116
+ rubygems_version: 3.4.20
116
117
  signing_key:
117
118
  specification_version: 4
118
119
  summary: Get info from your ESPN NBA Fantasy League as JSON data