xmlstats 1.6.1 → 1.7.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c16a37ec5d116e13fc200b24f35f3be0b4d07c4e
4
- data.tar.gz: 3b288da074698cdf02ebd2e79e6e36d5fe83b62f
3
+ metadata.gz: 3525d934614d158c847ced26591717a9b998c37d
4
+ data.tar.gz: 2c7aef4eeac4d19c5d90d7edfec3c9261ba89094
5
5
  SHA512:
6
- metadata.gz: 26f6febe53df54bbd1672fdf65b9cf1c5e521e52daa929867d5552cabeae0d6f7263546052ae402e0f9ac2e13944a3b288fd0c4e6ced275d89339a9359107c12
7
- data.tar.gz: c26a24d7784dfba0f135d51d994b004b695427aad5eaa6c8c4d0f651811b32ed91ee3fe0ed75484572290e0fa72bd7f6e6f4fb38a582610da27b9dde312fdba2
6
+ metadata.gz: 4b19a62de807c0cbe491572c35a0595941ec4ea6882f5953ed2348a4652d57ed14be90845dbe735423e0d064220e57cc367fa45d552d645bf1af9056f69c82aa
7
+ data.tar.gz: 17d448d759be8875b842dc608942ce0c2cbf1805db92d7a98539cb7771b2d3f0bbd9a0607f78c59e8dbfadb5d19d66c75848349d2768efc9ce1f4acd2d98fbb9
data/README.md CHANGED
@@ -165,18 +165,39 @@ To query the current leaders for points per game:
165
165
 
166
166
  Xmlstats.nba_leaders(:points_per_game)
167
167
 
168
+ ### MLB Roster ###
169
+
170
+ https://erikberg.com/api/methods/roster and https://erikberg.com/api/issues/197
171
+
172
+ To query the current roster for an MLB team:
173
+
174
+ For 25-men roster: Xmlstats.mlb_roster("texas-rangers", false) or Xmlstats.mlb_roster("texas-rangers")
175
+
176
+ For 40-men roster: Xmlstats.mlb_roster("texas-rangers", true)
177
+
178
+ ***Please note:*** Difference in roster is only seen before opening day. The MLB rosters are only updated through beginning of December. The 25-men roster and 40-men roster are available before Opening Day. Since September the active roster expands to 40 players. See https://erikberg.com/api/methods/roster and https://erikberg.com/api/issues/197
179
+
180
+ This method returns an array of **Player** objects with the following fields:
181
+
182
+ [:last_name, :first_name, :display_name, :birthdate, :age, :birhtplace,
183
+ :height_in, :height_cm, :height_formatted, :weight_lb, :weight_kg, :position,
184
+ :uniform_number, :bats, :throws, :roster_status]
185
+
186
+
168
187
  ### NBA Roster ###
169
188
 
170
189
  https://erikberg.com/api/issues/135
171
190
 
172
- To query the current roster for an MLB team:
191
+ To query the current roster for an NBA team:
173
192
 
174
193
  Xmlstats.nba_roster("detroit-pistons")
175
194
 
176
195
  This method returns an array of **Player** objects with the following fields:
177
196
 
178
197
  [:last_name, :first_name, :display_name, :birthdate, :age, :position,
179
- :height_in, :height_cm, :weight_lb, :weight_kg, :height_formatted]
198
+ :height_in, :height_cm, :weight_lb, :weight_kg, :height_formatted, :roster_status]
199
+
200
+
180
201
 
181
202
  Examples
182
203
  --------
@@ -40,6 +40,7 @@ require "xmlstats/endpoints/mlb_team_results"
40
40
  require "xmlstats/endpoints/nba_team_results"
41
41
  require "xmlstats/endpoints/nba_leaders"
42
42
  require "xmlstats/endpoints/nba_roster"
43
+ require "xmlstats/endpoints/mlb_roster"
43
44
 
44
45
  module Xmlstats
45
46
 
@@ -70,7 +71,7 @@ module Xmlstats
70
71
  # Manage http getter
71
72
 
72
73
  def http_getter
73
- @http_getter || Xmlstats::HttpGetters::NetHttp.new
74
+ @http_getter ||= Xmlstats::HttpGetters::NetHttp.new
74
75
  end
75
76
 
76
77
  def http_getter= http_getter
@@ -80,7 +81,7 @@ module Xmlstats
80
81
  # Manage cacher
81
82
 
82
83
  def cacher
83
- @cacher || Xmlstats::Cachers::Memory.new
84
+ @cacher ||= Xmlstats::Cachers::Memory.new
84
85
  end
85
86
 
86
87
  def cacher= cacher
@@ -90,6 +91,36 @@ module Xmlstats
90
91
  end
91
92
  end
92
93
 
94
+ # Methods to retrieve current rate limit status
95
+
96
+ def limit_total
97
+ (cacher.get("rate_limit.limit_total") || 6).to_i
98
+ end
99
+
100
+ def limit_total=(count)
101
+ cacher.set("rate_limit.limit_total", count)
102
+ end
103
+
104
+ def limit_remaining
105
+ (cacher.get("rate_limit.limit_remaining") || 6).to_i
106
+ end
107
+
108
+ def limit_remaining=(count)
109
+ cacher.set("rate_limit.limit_remaining", count)
110
+ end
111
+
112
+ def limit_reset_time
113
+ if ( reset_time = cacher.get("rate_limit.limit_reset_time") )
114
+ Time.parse(reset_time)
115
+ else
116
+ Time.now
117
+ end
118
+ end
119
+
120
+ def limit_reset_time=(time)
121
+ cacher.set("rate_limit.limit_reset_time", time.iso8601)
122
+ end
123
+
93
124
  # Wrapper methods to each endpoint
94
125
 
95
126
  def events *args
@@ -140,6 +171,10 @@ module Xmlstats
140
171
  Xmlstats::Endpoints::NbaRoster.fetch *args
141
172
  end
142
173
 
174
+ def mlb_roster *args
175
+ Xmlstats::Endpoints::MlbRoster.fetch *args
176
+ end
177
+
143
178
  end
144
179
 
145
180
  end
@@ -10,7 +10,7 @@ module Xmlstats
10
10
  when ::Hash then ::Redis.new(redis)
11
11
  when ::Redis then redis
12
12
  when nil then ::Redis.new
13
- else raise "unknown parameter type to redis cacher (#{redis.class}): #{redis.inspect}"
13
+ else fail "unknown parameter type to redis cacher (#{redis.class}): #{redis.inspect}"
14
14
  end
15
15
  end
16
16
 
@@ -0,0 +1,19 @@
1
+ class Xmlstats::Endpoints::MlbRoster
2
+
3
+ include Xmlstats::Endpoint
4
+
5
+ def self.fetch(team_id = nil, expanded = false)
6
+ fail "please specify team_id as detailed in https://erikberg.com/api/issues/135" unless team_id
7
+
8
+ params = {}
9
+
10
+ params = { status: "expanded" } if expanded
11
+
12
+ response = fetch_json("mlb/roster/#{team_id}", params)
13
+
14
+ response["players"].map do |player_hash|
15
+ Xmlstats::Objects::Player.new player_hash
16
+ end
17
+ end
18
+
19
+ end
@@ -15,6 +15,10 @@ module Xmlstats
15
15
  request = Net::HTTP::Get.new(uri.request_uri, headers)
16
16
  response = http.request(request)
17
17
 
18
+ Xmlstats.limit_total = Integer(response.header["xmlstats-api-limit"])
19
+ Xmlstats.limit_remaining = Integer(response.header["xmlstats-api-remaining"])
20
+ Xmlstats.limit_reset_time = Time.at(Integer(response.header["xmlstats-api-reset"]))
21
+
18
22
  if response.kind_of? Net::HTTPOK
19
23
  response.body
20
24
  else
@@ -1,3 +1,3 @@
1
1
  module Xmlstats
2
- VERSION = "1.6.1"
2
+ VERSION = "1.7.0"
3
3
  end
@@ -4,13 +4,23 @@ describe Xmlstats::Endpoints::Events do
4
4
 
5
5
  it "returns 30 events on september 1, 2013" do
6
6
  VCR.use_cassette("events-all-20130901") do
7
- Xmlstats.events(Date.parse("2013-09-01")).should have(15).items
7
+ expect(Xmlstats.events(Date.parse("2013-09-01")).length).to eq(15)
8
8
  end
9
9
  end
10
10
 
11
11
  it "returns a list of event objects" do
12
12
  VCR.use_cassette("events-all-20130901") do
13
- Xmlstats.events(Date.parse("2013-09-01")).map(&:class).uniq.should == [ Xmlstats::Objects::Event ]
13
+ expect(Xmlstats.events(Date.parse("2013-09-01")).map(&:class).uniq).to eq([ Xmlstats::Objects::Event ])
14
+ end
15
+ end
16
+
17
+ it "updates the rate limit values" do
18
+ VCR.use_cassette("events-all-20130901") do
19
+ Xmlstats.events(Date.parse("2013-09-01"))
20
+
21
+ expect(Xmlstats.limit_total).to eq(6)
22
+ expect(Xmlstats.limit_remaining).to eq(5)
23
+ expect(Xmlstats.limit_reset_time.to_i % 60).to eq(0)
14
24
  end
15
25
  end
16
26
 
@@ -4,19 +4,19 @@ describe Xmlstats::Endpoints::MlbTeams do
4
4
 
5
5
  it "gets 30 mlb teams" do
6
6
  VCR.use_cassette("endpoint/mlb_teams-all") do
7
- Xmlstats.mlb_teams.count.should == 30
7
+ expect(Xmlstats.mlb_teams.length).to eq(30)
8
8
  end
9
9
  end
10
10
 
11
11
  it "gets a list of nothing but team objects" do
12
12
  VCR.use_cassette("endpoint/mlb_teams-all") do
13
- Xmlstats.mlb_teams.map(&:class).uniq.should == [ Xmlstats::Objects::Team ]
13
+ expect(Xmlstats.mlb_teams.map(&:class).uniq).to eq([ Xmlstats::Objects::Team ])
14
14
  end
15
15
  end
16
16
 
17
17
  it "includes the detroit tigers" do
18
18
  VCR.use_cassette("endpoint/mlb_teams-all") do
19
- Xmlstats.mlb_teams.find { |team| team.full_name == "Detroit Tigers" }.should_not be_nil
19
+ expect(Xmlstats.mlb_teams.find { |team| team.full_name == "Detroit Tigers" }).not_to eq(nil)
20
20
  end
21
21
  end
22
22
 
@@ -2,8 +2,4 @@ require "spec_helper"
2
2
 
3
3
  describe Xmlstats::Objects::Pitcher do
4
4
 
5
- it "works" do
6
- true.should == true
7
- end
8
-
9
5
  end
@@ -2,19 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://erikberg.com/mlb/teams.json?
5
+ uri: https://erikberg.com/mlb/teams.json
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - xmlstats-ruby/1.4.1 (<CONTACT_INFO>)
11
+ - xmlstats-ruby/1.6.1 (<CONTACT_INFO>)
12
12
  Authorization:
13
13
  - Bearer <API_KEY>
14
14
  Accept-Encoding:
15
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
16
  Accept:
17
- - '*/*'
17
+ - "*/*"
18
18
  response:
19
19
  status:
20
20
  code: 200
@@ -22,12 +22,16 @@ http_interactions:
22
22
  headers:
23
23
  Xmlstats-Api-Method:
24
24
  - teams
25
- Xmlstats-Api-Exec-Time:
26
- - '5'
27
25
  Xmlstats-Api-Limit:
28
- - ''
26
+ - '6'
27
+ Xmlstats-Api-Remaining:
28
+ - '5'
29
+ Xmlstats-Api-Reset:
30
+ - '1428838260'
31
+ Xmlstats-Api-Exec-Time:
32
+ - '3'
29
33
  Etag:
30
- - '-2080227086'
34
+ - '1917999507'
31
35
  Content-Type:
32
36
  - application/json
33
37
  Transfer-Encoding:
@@ -35,373 +39,64 @@ http_interactions:
35
39
  Vary:
36
40
  - Accept-Encoding
37
41
  Date:
38
- - Fri, 30 Aug 2013 13:37:37 GMT
42
+ - Sun, 12 Apr 2015 11:30:16 GMT
39
43
  Server:
40
44
  - Apache
41
45
  body:
42
- encoding: UTF-8
43
- string: |-
44
- [ {
45
- "team_id" : "arizona-diamondbacks",
46
- "abbreviation" : "ARI",
47
- "active" : true,
48
- "first_name" : "Arizona",
49
- "last_name" : "Diamondbacks",
50
- "conference" : "National",
51
- "division" : "West",
52
- "site_name" : "Chase Field",
53
- "city" : "Phoenix",
54
- "state" : "Arizona",
55
- "full_name" : "Arizona Diamondbacks"
56
- }, {
57
- "team_id" : "atlanta-braves",
58
- "abbreviation" : "ATL",
59
- "active" : true,
60
- "first_name" : "Atlanta",
61
- "last_name" : "Braves",
62
- "conference" : "National",
63
- "division" : "East",
64
- "site_name" : "Turner Field",
65
- "city" : "Atlanta",
66
- "state" : "Georgia",
67
- "full_name" : "Atlanta Braves"
68
- }, {
69
- "team_id" : "baltimore-orioles",
70
- "abbreviation" : "BAL",
71
- "active" : true,
72
- "first_name" : "Baltimore",
73
- "last_name" : "Orioles",
74
- "conference" : "American",
75
- "division" : "East",
76
- "site_name" : "Oriole Park at Camden Yards",
77
- "city" : "Baltimore",
78
- "state" : "Maryland",
79
- "full_name" : "Baltimore Orioles"
80
- }, {
81
- "team_id" : "boston-red-sox",
82
- "abbreviation" : "BOS",
83
- "active" : true,
84
- "first_name" : "Boston",
85
- "last_name" : "Red Sox",
86
- "conference" : "American",
87
- "division" : "East",
88
- "site_name" : "Fenway Park",
89
- "city" : "Boston",
90
- "state" : "Massachusetts",
91
- "full_name" : "Boston Red Sox"
92
- }, {
93
- "team_id" : "chicago-cubs",
94
- "abbreviation" : "CHC",
95
- "active" : true,
96
- "first_name" : "Chicago",
97
- "last_name" : "Cubs",
98
- "conference" : "National",
99
- "division" : "Central",
100
- "site_name" : "Wrigley Field",
101
- "city" : "Chicago",
102
- "state" : "Illinois",
103
- "full_name" : "Chicago Cubs"
104
- }, {
105
- "team_id" : "chicago-white-sox",
106
- "abbreviation" : "CHW",
107
- "active" : true,
108
- "first_name" : "Chicago",
109
- "last_name" : "White Sox",
110
- "conference" : "American",
111
- "division" : "Central",
112
- "site_name" : "U.S. Cellular Field",
113
- "city" : "Chicago",
114
- "state" : "Illinois",
115
- "full_name" : "Chicago White Sox"
116
- }, {
117
- "team_id" : "cincinnati-reds",
118
- "abbreviation" : "CIN",
119
- "active" : true,
120
- "first_name" : "Cincinnati",
121
- "last_name" : "Reds",
122
- "conference" : "National",
123
- "division" : "Central",
124
- "site_name" : "Great American Ball Park",
125
- "city" : "Cincinnati",
126
- "state" : "Ohio",
127
- "full_name" : "Cincinnati Reds"
128
- }, {
129
- "team_id" : "cleveland-indians",
130
- "abbreviation" : "CLE",
131
- "active" : true,
132
- "first_name" : "Cleveland",
133
- "last_name" : "Indians",
134
- "conference" : "American",
135
- "division" : "Central",
136
- "site_name" : "Progressive Field",
137
- "city" : "Cleveland",
138
- "state" : "Ohio",
139
- "full_name" : "Cleveland Indians"
140
- }, {
141
- "team_id" : "colorado-rockies",
142
- "abbreviation" : "COL",
143
- "active" : true,
144
- "first_name" : "Colorado",
145
- "last_name" : "Rockies",
146
- "conference" : "National",
147
- "division" : "West",
148
- "site_name" : "Coors Field",
149
- "city" : "Denver",
150
- "state" : "Colorado",
151
- "full_name" : "Colorado Rockies"
152
- }, {
153
- "team_id" : "detroit-tigers",
154
- "abbreviation" : "DET",
155
- "active" : true,
156
- "first_name" : "Detroit",
157
- "last_name" : "Tigers",
158
- "conference" : "American",
159
- "division" : "Central",
160
- "site_name" : "Comerica Park",
161
- "city" : "Detroit",
162
- "state" : "Michigan",
163
- "full_name" : "Detroit Tigers"
164
- }, {
165
- "team_id" : "houston-astros",
166
- "abbreviation" : "HOU",
167
- "active" : true,
168
- "first_name" : "Houston",
169
- "last_name" : "Astros",
170
- "conference" : "American",
171
- "division" : "West",
172
- "site_name" : "Minute Maid Park",
173
- "city" : "Houston",
174
- "state" : "Texas",
175
- "full_name" : "Houston Astros"
176
- }, {
177
- "team_id" : "kansas-city-royals",
178
- "abbreviation" : "KC",
179
- "active" : true,
180
- "first_name" : "Kansas City",
181
- "last_name" : "Royals",
182
- "conference" : "American",
183
- "division" : "Central",
184
- "site_name" : "Kauffman Stadium",
185
- "city" : "Kansas City",
186
- "state" : "Missouri",
187
- "full_name" : "Kansas City Royals"
188
- }, {
189
- "team_id" : "los-angeles-angels",
190
- "abbreviation" : "LAA",
191
- "active" : true,
192
- "first_name" : "Los Angeles",
193
- "last_name" : "Angels",
194
- "conference" : "American",
195
- "division" : "West",
196
- "site_name" : "Angel Stadium of Anaheim",
197
- "city" : "Anaheim",
198
- "state" : "California",
199
- "full_name" : "Los Angeles Angels"
200
- }, {
201
- "team_id" : "los-angeles-dodgers",
202
- "abbreviation" : "LAD",
203
- "active" : true,
204
- "first_name" : "Los Angeles",
205
- "last_name" : "Dodgers",
206
- "conference" : "National",
207
- "division" : "West",
208
- "site_name" : "Dodger Stadium",
209
- "city" : "Los Angeles",
210
- "state" : "California",
211
- "full_name" : "Los Angeles Dodgers"
212
- }, {
213
- "team_id" : "miami-marlins",
214
- "abbreviation" : "MIA",
215
- "active" : true,
216
- "first_name" : "Miami",
217
- "last_name" : "Marlins",
218
- "conference" : "National",
219
- "division" : "East",
220
- "site_name" : "Marlins Park",
221
- "city" : "Miami",
222
- "state" : "Florida",
223
- "full_name" : "Miami Marlins"
224
- }, {
225
- "team_id" : "milwaukee-brewers",
226
- "abbreviation" : "MIL",
227
- "active" : true,
228
- "first_name" : "Milwaukee",
229
- "last_name" : "Brewers",
230
- "conference" : "National",
231
- "division" : "Central",
232
- "site_name" : "Miller Park",
233
- "city" : "Milwaukee",
234
- "state" : "Wisconsin",
235
- "full_name" : "Milwaukee Brewers"
236
- }, {
237
- "team_id" : "minnesota-twins",
238
- "abbreviation" : "MIN",
239
- "active" : true,
240
- "first_name" : "Minnesota",
241
- "last_name" : "Twins",
242
- "conference" : "American",
243
- "division" : "Central",
244
- "site_name" : "Target Field",
245
- "city" : "Minneapolis",
246
- "state" : "Minnesota",
247
- "full_name" : "Minnesota Twins"
248
- }, {
249
- "team_id" : "new-york-mets",
250
- "abbreviation" : "NYM",
251
- "active" : true,
252
- "first_name" : "New York",
253
- "last_name" : "Mets",
254
- "conference" : "National",
255
- "division" : "East",
256
- "site_name" : "Citi Field",
257
- "city" : "Flushing",
258
- "state" : "New York",
259
- "full_name" : "New York Mets"
260
- }, {
261
- "team_id" : "new-york-yankees",
262
- "abbreviation" : "NYY",
263
- "active" : true,
264
- "first_name" : "New York",
265
- "last_name" : "Yankees",
266
- "conference" : "American",
267
- "division" : "East",
268
- "site_name" : "Yankee Stadium",
269
- "city" : "Bronx",
270
- "state" : "New York",
271
- "full_name" : "New York Yankees"
272
- }, {
273
- "team_id" : "oakland-athletics",
274
- "abbreviation" : "OAK",
275
- "active" : true,
276
- "first_name" : "Oakland",
277
- "last_name" : "Athletics",
278
- "conference" : "American",
279
- "division" : "West",
280
- "site_name" : "O.co Coliseum",
281
- "city" : "Oakland",
282
- "state" : "California",
283
- "full_name" : "Oakland Athletics"
284
- }, {
285
- "team_id" : "philadelphia-phillies",
286
- "abbreviation" : "PHI",
287
- "active" : true,
288
- "first_name" : "Philadelphia",
289
- "last_name" : "Phillies",
290
- "conference" : "National",
291
- "division" : "East",
292
- "site_name" : "Citizens Bank Park",
293
- "city" : "Philadelphia",
294
- "state" : "Pennsylvania",
295
- "full_name" : "Philadelphia Phillies"
296
- }, {
297
- "team_id" : "pittsburgh-pirates",
298
- "abbreviation" : "PIT",
299
- "active" : true,
300
- "first_name" : "Pittsburgh",
301
- "last_name" : "Pirates",
302
- "conference" : "National",
303
- "division" : "Central",
304
- "site_name" : "PNC Park",
305
- "city" : "Pittsburgh",
306
- "state" : "Pennsylvania",
307
- "full_name" : "Pittsburgh Pirates"
308
- }, {
309
- "team_id" : "san-diego-padres",
310
- "abbreviation" : "SD",
311
- "active" : true,
312
- "first_name" : "San Diego",
313
- "last_name" : "Padres",
314
- "conference" : "National",
315
- "division" : "West",
316
- "site_name" : "PETCO Park",
317
- "city" : "San Diego",
318
- "state" : "California",
319
- "full_name" : "San Diego Padres"
320
- }, {
321
- "team_id" : "san-francisco-giants",
322
- "abbreviation" : "SF",
323
- "active" : true,
324
- "first_name" : "San Francisco",
325
- "last_name" : "Giants",
326
- "conference" : "National",
327
- "division" : "West",
328
- "site_name" : "AT&T Park",
329
- "city" : "San Francisco",
330
- "state" : "California",
331
- "full_name" : "San Francisco Giants"
332
- }, {
333
- "team_id" : "seattle-mariners",
334
- "abbreviation" : "SEA",
335
- "active" : true,
336
- "first_name" : "Seattle",
337
- "last_name" : "Mariners",
338
- "conference" : "American",
339
- "division" : "West",
340
- "site_name" : "Safeco Field",
341
- "city" : "Seattle",
342
- "state" : "Washington",
343
- "full_name" : "Seattle Mariners"
344
- }, {
345
- "team_id" : "st-louis-cardinals",
346
- "abbreviation" : "STL",
347
- "active" : true,
348
- "first_name" : "St. Louis",
349
- "last_name" : "Cardinals",
350
- "conference" : "National",
351
- "division" : "Central",
352
- "site_name" : "Busch Stadium",
353
- "city" : "Saint Louis",
354
- "state" : "Missouri",
355
- "full_name" : "St. Louis Cardinals"
356
- }, {
357
- "team_id" : "tampa-bay-rays",
358
- "abbreviation" : "TB",
359
- "active" : true,
360
- "first_name" : "Tampa Bay",
361
- "last_name" : "Rays",
362
- "conference" : "American",
363
- "division" : "East",
364
- "site_name" : "Tropicana Field",
365
- "city" : "Saint Petersburg",
366
- "state" : "Florida",
367
- "full_name" : "Tampa Bay Rays"
368
- }, {
369
- "team_id" : "texas-rangers",
370
- "abbreviation" : "TEX",
371
- "active" : true,
372
- "first_name" : "Texas",
373
- "last_name" : "Rangers",
374
- "conference" : "American",
375
- "division" : "West",
376
- "site_name" : "Rangers Ballpark in Arlington",
377
- "city" : "Arlington",
378
- "state" : "Texas",
379
- "full_name" : "Texas Rangers"
380
- }, {
381
- "team_id" : "toronto-blue-jays",
382
- "abbreviation" : "TOR",
383
- "active" : true,
384
- "first_name" : "Toronto",
385
- "last_name" : "Blue Jays",
386
- "conference" : "American",
387
- "division" : "East",
388
- "site_name" : "Rogers Centre",
389
- "city" : "Toronto",
390
- "state" : "Ontario",
391
- "full_name" : "Toronto Blue Jays"
392
- }, {
393
- "team_id" : "washington-nationals",
394
- "abbreviation" : "WAS",
395
- "active" : true,
396
- "first_name" : "Washington",
397
- "last_name" : "Nationals",
398
- "conference" : "National",
399
- "division" : "East",
400
- "site_name" : "Nationals Park",
401
- "city" : "Washington",
402
- "state" : "District of Columbia",
403
- "full_name" : "Washington Nationals"
404
- } ]
46
+ encoding: ASCII-8BIT
47
+ string: '[{"team_id":"arizona-diamondbacks","abbreviation":"ARI","active":true,"first_name":"Arizona","last_name":"Diamondbacks","conference":"National","division":"West","site_name":"Chase
48
+ Field","city":"Phoenix","state":"Arizona","full_name":"Arizona Diamondbacks"},{"team_id":"atlanta-braves","abbreviation":"ATL","active":true,"first_name":"Atlanta","last_name":"Braves","conference":"National","division":"East","site_name":"Turner
49
+ Field","city":"Atlanta","state":"Georgia","full_name":"Atlanta Braves"},{"team_id":"baltimore-orioles","abbreviation":"BAL","active":true,"first_name":"Baltimore","last_name":"Orioles","conference":"American","division":"East","site_name":"Oriole
50
+ Park at Camden Yards","city":"Baltimore","state":"Maryland","full_name":"Baltimore
51
+ Orioles"},{"team_id":"boston-red-sox","abbreviation":"BOS","active":true,"first_name":"Boston","last_name":"Red
52
+ Sox","conference":"American","division":"East","site_name":"Fenway Park","city":"Boston","state":"Massachusetts","full_name":"Boston
53
+ Red Sox"},{"team_id":"chicago-cubs","abbreviation":"CHC","active":true,"first_name":"Chicago","last_name":"Cubs","conference":"National","division":"Central","site_name":"Wrigley
54
+ Field","city":"Chicago","state":"Illinois","full_name":"Chicago Cubs"},{"team_id":"chicago-white-sox","abbreviation":"CHW","active":true,"first_name":"Chicago","last_name":"White
55
+ Sox","conference":"American","division":"Central","site_name":"U.S. Cellular
56
+ Field","city":"Chicago","state":"Illinois","full_name":"Chicago White Sox"},{"team_id":"cincinnati-reds","abbreviation":"CIN","active":true,"first_name":"Cincinnati","last_name":"Reds","conference":"National","division":"Central","site_name":"Great
57
+ American Ball Park","city":"Cincinnati","state":"Ohio","full_name":"Cincinnati
58
+ Reds"},{"team_id":"cleveland-indians","abbreviation":"CLE","active":true,"first_name":"Cleveland","last_name":"Indians","conference":"American","division":"Central","site_name":"Progressive
59
+ Field","city":"Cleveland","state":"Ohio","full_name":"Cleveland Indians"},{"team_id":"colorado-rockies","abbreviation":"COL","active":true,"first_name":"Colorado","last_name":"Rockies","conference":"National","division":"West","site_name":"Coors
60
+ Field","city":"Denver","state":"Colorado","full_name":"Colorado Rockies"},{"team_id":"detroit-tigers","abbreviation":"DET","active":true,"first_name":"Detroit","last_name":"Tigers","conference":"American","division":"Central","site_name":"Comerica
61
+ Park","city":"Detroit","state":"Michigan","full_name":"Detroit Tigers"},{"team_id":"houston-astros","abbreviation":"HOU","active":true,"first_name":"Houston","last_name":"Astros","conference":"American","division":"West","site_name":"Minute
62
+ Maid Park","city":"Houston","state":"Texas","full_name":"Houston Astros"},{"team_id":"kansas-city-royals","abbreviation":"KC","active":true,"first_name":"Kansas
63
+ City","last_name":"Royals","conference":"American","division":"Central","site_name":"Kauffman
64
+ Stadium","city":"Kansas City","state":"Missouri","full_name":"Kansas City
65
+ Royals"},{"team_id":"los-angeles-angels","abbreviation":"LAA","active":true,"first_name":"Los
66
+ Angeles","last_name":"Angels","conference":"American","division":"West","site_name":"Angel
67
+ Stadium of Anaheim","city":"Anaheim","state":"California","full_name":"Los
68
+ Angeles Angels"},{"team_id":"los-angeles-dodgers","abbreviation":"LAD","active":true,"first_name":"Los
69
+ Angeles","last_name":"Dodgers","conference":"National","division":"West","site_name":"Dodger
70
+ Stadium","city":"Los Angeles","state":"California","full_name":"Los Angeles
71
+ Dodgers"},{"team_id":"miami-marlins","abbreviation":"MIA","active":true,"first_name":"Miami","last_name":"Marlins","conference":"National","division":"East","site_name":"Marlins
72
+ Park","city":"Miami","state":"Florida","full_name":"Miami Marlins"},{"team_id":"milwaukee-brewers","abbreviation":"MIL","active":true,"first_name":"Milwaukee","last_name":"Brewers","conference":"National","division":"Central","site_name":"Miller
73
+ Park","city":"Milwaukee","state":"Wisconsin","full_name":"Milwaukee Brewers"},{"team_id":"minnesota-twins","abbreviation":"MIN","active":true,"first_name":"Minnesota","last_name":"Twins","conference":"American","division":"Central","site_name":"Target
74
+ Field","city":"Minneapolis","state":"Minnesota","full_name":"Minnesota Twins"},{"team_id":"new-york-mets","abbreviation":"NYM","active":true,"first_name":"New
75
+ York","last_name":"Mets","conference":"National","division":"East","site_name":"Citi
76
+ Field","city":"Flushing","state":"New York","full_name":"New York Mets"},{"team_id":"new-york-yankees","abbreviation":"NYY","active":true,"first_name":"New
77
+ York","last_name":"Yankees","conference":"American","division":"East","site_name":"Yankee
78
+ Stadium","city":"Bronx","state":"New York","full_name":"New York Yankees"},{"team_id":"oakland-athletics","abbreviation":"OAK","active":true,"first_name":"Oakland","last_name":"Athletics","conference":"American","division":"West","site_name":"O.co
79
+ Coliseum","city":"Oakland","state":"California","full_name":"Oakland Athletics"},{"team_id":"philadelphia-phillies","abbreviation":"PHI","active":true,"first_name":"Philadelphia","last_name":"Phillies","conference":"National","division":"East","site_name":"Citizens
80
+ Bank Park","city":"Philadelphia","state":"Pennsylvania","full_name":"Philadelphia
81
+ Phillies"},{"team_id":"pittsburgh-pirates","abbreviation":"PIT","active":true,"first_name":"Pittsburgh","last_name":"Pirates","conference":"National","division":"Central","site_name":"PNC
82
+ Park","city":"Pittsburgh","state":"Pennsylvania","full_name":"Pittsburgh Pirates"},{"team_id":"san-diego-padres","abbreviation":"SD","active":true,"first_name":"San
83
+ Diego","last_name":"Padres","conference":"National","division":"West","site_name":"PETCO
84
+ Park","city":"San Diego","state":"California","full_name":"San Diego Padres"},{"team_id":"san-francisco-giants","abbreviation":"SF","active":true,"first_name":"San
85
+ Francisco","last_name":"Giants","conference":"National","division":"West","site_name":"AT&T
86
+ Park","city":"San Francisco","state":"California","full_name":"San Francisco
87
+ Giants"},{"team_id":"seattle-mariners","abbreviation":"SEA","active":true,"first_name":"Seattle","last_name":"Mariners","conference":"American","division":"West","site_name":"Safeco
88
+ Field","city":"Seattle","state":"Washington","full_name":"Seattle Mariners"},{"team_id":"st-louis-cardinals","abbreviation":"STL","active":true,"first_name":"St.
89
+ Louis","last_name":"Cardinals","conference":"National","division":"Central","site_name":"Busch
90
+ Stadium","city":"Saint Louis","state":"Missouri","full_name":"St. Louis Cardinals"},{"team_id":"tampa-bay-rays","abbreviation":"TB","active":true,"first_name":"Tampa
91
+ Bay","last_name":"Rays","conference":"American","division":"East","site_name":"Tropicana
92
+ Field","city":"Saint Petersburg","state":"Florida","full_name":"Tampa Bay
93
+ Rays"},{"team_id":"texas-rangers","abbreviation":"TEX","active":true,"first_name":"Texas","last_name":"Rangers","conference":"American","division":"West","site_name":"Globe
94
+ Life Park in Arlington","city":"Arlington","state":"Texas","full_name":"Texas
95
+ Rangers"},{"team_id":"toronto-blue-jays","abbreviation":"TOR","active":true,"first_name":"Toronto","last_name":"Blue
96
+ Jays","conference":"American","division":"East","site_name":"Rogers Centre","city":"Toronto","state":"Ontario","full_name":"Toronto
97
+ Blue Jays"},{"team_id":"washington-nationals","abbreviation":"WAS","active":true,"first_name":"Washington","last_name":"Nationals","conference":"National","division":"East","site_name":"Nationals
98
+ Park","city":"Washington","state":"District of Columbia","full_name":"Washington
99
+ Nationals"}]'
405
100
  http_version:
406
- recorded_at: Fri, 30 Aug 2013 13:37:37 GMT
407
- recorded_with: VCR 2.5.0
101
+ recorded_at: Sun, 12 Apr 2015 11:30:16 GMT
102
+ recorded_with: VCR 2.9.3