missing methods on Pitcher

Issue No. 207

Type

Bug

Status

Closed

Reported By

Scott Mennealy

Component

API

Resolution

Not a Bug

Votes

0

Created

14/Apr/15 9:18 AM EDT

Closed

20/Apr/2015 5:51 AM EDT

Description

Unless I'm doing something wrong, the following methods on Pitcher are not there: * win * loss * save Thanks for your work

Closing Comment

Unable to duplicate original issue and no other reports that the mlb box score method is not working correctly with pitcher win, loss, save data.

Comments

1. Erik Berg 14/Apr/2015 at 11:53 AM EDT

There is not enough information in your report. What is the API request you are making (i.e., the full URI with any parameters) What data do you expect to be returned? What data is actually being returned?

2. Scott Mennealy 14/Apr/2015 at 12:01 PM EDT

Erik API call: /mlb/boxscore/EVENT_ID Returned an object containing array of Pitcher objects: 'away_pitchers', 'home_pitchers' Reference: /api/objects/pitcher Expected: pitcher.win, pitcher.loss, pitcher.save Actual: method_missing (for above three)

3. Erik Berg 14/Apr/2015 at 12:32 PM EDT

If you post the actual request, I can try to replicate your results. In any case, I tried /mlb/boxscore/20150413-oakland-athletics-at-houston-astros.json In the away_pitchers and home_pitchers arrays, there are win, loss, save, and hold boolean fields for each pitcher object per the documentation. "away_pitchers": [ { "last_name":"Kazmir", "first_name":"Scott", "display_name":"Scott Kazmir", "pitch_order":1, "win":true, "loss":false, "save":false, "hold":false, "era":1.5, "whip":1.0, "innings_pitched":6.0, "hits_allowed":3, "runs_allowed":1, "earned_runs":1, "walks":3, "intentional_walks":0, "strike_outs":8, "home_runs_allowed":1, "pitch_count":91, "pitches_strikes":56, "wild_pitches":0, "hit_by_pitch":0, "errors":0, "team_abbreviation":"OAK" }, {