finktank 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +15 -0
  2. data/lib/finktank.rb +54 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NmRiOGUyMzkxOWM3OGZhNjI1Yjc1ZDJhYmMwYTIxMzhkNjIzZjExOA==
5
+ data.tar.gz: !binary |-
6
+ MjcwOTE0ODE3Y2U3ZTZjZDhmYTJjYTQ5OThlNGVhZmI2MDJhNzZiOQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ Y2E3NzNiMzUxMjZjYjAwYmMwOWVhYzkxN2U5NDQ1MTliOWVhZTVkMjI4ODRm
10
+ MWU2NjhkOGYxMTJlMGQ3ZTg4MjRlNDkyYjY3YTA4OTc2OTczNzljOGM3Y2I4
11
+ YWQxYmMzOGJkNzBjNjI1ZWFiNTY4ZDI4ZmM0M2YwM2EwMmE2MTY=
12
+ data.tar.gz: !binary |-
13
+ OWZlODdkNTYyNDk4YTE0NTliNWJjZGMzYTM1ZTRlMThmNmIxMzAxMzAxZGQy
14
+ OTRkZGJlY2Q3ODBmYTQ3MzBkYjZhZWJiNjRjNjI1MzM3YTNiMGFiOTQ5YWZh
15
+ NGQ0NjA2Y2EyZjE1NDQ0MzA2YzQ0N2JkYjZkMzM3Mzc4OGE4YzY=
data/lib/finktank.rb ADDED
@@ -0,0 +1,54 @@
1
+ require 'open-uri'
2
+ require 'json'
3
+
4
+ def get_all_predictions()
5
+
6
+ game = open("http://www.dectech.org/cgi-bin/new_site/GetUpcomingGames_r.pl")
7
+ body = game.read
8
+ hashes = JSON.parse(body)
9
+ predictions = hashes["games"]
10
+ return predictions
11
+
12
+ end
13
+ #
14
+ def get_league_predictions(league)
15
+
16
+ game = open("http://www.dectech.org/cgi-bin/new_site/GetUpcomingGames_r.pl?divID=#{league}")
17
+ body = game.read
18
+ hashes = JSON.parse(body)
19
+ predictions = hashes["games"]
20
+ return predictions
21
+
22
+ end
23
+
24
+ def get_prem_predictions()
25
+
26
+ return get_league_predictions(0)
27
+
28
+ end
29
+
30
+ def get_champ_predictions()
31
+
32
+
33
+ return get_league_predictions(12)
34
+
35
+ end
36
+
37
+ def get_l1_predictions()
38
+
39
+ return get_league_predictions(13)
40
+
41
+ end
42
+
43
+ def get_l2_predictions()
44
+
45
+ return get_league_predictions(14)
46
+
47
+ end
48
+
49
+ def get_spl_predictions()
50
+
51
+ return get_league_predictions(1)
52
+
53
+ end
54
+
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: finktank
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Kelly
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Get the probabilities of the outcomes of upcoming football matches
14
+ email: jkelly2510@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/finktank.rb
20
+ homepage: http://rubygems.org/gems/finktank
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.0.7
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Finktank Match Odds
44
+ test_files: []