nba_api_wrapper 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nba/roster.rb +16 -0
- data/lib/nba_api_wrapper.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9abf70f99275a4731acc26531a7ccc0bba0e7474
|
4
|
+
data.tar.gz: 46d9832b28f9bae0fab0b5274e8f14c98a76e560
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a2b4e7582266d10d6c82b6223846eba5d17ed2cfd6e04597e00a355c38ea4e5d0a5b9b414d3ebef2379f4583c6bcfcf04e3c6ff1ba831c500c885f7272f33ec
|
7
|
+
data.tar.gz: 58c53605a88ed7963e04d598133f18ee1d1083b7f574edac37b379313237c8e36ec71629085ce0fd41edfa956424984be6740ff55ba66551c7a4d1632b21d9df
|
data/lib/nba/roster.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
class NBA::Roster
|
2
|
+
BASE_URI = 'http://stats.nba.com/stats'
|
3
|
+
|
4
|
+
def self.get_team_roster(teamId=0,leagueId="00",season="2015-16")
|
5
|
+
res = HTTP.get(BASE_URI+'/commonteamroster', :params => {
|
6
|
+
:TeamID => teamId,
|
7
|
+
:LeagueID => leagueId,
|
8
|
+
:Season => season
|
9
|
+
})
|
10
|
+
if res.code == 200
|
11
|
+
return JSON.parse(res.body)
|
12
|
+
end
|
13
|
+
return res.code
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
data/lib/nba_api_wrapper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nba_api_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Mills
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- lib/nba/nba.rb
|
81
81
|
- lib/nba/play_by_play.rb
|
82
82
|
- lib/nba/player.rb
|
83
|
+
- lib/nba/roster.rb
|
83
84
|
- lib/nba/stats/leaders.rb
|
84
85
|
- lib/nba/stats/player_stats.rb
|
85
86
|
- lib/nba/stats/team_stats.rb
|