Reputation: 307
For the Yahoo fantasy sports API, the documentation listing game IDs stops at the year 2012 for NFL. Can anyone tell me how I can get a list of current game IDs.
Upvotes: 0
Views: 1616
Reputation: 116
Once you are logged in through Oauth you can query all of the "games" the current user has access to using:
https://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys/?format=json
Upvotes: 1
Reputation: 70
Make a signed GET
request to the API's game resource specifying mlb, nhl, nfl, or nba as the sport. I'd provide the link to the API resource, but StackOverflow thinks it's spam and won't let me include it.
If it helps specifically, the GameIDs for this year's MLB and NFL Games are 370 and 371 respectively.
Upvotes: 2