Since/Until Doesn't Limit Results Properly When Used In Conjunction With Each Other

Issue No. 216

Type

Bug

Status

Closed

Reported By

Matt Domerofski

Component

API

Resolution

Not a Bug

Votes

0

Created

22/Jun/15 11:04 AM EDT

Closed

22/Jun/2015 6:16 PM EDT

Description

Thanks for providing this great resource! It's great! Any help would be appreciated here. Each time I use this curl request: curl --compressed -H "Authorization: Bearer ACCESS TOKEN" /mlb/results/san-francisco-giants.json?season=2015&since=20150620&until=20150622 I'm receiving the results for the entire season. Removing the season parameter removes the dates prior to 20150620 but still displays the rest of the season rather than ending prior to 20150622. Reordering the until and since parameters results in seeing all the results until 20150622. It seems as though only the first parameter is being honored and subsequent parameters are being ignored.

Closing Comment

Per comments below.

Comments

1. Erik Berg 22/Jun/2015 at 11:31 AM EDT

First, thanks for including your actual full request, many people just write "box score doesn't work" which is much more difficult to track down and resolve. Second, I'm guessing you are running the curl command from a Bash shell. If so, you are correct that only the first parameter is being processed. This is because the "&" contained in the request URL is not escaped or quoted and is treated as a special control character in Bash. Three commands are actually executed: 1. curl --compressed -H "Authorization: Bearer ACCESS TOKEN" /mlb/results/san-francisco-giants.json?season=2015 2. since=20150620 3. until=20150622 Try the request again like: curl --compressed -H "Authorization: Bearer ACCESS TOKEN" "https://erikberg.com/mlb/results/san-francisco-giants.json?season=2015&since=20150620&until=20150622" If you are not using Bash or Linux/Unix and this is a different problem, let me know.

2. Matt Domerofski 22/Jun/2015 at 5:09 PM EDT

Nice! I should've known it was me. That did the trick, perfectly! Thanks a bunch!