Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLB games not working #8

Closed
Jimmy-Hernandez opened this issue Sep 5, 2016 · 3 comments
Closed

MLB games not working #8

Jimmy-Hernandez opened this issue Sep 5, 2016 · 3 comments

Comments

@Jimmy-Hernandez
Copy link

The following function used to work, but now is not returning the array of MLB games. The exact same function currently works for NFL (replacing season_id with 'nfl-2016-2017' and 'baseball' with 'football')

var getAllMlbGames = function () {
var _alMlbGames=[];
var params = {
season_id: "mlb-2016"
};
stattleship.games('baseball', 'mlb', params).then(function (games) {
_allMlbGames = games;
});
};

@dthyresson
Copy link
Contributor

dthyresson commented Sep 9, 2016

I double checked that the API is returning all MLB games via curl:

curl -X "GET" "https://api.stattleship.com/baseball/mlb/games?season_id=mlb-2016" \
    -H "Accept: application/vnd.stattleship.com; version=1" \
    -H "Authorization: Token token=TOKEN" \
    -H "Content-Type: application/json"

With 2933 games

HTTP/1.1 200 OK
Server: Cowboy
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: public, no-cache
Link: <https://api.stattleship.com/baseball/mlb/games?page=74&season_id=mlb-2016>; rel="last", <https://api.stattleship.com/baseball/mlb/games?page=2&season_id=mlb-2016>; rel="next"
Total: 2933
Per-Page: 40

As I'll likely look to update this for #9 I'll have check to see that the MLB example works.

@jlcarmic
Copy link
Owner

@ClassicCreation can you confirm that David's update (v 1.1.1) fixes this issue?

@Jimmy-Hernandez
Copy link
Author

Confirmed thanks so much guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants