Attach a boxscore object into event

Issue No. 143

Type

Improvement

Status

Open

Reported By

web

Component

API

Votes

10

Created

28/Jul/13 4:48 PM EDT

Tracking

Sign in to track this issue

Description

While retrieving events for a given date it is not including the results for completed events, so if you need to display the result and other info such as players statistics you need to iterate through each event and request the related box score (based on the event id) in additional requests. This cause slow performance and additional avoidable requests. Is it possible to have a boxscore object attached one event. An alternative way to solve this could be to enable access to boxscores for a given date(example: /mbl/boxscores/20130707)

Comments

1. Tarik Ourchane 11/Nov/2013 at 4:15 PM EST

I second the request to have the results or scores for completed events. It will save further requests and makes displaying events in a schedule format less work.

2. Jamie Levinson 27/Jul/2014 at 11:25 AM EDT

Bumping this. Ideally it would be nice to pass in a single team name and get the box score that way: /mbl/boxscores/<full_name>/20140726 Also aren't all baseball team names unique identifiers? Why require city to differentiate? Thanks!

3. Jamie Levinson 27/Jul/2014 at 11:25 AM EDT

4. Erik Berg 28/Jul/2014 at 8:19 PM EDT

The purpose of the events method is primarily to query when a box score is available to download. It is supposed to answer the question, "How do I know when the box score data is there?" since the database is updated randomly. In the past, there were some bots that would request box scores repeatedly until the file eventually existed. This caused many 404 errors in the logs. Are there bad links, is something broken? No, it is just someone eager to get the box scores as soon as they are available. The events method fixes that problem. It is a lightweight method that can quickly inform when the data is there. Internally, requesting a box score is an expensive operation. Creating a method that returned all of the box scores on a given date is possible, but it would use cursors to do it. You would have to issue a request for the next cursor. Would there still be a benefit?