webget-football 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +20 -0
  3. data/Rakefile +1 -0
  4. data/lib/webget-football.rb +8 -0
  5. data/lib/webget-football/apis.rb +1 -0
  6. data/lib/webget-football/apis/download.rb +22 -2
  7. data/lib/webget-football/apis/leagues.rb +51 -0
  8. data/lib/webget-football/fbref.rb +7 -0
  9. data/lib/webget-football/fbref/config.rb +14 -0
  10. data/lib/webget-football/fbref/download.rb +41 -0
  11. data/lib/webget-football/fbref/leagues.rb +47 -0
  12. data/lib/webget-football/fbref/page.rb +32 -0
  13. data/lib/webget-football/fbref/page_schedule.rb +322 -0
  14. data/lib/webget-football/metal.rb +19 -0
  15. data/lib/webget-football/version.rb +1 -1
  16. data/lib/webget-football/worldfootball.rb +1 -0
  17. data/lib/webget-football/worldfootball/download.rb +61 -28
  18. data/lib/webget-football/worldfootball/leagues.rb +200 -0
  19. data/lib/webget-football/worldfootball/leagues/asia.rb +53 -0
  20. data/lib/webget-football/worldfootball/leagues/europe--british_isles.rb +59 -0
  21. data/lib/webget-football/worldfootball/leagues/europe--central.rb +127 -0
  22. data/lib/webget-football/worldfootball/leagues/europe--eastern.rb +82 -0
  23. data/lib/webget-football/worldfootball/leagues/europe--northern.rb +57 -0
  24. data/lib/webget-football/worldfootball/leagues/europe--southern.rb +86 -0
  25. data/lib/webget-football/worldfootball/leagues/europe--western.rb +38 -0
  26. data/lib/webget-football/worldfootball/leagues/europe.rb +13 -0
  27. data/lib/webget-football/worldfootball/leagues/north_america.rb +44 -0
  28. data/lib/webget-football/worldfootball/leagues/pacific.rb +21 -0
  29. data/lib/webget-football/worldfootball/leagues/south_america.rb +11 -0
  30. data/lib/webget-football/worldfootball/page_report.rb +1 -1
  31. data/lib/webget-football/worldfootball/page_schedule.rb +1 -1
  32. metadata +36 -2
@@ -0,0 +1,21 @@
1
+ module Worldfootball
2
+
3
+ LEAGUES_PACIFIC = {
4
+
5
+ # /nzl-nz-football-championship-2019-2020/
6
+ # /nzl-nz-football-championship-2018-2019-playoffs/
7
+ 'nz.1' => {
8
+ pages: {
9
+ 'nzl-nz-football-championship-{season}' => 'Regular Season', # 1
10
+ 'nzl-nz-football-championship-{season}-playoffs' => 'Playoff Finals', # 2
11
+ },
12
+ season: ->( season ) {
13
+ case season
14
+ when Season('2019/20') then [1] ## covid-19 - no playoffs/finals
15
+ when Season('2018/19') then [1,2]
16
+ end
17
+ }
18
+ },
19
+ }
20
+
21
+ end # module Worldfootball
@@ -0,0 +1,11 @@
1
+ module Worldfootball
2
+
3
+ LEAGUES_SOUTH_AMERICA = {
4
+
5
+ # todo/fix: adjust date/time by -6 or 7 hours!!!
6
+ # /bra-serie-a-2020/
7
+ 'br.1' => { pages: 'bra-serie-a' },
8
+ }
9
+
10
+ end # module Worldfootball
11
+
@@ -6,7 +6,7 @@ class Report < Page ## note: use nested class for now - why? why not?
6
6
 
7
7
 
8
8
  def self.from_cache( slug )
9
- url = Worldfootball::Metal.report_url( slug )
9
+ url = Metal.report_url( slug )
10
10
  html = Webcache.read( url )
11
11
  new( html )
12
12
  end
@@ -6,7 +6,7 @@ class Schedule < Page ## note: use nested class for now - why? why not?
6
6
 
7
7
 
8
8
  def self.from_cache( slug )
9
- url = Worldfootball::Metal.schedule_url( slug )
9
+ url = Metal.schedule_url( slug )
10
10
  html = Webcache.read( url )
11
11
  new( html )
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webget-football
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-10 00:00:00.000000000 Z
11
+ date: 2020-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webget
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sportdb-structs
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rdoc
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -89,10 +103,30 @@ files:
89
103
  - lib/webget-football/apis.rb
90
104
  - lib/webget-football/apis/config.rb
91
105
  - lib/webget-football/apis/download.rb
106
+ - lib/webget-football/apis/leagues.rb
107
+ - lib/webget-football/fbref.rb
108
+ - lib/webget-football/fbref/config.rb
109
+ - lib/webget-football/fbref/download.rb
110
+ - lib/webget-football/fbref/leagues.rb
111
+ - lib/webget-football/fbref/page.rb
112
+ - lib/webget-football/fbref/page_schedule.rb
113
+ - lib/webget-football/metal.rb
92
114
  - lib/webget-football/version.rb
93
115
  - lib/webget-football/worldfootball.rb
94
116
  - lib/webget-football/worldfootball/config.rb
95
117
  - lib/webget-football/worldfootball/download.rb
118
+ - lib/webget-football/worldfootball/leagues.rb
119
+ - lib/webget-football/worldfootball/leagues/asia.rb
120
+ - lib/webget-football/worldfootball/leagues/europe--british_isles.rb
121
+ - lib/webget-football/worldfootball/leagues/europe--central.rb
122
+ - lib/webget-football/worldfootball/leagues/europe--eastern.rb
123
+ - lib/webget-football/worldfootball/leagues/europe--northern.rb
124
+ - lib/webget-football/worldfootball/leagues/europe--southern.rb
125
+ - lib/webget-football/worldfootball/leagues/europe--western.rb
126
+ - lib/webget-football/worldfootball/leagues/europe.rb
127
+ - lib/webget-football/worldfootball/leagues/north_america.rb
128
+ - lib/webget-football/worldfootball/leagues/pacific.rb
129
+ - lib/webget-football/worldfootball/leagues/south_america.rb
96
130
  - lib/webget-football/worldfootball/page.rb
97
131
  - lib/webget-football/worldfootball/page_report.rb
98
132
  - lib/webget-football/worldfootball/page_schedule.rb