fantasyCompare 0.1.0 → 0.1.2
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 +4 -4
- data/.gitignore +1 -0
- data/demo.rb +19 -0
- data/fantasyCompare-0.1.0.gem +0 -0
- data/lib/fantasyCompare/NFLJSON.rb +3 -7
- data/lib/fantasyCompare/cli.rb +1 -0
- data/lib/fantasyCompare/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f13cca1083a8f67c798109b9493c1a26594b0cc
|
4
|
+
data.tar.gz: a9d0f0a5541a0874594385e7132fff10dc588a4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eaba05b6f380ca50ae063bb4eb848b6da137a94d8697e5b90ef879bb82c65e5cbe5dca1707faaa48d537605ac2e8193ba2703822907d26a87c303722b165ae8
|
7
|
+
data.tar.gz: 54cb3697d9960ce52cfbf543c47290a188215a57ae36640412c769ae8adb9d04df9fea0a88dbee1e0db7a7c13b9ff3c0a373ebb0f6d55ac7dcef3fad19102077
|
data/.gitignore
CHANGED
data/demo.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
require 'pry'
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
url = "http://api.fantasy.nfl.com/v1/players/stats?statType=weekProjectedStats&season=2016&week=3&position=QB&format=json&returnHTML=1"
|
7
|
+
response = HTTParty.get(url)
|
8
|
+
@players_hash = response.parsed_response
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
#modifies url to pull proper JSON data based on user inputs and returns a hashed result
|
13
|
+
|
14
|
+
detail_url = "http://api.fantasy.nfl.com/v1/players/details?playerId=100029&statType=seasonStatsformat=json"
|
15
|
+
response = HTTParty.get(detail_url)
|
16
|
+
@detail_hash = response.parsed_response
|
17
|
+
|
18
|
+
|
19
|
+
binding.pry
|
Binary file
|
@@ -86,17 +86,13 @@ class FantasyCompare::NFLJSON
|
|
86
86
|
self.next_note(note_number)
|
87
87
|
elsif note_number > @note.length-1 && addtional_notes[0].capitalize == "Y"
|
88
88
|
puts "There are no more notes"
|
89
|
-
puts "Would You like to see details on another player?"
|
89
|
+
puts "Would You like to see details on another player(Y/N)?"
|
90
90
|
do_again = gets.chomp
|
91
91
|
elsif addtional_notes[0].capitalize == "N"
|
92
|
-
puts "Would You like to see details on another position?"
|
92
|
+
puts "Would You like to see details on another position(Y/N)?"
|
93
93
|
do_again = gets.chomp
|
94
|
-
|
95
|
-
|
96
|
-
if do_again[0].capitalize == "Y"
|
94
|
+
elsif do_again[0].capitalize == "Y"
|
97
95
|
FantasyCompare::CLI.new.call
|
98
|
-
else
|
99
|
-
puts "Goodbye"
|
100
96
|
end
|
101
97
|
end
|
102
98
|
end
|
data/lib/fantasyCompare/cli.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fantasyCompare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Verdone
|
@@ -72,6 +72,8 @@ files:
|
|
72
72
|
- bin/console
|
73
73
|
- bin/nfl-compare
|
74
74
|
- bin/setup
|
75
|
+
- demo.rb
|
76
|
+
- fantasyCompare-0.1.0.gem
|
75
77
|
- fantasyCompare.gemspec
|
76
78
|
- lib/fantasyCompare.rb
|
77
79
|
- lib/fantasyCompare/NFLJSON.rb
|