xmlstats 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/Rakefile +4 -0
- data/lib/xmlstats/endpoints/mlb_team_results.rb +1 -1
- data/lib/xmlstats/endpoints/nba_team_results.rb +1 -1
- data/lib/xmlstats/http_getters/net_http.rb +1 -0
- data/lib/xmlstats/version.rb +1 -1
- data/spec/endpoints/events_spec.rb +17 -0
- data/spec/endpoints/mlb_teams_spec.rb +23 -0
- data/spec/objects/pitcher_spec.rb +9 -0
- data/spec/spec_helper.rb +28 -0
- data/spec/vcr_cassettes/endpoint/mlb_teams-all.yml +407 -0
- data/spec/vcr_cassettes/events-all-20130901.yml +635 -0
- data/xmlstats.gemspec +3 -0
- metadata +59 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16e0a06c391faa97124db7596ea774b197f20fb8
|
4
|
+
data.tar.gz: ea2a8dbca069123f9abf3fe72d2b42dae2189399
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 990af66a2f5000db70ccf5b51a34093e53e9df7ebb8a3734bd45b98876e09de8003366c56b0557646d045d59d2ceb1a0d77befdfa1b971ba864d3de168e62cb7
|
7
|
+
data.tar.gz: c2169a29ffd8830e3e00b7c39b199c0e084e5db182e7fc365efd1556188f50036863cb24e50a06cafecfa0312c1421f003d3193d13782b3081d0d4e6f593c9f0
|
data/.travis.yml
ADDED
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ class Xmlstats::Endpoints::MlbTeamResults
|
|
5
5
|
def self.fetch(team_id = nil, season = nil)
|
6
6
|
raise "please specify team_id as detailed in https://erikberg.com/api#teamresults" unless team_id
|
7
7
|
params = { season: season }
|
8
|
-
response = fetch_json("mlb/
|
8
|
+
response = fetch_json("mlb/results/#{team_id}", params)
|
9
9
|
[ response ].flatten.map do |result|
|
10
10
|
Xmlstats::Objects::TeamResult.new result
|
11
11
|
end
|
@@ -5,7 +5,7 @@ class Xmlstats::Endpoints::NbaTeamResults
|
|
5
5
|
def self.fetch(team_id = nil, season = nil)
|
6
6
|
raise "please specify team_id as detailed in https://erikberg.com/api#teamresults" unless team_id
|
7
7
|
params = { season: season }
|
8
|
-
response = fetch_json("nba/
|
8
|
+
response = fetch_json("nba/results/#{team_id}", params)
|
9
9
|
[ response ].flatten.map do |result|
|
10
10
|
Xmlstats::Objects::TeamResult.new result
|
11
11
|
end
|
data/lib/xmlstats/version.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Xmlstats::Endpoints::Events do
|
4
|
+
|
5
|
+
it "returns 30 events on september 1, 2013" do
|
6
|
+
VCR.use_cassette("events-all-20130901") do
|
7
|
+
Xmlstats.events(Date.parse("2013-09-01")).should have(15).items
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
it "returns a list of event objects" do
|
12
|
+
VCR.use_cassette("events-all-20130901") do
|
13
|
+
Xmlstats.events(Date.parse("2013-09-01")).map(&:class).uniq.should == [ Xmlstats::Objects::Event ]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Xmlstats::Endpoints::MlbTeams do
|
4
|
+
|
5
|
+
it "gets 30 mlb teams" do
|
6
|
+
VCR.use_cassette("endpoint/mlb_teams-all") do
|
7
|
+
Xmlstats.mlb_teams.count.should == 30
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
it "gets a list of nothing but team objects" do
|
12
|
+
VCR.use_cassette("endpoint/mlb_teams-all") do
|
13
|
+
Xmlstats.mlb_teams.map(&:class).uniq.should == [ Xmlstats::Objects::Team ]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
it "includes the detroit tigers" do
|
18
|
+
VCR.use_cassette("endpoint/mlb_teams-all") do
|
19
|
+
Xmlstats.mlb_teams.find { |team| team.full_name == "Detroit Tigers" }.should_not be_nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
$LOAD_PATH << File.expand_path("../lib", __FILE__)
|
2
|
+
require "xmlstats"
|
3
|
+
require "rspec"
|
4
|
+
require "vcr"
|
5
|
+
|
6
|
+
Xmlstats.http_getter = Xmlstats::HttpGetters::NetHttp.new
|
7
|
+
Xmlstats.cacher = nil
|
8
|
+
Xmlstats.api_key = ENV["XMLSTATS_API_KEY"] || "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
|
9
|
+
Xmlstats.contact_info = ENV["XMLSTATS_CONTACT_INFO"] || "developer@example.com"
|
10
|
+
|
11
|
+
VCR.configure do |config|
|
12
|
+
|
13
|
+
config.cassette_library_dir = "spec/vcr_cassettes"
|
14
|
+
config.hook_into :webmock
|
15
|
+
|
16
|
+
config.before_record do |i|
|
17
|
+
i.response.headers.delete('Set-Cookie')
|
18
|
+
end
|
19
|
+
|
20
|
+
config.filter_sensitive_data "<API_KEY>" do
|
21
|
+
ENV["XMLSTATS_API_KEY"]
|
22
|
+
end
|
23
|
+
|
24
|
+
config.filter_sensitive_data "<CONTACT_INFO>" do
|
25
|
+
ENV["XMLSTATS_CONTACT_INFO"]
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,407 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://erikberg.com/mlb/teams.json?
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- xmlstats-ruby/1.4.1 (<CONTACT_INFO>)
|
12
|
+
Authorization:
|
13
|
+
- Bearer <API_KEY>
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- '*/*'
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Xmlstats-Api-Method:
|
24
|
+
- teams
|
25
|
+
Xmlstats-Api-Exec-Time:
|
26
|
+
- '5'
|
27
|
+
Xmlstats-Api-Limit:
|
28
|
+
- ''
|
29
|
+
Etag:
|
30
|
+
- '-2080227086'
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
Vary:
|
36
|
+
- Accept-Encoding
|
37
|
+
Date:
|
38
|
+
- Fri, 30 Aug 2013 13:37:37 GMT
|
39
|
+
Server:
|
40
|
+
- Apache
|
41
|
+
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
|
+
} ]
|
405
|
+
http_version:
|
406
|
+
recorded_at: Fri, 30 Aug 2013 13:37:37 GMT
|
407
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,635 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://erikberg.com/events.json?date=20130901
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- xmlstats-ruby/1.4.1 (<CONTACT_INFO>)
|
12
|
+
Authorization:
|
13
|
+
- Bearer <API_KEY>
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- '*/*'
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Xmlstats-Api-Method:
|
24
|
+
- events
|
25
|
+
Xmlstats-Api-Exec-Time:
|
26
|
+
- '37'
|
27
|
+
Xmlstats-Api-Limit:
|
28
|
+
- ''
|
29
|
+
Etag:
|
30
|
+
- '1416359259'
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
Vary:
|
36
|
+
- Accept-Encoding
|
37
|
+
Date:
|
38
|
+
- Fri, 30 Aug 2013 13:37:37 GMT
|
39
|
+
Server:
|
40
|
+
- Apache
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: |-
|
44
|
+
{
|
45
|
+
"events_date" : "2013-09-01T00:00:00-04:00",
|
46
|
+
"event" : [ {
|
47
|
+
"event_id" : "20130901-philadelphia-phillies-at-chicago-cubs",
|
48
|
+
"event_status" : "scheduled",
|
49
|
+
"sport" : "MLB",
|
50
|
+
"start_date_time" : "2013-09-01T03:45:56-04:00",
|
51
|
+
"season_type" : "regular",
|
52
|
+
"away_team" : {
|
53
|
+
"team_id" : "philadelphia-phillies",
|
54
|
+
"abbreviation" : "PHI",
|
55
|
+
"active" : true,
|
56
|
+
"first_name" : "Philadelphia",
|
57
|
+
"last_name" : "Phillies",
|
58
|
+
"conference" : "National",
|
59
|
+
"division" : "East",
|
60
|
+
"site_name" : "Citizens Bank Park",
|
61
|
+
"city" : "Philadelphia",
|
62
|
+
"state" : "Pennsylvania",
|
63
|
+
"full_name" : "Philadelphia Phillies"
|
64
|
+
},
|
65
|
+
"home_team" : {
|
66
|
+
"team_id" : "chicago-cubs",
|
67
|
+
"abbreviation" : "CHC",
|
68
|
+
"active" : true,
|
69
|
+
"first_name" : "Chicago",
|
70
|
+
"last_name" : "Cubs",
|
71
|
+
"conference" : "National",
|
72
|
+
"division" : "Central",
|
73
|
+
"site_name" : "Wrigley Field",
|
74
|
+
"city" : "Chicago",
|
75
|
+
"state" : "Illinois",
|
76
|
+
"full_name" : "Chicago Cubs"
|
77
|
+
},
|
78
|
+
"site" : {
|
79
|
+
"capacity" : 39538,
|
80
|
+
"surface" : "Grass",
|
81
|
+
"name" : "Wrigley Field",
|
82
|
+
"city" : "Chicago",
|
83
|
+
"state" : "Illinois"
|
84
|
+
}
|
85
|
+
}, {
|
86
|
+
"event_id" : "20130901-new-york-mets-at-washington-nationals",
|
87
|
+
"event_status" : "scheduled",
|
88
|
+
"sport" : "MLB",
|
89
|
+
"start_date_time" : "2013-09-01T03:45:56-04:00",
|
90
|
+
"season_type" : "regular",
|
91
|
+
"away_team" : {
|
92
|
+
"team_id" : "new-york-mets",
|
93
|
+
"abbreviation" : "NYM",
|
94
|
+
"active" : true,
|
95
|
+
"first_name" : "New York",
|
96
|
+
"last_name" : "Mets",
|
97
|
+
"conference" : "National",
|
98
|
+
"division" : "East",
|
99
|
+
"site_name" : "Citi Field",
|
100
|
+
"city" : "Flushing",
|
101
|
+
"state" : "New York",
|
102
|
+
"full_name" : "New York Mets"
|
103
|
+
},
|
104
|
+
"home_team" : {
|
105
|
+
"team_id" : "washington-nationals",
|
106
|
+
"abbreviation" : "WAS",
|
107
|
+
"active" : true,
|
108
|
+
"first_name" : "Washington",
|
109
|
+
"last_name" : "Nationals",
|
110
|
+
"conference" : "National",
|
111
|
+
"division" : "East",
|
112
|
+
"site_name" : "Nationals Park",
|
113
|
+
"city" : "Washington",
|
114
|
+
"state" : "District of Columbia",
|
115
|
+
"full_name" : "Washington Nationals"
|
116
|
+
},
|
117
|
+
"site" : {
|
118
|
+
"capacity" : 41487,
|
119
|
+
"surface" : "Grass",
|
120
|
+
"name" : "Nationals Park",
|
121
|
+
"city" : "Washington",
|
122
|
+
"state" : "District of Columbia"
|
123
|
+
}
|
124
|
+
}, {
|
125
|
+
"event_id" : "20130901-baltimore-orioles-at-new-york-yankees",
|
126
|
+
"event_status" : "scheduled",
|
127
|
+
"sport" : "MLB",
|
128
|
+
"start_date_time" : "2013-09-01T13:05:00-04:00",
|
129
|
+
"season_type" : "regular",
|
130
|
+
"away_team" : {
|
131
|
+
"team_id" : "baltimore-orioles",
|
132
|
+
"abbreviation" : "BAL",
|
133
|
+
"active" : true,
|
134
|
+
"first_name" : "Baltimore",
|
135
|
+
"last_name" : "Orioles",
|
136
|
+
"conference" : "American",
|
137
|
+
"division" : "East",
|
138
|
+
"site_name" : "Oriole Park at Camden Yards",
|
139
|
+
"city" : "Baltimore",
|
140
|
+
"state" : "Maryland",
|
141
|
+
"full_name" : "Baltimore Orioles"
|
142
|
+
},
|
143
|
+
"home_team" : {
|
144
|
+
"team_id" : "new-york-yankees",
|
145
|
+
"abbreviation" : "NYY",
|
146
|
+
"active" : true,
|
147
|
+
"first_name" : "New York",
|
148
|
+
"last_name" : "Yankees",
|
149
|
+
"conference" : "American",
|
150
|
+
"division" : "East",
|
151
|
+
"site_name" : "Yankee Stadium",
|
152
|
+
"city" : "Bronx",
|
153
|
+
"state" : "New York",
|
154
|
+
"full_name" : "New York Yankees"
|
155
|
+
},
|
156
|
+
"site" : {
|
157
|
+
"capacity" : 50291,
|
158
|
+
"surface" : "Grass",
|
159
|
+
"name" : "Yankee Stadium",
|
160
|
+
"city" : "Bronx",
|
161
|
+
"state" : "New York"
|
162
|
+
}
|
163
|
+
}, {
|
164
|
+
"event_id" : "20130901-cleveland-indians-at-detroit-tigers",
|
165
|
+
"event_status" : "scheduled",
|
166
|
+
"sport" : "MLB",
|
167
|
+
"start_date_time" : "2013-09-01T13:05:00-04:00",
|
168
|
+
"season_type" : "regular",
|
169
|
+
"away_team" : {
|
170
|
+
"team_id" : "cleveland-indians",
|
171
|
+
"abbreviation" : "CLE",
|
172
|
+
"active" : true,
|
173
|
+
"first_name" : "Cleveland",
|
174
|
+
"last_name" : "Indians",
|
175
|
+
"conference" : "American",
|
176
|
+
"division" : "Central",
|
177
|
+
"site_name" : "Progressive Field",
|
178
|
+
"city" : "Cleveland",
|
179
|
+
"state" : "Ohio",
|
180
|
+
"full_name" : "Cleveland Indians"
|
181
|
+
},
|
182
|
+
"home_team" : {
|
183
|
+
"team_id" : "detroit-tigers",
|
184
|
+
"abbreviation" : "DET",
|
185
|
+
"active" : true,
|
186
|
+
"first_name" : "Detroit",
|
187
|
+
"last_name" : "Tigers",
|
188
|
+
"conference" : "American",
|
189
|
+
"division" : "Central",
|
190
|
+
"site_name" : "Comerica Park",
|
191
|
+
"city" : "Detroit",
|
192
|
+
"state" : "Michigan",
|
193
|
+
"full_name" : "Detroit Tigers"
|
194
|
+
},
|
195
|
+
"site" : {
|
196
|
+
"capacity" : 41255,
|
197
|
+
"surface" : "Grass",
|
198
|
+
"name" : "Comerica Park",
|
199
|
+
"city" : "Detroit",
|
200
|
+
"state" : "Michigan"
|
201
|
+
}
|
202
|
+
}, {
|
203
|
+
"event_id" : "20130901-kansas-city-royals-at-toronto-blue-jays",
|
204
|
+
"event_status" : "scheduled",
|
205
|
+
"sport" : "MLB",
|
206
|
+
"start_date_time" : "2013-09-01T13:07:00-04:00",
|
207
|
+
"season_type" : "regular",
|
208
|
+
"away_team" : {
|
209
|
+
"team_id" : "kansas-city-royals",
|
210
|
+
"abbreviation" : "KC",
|
211
|
+
"active" : true,
|
212
|
+
"first_name" : "Kansas City",
|
213
|
+
"last_name" : "Royals",
|
214
|
+
"conference" : "American",
|
215
|
+
"division" : "Central",
|
216
|
+
"site_name" : "Kauffman Stadium",
|
217
|
+
"city" : "Kansas City",
|
218
|
+
"state" : "Missouri",
|
219
|
+
"full_name" : "Kansas City Royals"
|
220
|
+
},
|
221
|
+
"home_team" : {
|
222
|
+
"team_id" : "toronto-blue-jays",
|
223
|
+
"abbreviation" : "TOR",
|
224
|
+
"active" : true,
|
225
|
+
"first_name" : "Toronto",
|
226
|
+
"last_name" : "Blue Jays",
|
227
|
+
"conference" : "American",
|
228
|
+
"division" : "East",
|
229
|
+
"site_name" : "Rogers Centre",
|
230
|
+
"city" : "Toronto",
|
231
|
+
"state" : "Ontario",
|
232
|
+
"full_name" : "Toronto Blue Jays"
|
233
|
+
},
|
234
|
+
"site" : {
|
235
|
+
"capacity" : 49230,
|
236
|
+
"surface" : "Field Turf",
|
237
|
+
"name" : "Rogers Centre",
|
238
|
+
"city" : "Toronto",
|
239
|
+
"state" : "Ontario"
|
240
|
+
}
|
241
|
+
}, {
|
242
|
+
"event_id" : "20130901-st-louis-cardinals-at-pittsburgh-pirates",
|
243
|
+
"event_status" : "scheduled",
|
244
|
+
"sport" : "MLB",
|
245
|
+
"start_date_time" : "2013-09-01T13:35:00-04:00",
|
246
|
+
"season_type" : "regular",
|
247
|
+
"away_team" : {
|
248
|
+
"team_id" : "st-louis-cardinals",
|
249
|
+
"abbreviation" : "STL",
|
250
|
+
"active" : true,
|
251
|
+
"first_name" : "St. Louis",
|
252
|
+
"last_name" : "Cardinals",
|
253
|
+
"conference" : "National",
|
254
|
+
"division" : "Central",
|
255
|
+
"site_name" : "Busch Stadium",
|
256
|
+
"city" : "Saint Louis",
|
257
|
+
"state" : "Missouri",
|
258
|
+
"full_name" : "St. Louis Cardinals"
|
259
|
+
},
|
260
|
+
"home_team" : {
|
261
|
+
"team_id" : "pittsburgh-pirates",
|
262
|
+
"abbreviation" : "PIT",
|
263
|
+
"active" : true,
|
264
|
+
"first_name" : "Pittsburgh",
|
265
|
+
"last_name" : "Pirates",
|
266
|
+
"conference" : "National",
|
267
|
+
"division" : "Central",
|
268
|
+
"site_name" : "PNC Park",
|
269
|
+
"city" : "Pittsburgh",
|
270
|
+
"state" : "Pennsylvania",
|
271
|
+
"full_name" : "Pittsburgh Pirates"
|
272
|
+
},
|
273
|
+
"site" : {
|
274
|
+
"capacity" : 38496,
|
275
|
+
"surface" : "Grass",
|
276
|
+
"name" : "PNC Park",
|
277
|
+
"city" : "Pittsburgh",
|
278
|
+
"state" : "Pennsylvania"
|
279
|
+
}
|
280
|
+
}, {
|
281
|
+
"event_id" : "20130901-chicago-white-sox-at-boston-red-sox",
|
282
|
+
"event_status" : "scheduled",
|
283
|
+
"sport" : "MLB",
|
284
|
+
"start_date_time" : "2013-09-01T13:35:00-04:00",
|
285
|
+
"season_type" : "regular",
|
286
|
+
"away_team" : {
|
287
|
+
"team_id" : "chicago-white-sox",
|
288
|
+
"abbreviation" : "CHW",
|
289
|
+
"active" : true,
|
290
|
+
"first_name" : "Chicago",
|
291
|
+
"last_name" : "White Sox",
|
292
|
+
"conference" : "American",
|
293
|
+
"division" : "Central",
|
294
|
+
"site_name" : "U.S. Cellular Field",
|
295
|
+
"city" : "Chicago",
|
296
|
+
"state" : "Illinois",
|
297
|
+
"full_name" : "Chicago White Sox"
|
298
|
+
},
|
299
|
+
"home_team" : {
|
300
|
+
"team_id" : "boston-red-sox",
|
301
|
+
"abbreviation" : "BOS",
|
302
|
+
"active" : true,
|
303
|
+
"first_name" : "Boston",
|
304
|
+
"last_name" : "Red Sox",
|
305
|
+
"conference" : "American",
|
306
|
+
"division" : "East",
|
307
|
+
"site_name" : "Fenway Park",
|
308
|
+
"city" : "Boston",
|
309
|
+
"state" : "Massachusetts",
|
310
|
+
"full_name" : "Boston Red Sox"
|
311
|
+
},
|
312
|
+
"site" : {
|
313
|
+
"capacity" : 33871,
|
314
|
+
"surface" : "Grass",
|
315
|
+
"name" : "Fenway Park",
|
316
|
+
"city" : "Boston",
|
317
|
+
"state" : "Massachusetts"
|
318
|
+
}
|
319
|
+
}, {
|
320
|
+
"event_id" : "20130901-seattle-mariners-at-houston-astros",
|
321
|
+
"event_status" : "scheduled",
|
322
|
+
"sport" : "MLB",
|
323
|
+
"start_date_time" : "2013-09-01T14:10:00-04:00",
|
324
|
+
"season_type" : "regular",
|
325
|
+
"away_team" : {
|
326
|
+
"team_id" : "seattle-mariners",
|
327
|
+
"abbreviation" : "SEA",
|
328
|
+
"active" : true,
|
329
|
+
"first_name" : "Seattle",
|
330
|
+
"last_name" : "Mariners",
|
331
|
+
"conference" : "American",
|
332
|
+
"division" : "West",
|
333
|
+
"site_name" : "Safeco Field",
|
334
|
+
"city" : "Seattle",
|
335
|
+
"state" : "Washington",
|
336
|
+
"full_name" : "Seattle Mariners"
|
337
|
+
},
|
338
|
+
"home_team" : {
|
339
|
+
"team_id" : "houston-astros",
|
340
|
+
"abbreviation" : "HOU",
|
341
|
+
"active" : true,
|
342
|
+
"first_name" : "Houston",
|
343
|
+
"last_name" : "Astros",
|
344
|
+
"conference" : "American",
|
345
|
+
"division" : "West",
|
346
|
+
"site_name" : "Minute Maid Park",
|
347
|
+
"city" : "Houston",
|
348
|
+
"state" : "Texas",
|
349
|
+
"full_name" : "Houston Astros"
|
350
|
+
},
|
351
|
+
"site" : {
|
352
|
+
"capacity" : 40950,
|
353
|
+
"surface" : "Grass",
|
354
|
+
"name" : "Minute Maid Park",
|
355
|
+
"city" : "Houston",
|
356
|
+
"state" : "Texas"
|
357
|
+
}
|
358
|
+
}, {
|
359
|
+
"event_id" : "20130901-los-angeles-angels-at-milwaukee-brewers",
|
360
|
+
"event_status" : "scheduled",
|
361
|
+
"sport" : "MLB",
|
362
|
+
"start_date_time" : "2013-09-01T14:10:00-04:00",
|
363
|
+
"season_type" : "regular",
|
364
|
+
"away_team" : {
|
365
|
+
"team_id" : "los-angeles-angels",
|
366
|
+
"abbreviation" : "LAA",
|
367
|
+
"active" : true,
|
368
|
+
"first_name" : "Los Angeles",
|
369
|
+
"last_name" : "Angels",
|
370
|
+
"conference" : "American",
|
371
|
+
"division" : "West",
|
372
|
+
"site_name" : "Angel Stadium of Anaheim",
|
373
|
+
"city" : "Anaheim",
|
374
|
+
"state" : "California",
|
375
|
+
"full_name" : "Los Angeles Angels"
|
376
|
+
},
|
377
|
+
"home_team" : {
|
378
|
+
"team_id" : "milwaukee-brewers",
|
379
|
+
"abbreviation" : "MIL",
|
380
|
+
"active" : true,
|
381
|
+
"first_name" : "Milwaukee",
|
382
|
+
"last_name" : "Brewers",
|
383
|
+
"conference" : "National",
|
384
|
+
"division" : "Central",
|
385
|
+
"site_name" : "Miller Park",
|
386
|
+
"city" : "Milwaukee",
|
387
|
+
"state" : "Wisconsin",
|
388
|
+
"full_name" : "Milwaukee Brewers"
|
389
|
+
},
|
390
|
+
"site" : {
|
391
|
+
"capacity" : 43000,
|
392
|
+
"surface" : "Grass",
|
393
|
+
"name" : "Miller Park",
|
394
|
+
"city" : "Milwaukee",
|
395
|
+
"state" : "Wisconsin"
|
396
|
+
}
|
397
|
+
}, {
|
398
|
+
"event_id" : "20130901-minnesota-twins-at-texas-rangers",
|
399
|
+
"event_status" : "scheduled",
|
400
|
+
"sport" : "MLB",
|
401
|
+
"start_date_time" : "2013-09-01T15:05:00-04:00",
|
402
|
+
"season_type" : "regular",
|
403
|
+
"away_team" : {
|
404
|
+
"team_id" : "minnesota-twins",
|
405
|
+
"abbreviation" : "MIN",
|
406
|
+
"active" : true,
|
407
|
+
"first_name" : "Minnesota",
|
408
|
+
"last_name" : "Twins",
|
409
|
+
"conference" : "American",
|
410
|
+
"division" : "Central",
|
411
|
+
"site_name" : "Target Field",
|
412
|
+
"city" : "Minneapolis",
|
413
|
+
"state" : "Minnesota",
|
414
|
+
"full_name" : "Minnesota Twins"
|
415
|
+
},
|
416
|
+
"home_team" : {
|
417
|
+
"team_id" : "texas-rangers",
|
418
|
+
"abbreviation" : "TEX",
|
419
|
+
"active" : true,
|
420
|
+
"first_name" : "Texas",
|
421
|
+
"last_name" : "Rangers",
|
422
|
+
"conference" : "American",
|
423
|
+
"division" : "West",
|
424
|
+
"site_name" : "Rangers Ballpark in Arlington",
|
425
|
+
"city" : "Arlington",
|
426
|
+
"state" : "Texas",
|
427
|
+
"full_name" : "Texas Rangers"
|
428
|
+
},
|
429
|
+
"site" : {
|
430
|
+
"capacity" : 49115,
|
431
|
+
"surface" : "Grass",
|
432
|
+
"name" : "Rangers Ballpark in Arlington",
|
433
|
+
"city" : "Arlington",
|
434
|
+
"state" : "Texas"
|
435
|
+
}
|
436
|
+
}, {
|
437
|
+
"event_id" : "20130901-tampa-bay-rays-at-oakland-athletics",
|
438
|
+
"event_status" : "scheduled",
|
439
|
+
"sport" : "MLB",
|
440
|
+
"start_date_time" : "2013-09-01T16:05:00-04:00",
|
441
|
+
"season_type" : "regular",
|
442
|
+
"away_team" : {
|
443
|
+
"team_id" : "tampa-bay-rays",
|
444
|
+
"abbreviation" : "TB",
|
445
|
+
"active" : true,
|
446
|
+
"first_name" : "Tampa Bay",
|
447
|
+
"last_name" : "Rays",
|
448
|
+
"conference" : "American",
|
449
|
+
"division" : "East",
|
450
|
+
"site_name" : "Tropicana Field",
|
451
|
+
"city" : "Saint Petersburg",
|
452
|
+
"state" : "Florida",
|
453
|
+
"full_name" : "Tampa Bay Rays"
|
454
|
+
},
|
455
|
+
"home_team" : {
|
456
|
+
"team_id" : "oakland-athletics",
|
457
|
+
"abbreviation" : "OAK",
|
458
|
+
"active" : true,
|
459
|
+
"first_name" : "Oakland",
|
460
|
+
"last_name" : "Athletics",
|
461
|
+
"conference" : "American",
|
462
|
+
"division" : "West",
|
463
|
+
"site_name" : "O.co Coliseum",
|
464
|
+
"city" : "Oakland",
|
465
|
+
"state" : "California",
|
466
|
+
"full_name" : "Oakland Athletics"
|
467
|
+
},
|
468
|
+
"site" : {
|
469
|
+
"capacity" : 35067,
|
470
|
+
"surface" : "Grass",
|
471
|
+
"name" : "O.co Coliseum",
|
472
|
+
"city" : "Oakland",
|
473
|
+
"state" : "California"
|
474
|
+
}
|
475
|
+
}, {
|
476
|
+
"event_id" : "20130901-cincinnati-reds-at-colorado-rockies",
|
477
|
+
"event_status" : "scheduled",
|
478
|
+
"sport" : "MLB",
|
479
|
+
"start_date_time" : "2013-09-01T16:10:00-04:00",
|
480
|
+
"season_type" : "regular",
|
481
|
+
"away_team" : {
|
482
|
+
"team_id" : "cincinnati-reds",
|
483
|
+
"abbreviation" : "CIN",
|
484
|
+
"active" : true,
|
485
|
+
"first_name" : "Cincinnati",
|
486
|
+
"last_name" : "Reds",
|
487
|
+
"conference" : "National",
|
488
|
+
"division" : "Central",
|
489
|
+
"site_name" : "Great American Ball Park",
|
490
|
+
"city" : "Cincinnati",
|
491
|
+
"state" : "Ohio",
|
492
|
+
"full_name" : "Cincinnati Reds"
|
493
|
+
},
|
494
|
+
"home_team" : {
|
495
|
+
"team_id" : "colorado-rockies",
|
496
|
+
"abbreviation" : "COL",
|
497
|
+
"active" : true,
|
498
|
+
"first_name" : "Colorado",
|
499
|
+
"last_name" : "Rockies",
|
500
|
+
"conference" : "National",
|
501
|
+
"division" : "West",
|
502
|
+
"site_name" : "Coors Field",
|
503
|
+
"city" : "Denver",
|
504
|
+
"state" : "Colorado",
|
505
|
+
"full_name" : "Colorado Rockies"
|
506
|
+
},
|
507
|
+
"site" : {
|
508
|
+
"capacity" : 50445,
|
509
|
+
"surface" : "Grass",
|
510
|
+
"name" : "Coors Field",
|
511
|
+
"city" : "Denver",
|
512
|
+
"state" : "Colorado"
|
513
|
+
}
|
514
|
+
}, {
|
515
|
+
"event_id" : "20130901-san-diego-padres-at-los-angeles-dodgers",
|
516
|
+
"event_status" : "scheduled",
|
517
|
+
"sport" : "MLB",
|
518
|
+
"start_date_time" : "2013-09-01T16:10:00-04:00",
|
519
|
+
"season_type" : "regular",
|
520
|
+
"away_team" : {
|
521
|
+
"team_id" : "san-diego-padres",
|
522
|
+
"abbreviation" : "SD",
|
523
|
+
"active" : true,
|
524
|
+
"first_name" : "San Diego",
|
525
|
+
"last_name" : "Padres",
|
526
|
+
"conference" : "National",
|
527
|
+
"division" : "West",
|
528
|
+
"site_name" : "PETCO Park",
|
529
|
+
"city" : "San Diego",
|
530
|
+
"state" : "California",
|
531
|
+
"full_name" : "San Diego Padres"
|
532
|
+
},
|
533
|
+
"home_team" : {
|
534
|
+
"team_id" : "los-angeles-dodgers",
|
535
|
+
"abbreviation" : "LAD",
|
536
|
+
"active" : true,
|
537
|
+
"first_name" : "Los Angeles",
|
538
|
+
"last_name" : "Dodgers",
|
539
|
+
"conference" : "National",
|
540
|
+
"division" : "West",
|
541
|
+
"site_name" : "Dodger Stadium",
|
542
|
+
"city" : "Los Angeles",
|
543
|
+
"state" : "California",
|
544
|
+
"full_name" : "Los Angeles Dodgers"
|
545
|
+
},
|
546
|
+
"site" : {
|
547
|
+
"capacity" : 56000,
|
548
|
+
"surface" : "Grass",
|
549
|
+
"name" : "Dodger Stadium",
|
550
|
+
"city" : "Los Angeles",
|
551
|
+
"state" : "California"
|
552
|
+
}
|
553
|
+
}, {
|
554
|
+
"event_id" : "20130901-san-francisco-giants-at-arizona-diamondbacks",
|
555
|
+
"event_status" : "scheduled",
|
556
|
+
"sport" : "MLB",
|
557
|
+
"start_date_time" : "2013-09-01T16:10:00-04:00",
|
558
|
+
"season_type" : "regular",
|
559
|
+
"away_team" : {
|
560
|
+
"team_id" : "san-francisco-giants",
|
561
|
+
"abbreviation" : "SF",
|
562
|
+
"active" : true,
|
563
|
+
"first_name" : "San Francisco",
|
564
|
+
"last_name" : "Giants",
|
565
|
+
"conference" : "National",
|
566
|
+
"division" : "West",
|
567
|
+
"site_name" : "AT&T Park",
|
568
|
+
"city" : "San Francisco",
|
569
|
+
"state" : "California",
|
570
|
+
"full_name" : "San Francisco Giants"
|
571
|
+
},
|
572
|
+
"home_team" : {
|
573
|
+
"team_id" : "arizona-diamondbacks",
|
574
|
+
"abbreviation" : "ARI",
|
575
|
+
"active" : true,
|
576
|
+
"first_name" : "Arizona",
|
577
|
+
"last_name" : "Diamondbacks",
|
578
|
+
"conference" : "National",
|
579
|
+
"division" : "West",
|
580
|
+
"site_name" : "Chase Field",
|
581
|
+
"city" : "Phoenix",
|
582
|
+
"state" : "Arizona",
|
583
|
+
"full_name" : "Arizona Diamondbacks"
|
584
|
+
},
|
585
|
+
"site" : {
|
586
|
+
"capacity" : 49033,
|
587
|
+
"surface" : "Grass",
|
588
|
+
"name" : "Chase Field",
|
589
|
+
"city" : "Phoenix",
|
590
|
+
"state" : "Arizona"
|
591
|
+
}
|
592
|
+
}, {
|
593
|
+
"event_id" : "20130901-miami-marlins-at-atlanta-braves",
|
594
|
+
"event_status" : "scheduled",
|
595
|
+
"sport" : "MLB",
|
596
|
+
"start_date_time" : "2013-09-01T17:00:00-04:00",
|
597
|
+
"season_type" : "regular",
|
598
|
+
"away_team" : {
|
599
|
+
"team_id" : "miami-marlins",
|
600
|
+
"abbreviation" : "MIA",
|
601
|
+
"active" : true,
|
602
|
+
"first_name" : "Miami",
|
603
|
+
"last_name" : "Marlins",
|
604
|
+
"conference" : "National",
|
605
|
+
"division" : "East",
|
606
|
+
"site_name" : "Marlins Park",
|
607
|
+
"city" : "Miami",
|
608
|
+
"state" : "Florida",
|
609
|
+
"full_name" : "Miami Marlins"
|
610
|
+
},
|
611
|
+
"home_team" : {
|
612
|
+
"team_id" : "atlanta-braves",
|
613
|
+
"abbreviation" : "ATL",
|
614
|
+
"active" : true,
|
615
|
+
"first_name" : "Atlanta",
|
616
|
+
"last_name" : "Braves",
|
617
|
+
"conference" : "National",
|
618
|
+
"division" : "East",
|
619
|
+
"site_name" : "Turner Field",
|
620
|
+
"city" : "Atlanta",
|
621
|
+
"state" : "Georgia",
|
622
|
+
"full_name" : "Atlanta Braves"
|
623
|
+
},
|
624
|
+
"site" : {
|
625
|
+
"capacity" : 50096,
|
626
|
+
"surface" : "Grass",
|
627
|
+
"name" : "Turner Field",
|
628
|
+
"city" : "Atlanta",
|
629
|
+
"state" : "Georgia"
|
630
|
+
}
|
631
|
+
} ]
|
632
|
+
}
|
633
|
+
http_version:
|
634
|
+
recorded_at: Fri, 30 Aug 2013 13:37:37 GMT
|
635
|
+
recorded_with: VCR 2.5.0
|
data/xmlstats.gemspec
CHANGED
@@ -20,4 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
22
|
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "vcr"
|
25
|
+
spec.add_development_dependency "webmock", "~> 1.11.0"
|
23
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xmlstats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex McHale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,48 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: vcr
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.11.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.11.0
|
41
83
|
description: A ruby client for xmlstats (https://erikberg.com/api).
|
42
84
|
email:
|
43
85
|
- alex@anticlever.com
|
@@ -46,6 +88,7 @@ extensions: []
|
|
46
88
|
extra_rdoc_files: []
|
47
89
|
files:
|
48
90
|
- .gitignore
|
91
|
+
- .travis.yml
|
49
92
|
- Gemfile
|
50
93
|
- LICENSE.txt
|
51
94
|
- README.md
|
@@ -84,6 +127,12 @@ files:
|
|
84
127
|
- lib/xmlstats/objects/team.rb
|
85
128
|
- lib/xmlstats/objects/team_result.rb
|
86
129
|
- lib/xmlstats/version.rb
|
130
|
+
- spec/endpoints/events_spec.rb
|
131
|
+
- spec/endpoints/mlb_teams_spec.rb
|
132
|
+
- spec/objects/pitcher_spec.rb
|
133
|
+
- spec/spec_helper.rb
|
134
|
+
- spec/vcr_cassettes/endpoint/mlb_teams-all.yml
|
135
|
+
- spec/vcr_cassettes/events-all-20130901.yml
|
87
136
|
- xmlstats.gemspec
|
88
137
|
homepage: http://github.com/alexmchale/xmlstats-ruby
|
89
138
|
licenses:
|
@@ -109,4 +158,11 @@ rubygems_version: 2.0.3
|
|
109
158
|
signing_key:
|
110
159
|
specification_version: 4
|
111
160
|
summary: A ruby client for xmlstats (https://erikberg.com/api).
|
112
|
-
test_files:
|
161
|
+
test_files:
|
162
|
+
- spec/endpoints/events_spec.rb
|
163
|
+
- spec/endpoints/mlb_teams_spec.rb
|
164
|
+
- spec/objects/pitcher_spec.rb
|
165
|
+
- spec/spec_helper.rb
|
166
|
+
- spec/vcr_cassettes/endpoint/mlb_teams-all.yml
|
167
|
+
- spec/vcr_cassettes/events-all-20130901.yml
|
168
|
+
has_rdoc:
|