sports_data_api 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 092e540e02537ab5918831ec241e04cadb65f685
|
4
|
+
data.tar.gz: 2665a7853dd7f18b14b1d998cb9f5f22da39e712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71acae7815dd33b9457aa4c1a32a54ce0e344465efe54c0423cf47302a0c6c505749c016230c461543c6b2ab07213aa9f1bf22a48792433b7339c646dcc19386
|
7
|
+
data.tar.gz: a614366fb3d170b18056be309f59757fdfedbb4276cb3225359f85ea12f451a395424c9fc832840ccb1d7a3e7002998471f261b2373b3795dfd30f2caf7f7622
|
data/README.md
CHANGED
@@ -12,9 +12,10 @@ plus hundreds of leagues throughout the world. Their live game analysts
|
|
12
12
|
capture every possible event of every game, in real time and with
|
13
13
|
accuracy standards developed from years of experience.
|
14
14
|
|
15
|
-
##
|
15
|
+
## Authors
|
16
16
|
|
17
|
-
[Ryan Lovelett](http://ryan.lovelett.me/) ( [@rlovelett](http://twitter.com/#!/rlovelett) )
|
17
|
+
* [Ryan Lovelett](http://ryan.lovelett.me/) ( [@rlovelett](http://twitter.com/#!/rlovelett) )
|
18
|
+
* [Trevor John](http://www.trevorjohn.tj/) ( [@trevorrjohn](http://twitter.com/#!/trevorrjohn) )
|
18
19
|
|
19
20
|
Drop me a message for any questions, suggestions, requests, bugs or
|
20
21
|
submit them to the [issue
|
@@ -2,22 +2,22 @@ module SportsDataApi
|
|
2
2
|
module Mlb
|
3
3
|
class Statistics < JsonData
|
4
4
|
def pitching
|
5
|
-
@pitching ||= orphan_stat
|
5
|
+
@pitching ||= orphan_stat :pitching
|
6
6
|
end
|
7
7
|
|
8
8
|
def fielding
|
9
|
-
@fielding ||= orphan_stat
|
9
|
+
@fielding ||= orphan_stat :fielding
|
10
10
|
end
|
11
11
|
|
12
12
|
def hitting
|
13
|
-
@hitting ||= orphan_stat
|
13
|
+
@hitting ||= orphan_stat :hitting
|
14
14
|
end
|
15
15
|
|
16
16
|
private
|
17
17
|
|
18
|
-
def orphan_stat(key
|
18
|
+
def orphan_stat(key)
|
19
19
|
return unless statistics.has_key? key
|
20
|
-
|
20
|
+
MergedStats.new(statistics[key]['overall'], key.to_s)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -2,19 +2,23 @@ module SportsDataApi
|
|
2
2
|
module Mlb
|
3
3
|
class Team < SportsDataApi::JsonData
|
4
4
|
def players
|
5
|
-
@players ||= map_players
|
5
|
+
@players ||= map_players :players
|
6
6
|
end
|
7
7
|
|
8
8
|
def roster
|
9
|
-
@rosters ||= map_players
|
9
|
+
@rosters ||= map_players :roster
|
10
|
+
end
|
11
|
+
|
12
|
+
def expected_players
|
13
|
+
@expected_players ||= map_players :expected_players
|
10
14
|
end
|
11
15
|
|
12
16
|
def starting_pitcher
|
13
|
-
@starting_pitcher ||= populate_player
|
17
|
+
@starting_pitcher ||= populate_player :starting_pitcher
|
14
18
|
end
|
15
19
|
|
16
20
|
def probable_pitcher
|
17
|
-
@probable_pitcher ||= populate_player
|
21
|
+
@probable_pitcher ||= populate_player :probable_pitcher
|
18
22
|
end
|
19
23
|
|
20
24
|
private
|
@@ -16,6 +16,7 @@ describe SportsDataApi::Mlb::Team, vcr: {
|
|
16
16
|
its(:roster) { should be_empty }
|
17
17
|
its(:starting_pitcher) { should be_nil }
|
18
18
|
its(:probable_pitcher) { should be_nil }
|
19
|
+
its(:expected_players) { should be_empty }
|
19
20
|
|
20
21
|
it 'sets the id' do
|
21
22
|
expect(subject[:id]).to eq '575c19b7-4052-41c2-9f0a-1c5813d02f99'
|
@@ -39,6 +40,8 @@ describe SportsDataApi::Mlb::Team, vcr: {
|
|
39
40
|
|
40
41
|
it { should be_an_instance_of(SportsDataApi::Mlb::Team) }
|
41
42
|
|
43
|
+
its(:expected_players) { should be_empty }
|
44
|
+
|
42
45
|
it 'sets the id' do
|
43
46
|
expect(subject[:id]).to eq '27a59d3b-ff7c-48ea-b016-4798f560f5e1'
|
44
47
|
end
|
data/sports_data_api.gemspec
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
require File.expand_path('../lib/sports_data_api/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
|
-
gem.authors =
|
6
|
-
gem.email
|
5
|
+
gem.authors = ['Ryan Lovelett', 'Trevor John']
|
6
|
+
gem.email = ['ryan@lovelett.me', 'Trevor@John.tj']
|
7
7
|
gem.description = %q{A Ruby interface to the Sportradar API.}
|
8
8
|
gem.summary = %q{Sportradar’s comprehensive data coverage includes all major U.S. sports, plus hundreds of leagues throughout the world. Their live game analysts capture every possible event of every game, in real time and with accuracy standards developed from years of experience.}
|
9
9
|
gem.homepage = 'https://github.com/RLovelett/sports_data_api'
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sports_data_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Ryan
|
8
|
-
-
|
7
|
+
- Ryan Lovelett
|
8
|
+
- Trevor John
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
@@ -265,7 +265,8 @@ dependencies:
|
|
265
265
|
version: 2.3.2
|
266
266
|
description: A Ruby interface to the Sportradar API.
|
267
267
|
email:
|
268
|
-
- ryan@lovelett.me
|
268
|
+
- ryan@lovelett.me
|
269
|
+
- Trevor@John.tj
|
269
270
|
executables: []
|
270
271
|
extensions: []
|
271
272
|
extra_rdoc_files: []
|
@@ -557,7 +558,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
557
558
|
version: '0'
|
558
559
|
requirements: []
|
559
560
|
rubyforge_project:
|
560
|
-
rubygems_version: 2.
|
561
|
+
rubygems_version: 2.4.8
|
561
562
|
signing_key:
|
562
563
|
specification_version: 4
|
563
564
|
summary: Sportradar’s comprehensive data coverage includes all major U.S. sports,
|