Can't figure out the endpoints of NHL's official API.
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
The NHL has an official API that lacks any official documentation. There's one github repo trying to document it though.
I'm trying to access the statitistics for a team's goals per period. According to the documentation it can be found at: ?stats=goalsByGameSituation&season=20162017.
So I go to this endpoint but I'm getting what I looked for.
Anyone experienced with the NHL API please help me out.
Thanks in advance!
api
add a comment |
The NHL has an official API that lacks any official documentation. There's one github repo trying to document it though.
I'm trying to access the statitistics for a team's goals per period. According to the documentation it can be found at: ?stats=goalsByGameSituation&season=20162017.
So I go to this endpoint but I'm getting what I looked for.
Anyone experienced with the NHL API please help me out.
Thanks in advance!
api
add a comment |
The NHL has an official API that lacks any official documentation. There's one github repo trying to document it though.
I'm trying to access the statitistics for a team's goals per period. According to the documentation it can be found at: ?stats=goalsByGameSituation&season=20162017.
So I go to this endpoint but I'm getting what I looked for.
Anyone experienced with the NHL API please help me out.
Thanks in advance!
api
The NHL has an official API that lacks any official documentation. There's one github repo trying to document it though.
I'm trying to access the statitistics for a team's goals per period. According to the documentation it can be found at: ?stats=goalsByGameSituation&season=20162017.
So I go to this endpoint but I'm getting what I looked for.
Anyone experienced with the NHL API please help me out.
Thanks in advance!
api
api
asked Jan 3 at 23:51
Rickard Rickard
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can use either ?expand=team.stats or add /stats to the path to get stats for a team:
- https://statsapi.web.nhl.com/api/v1/teams/15?expand=team.stats&season=20152016
- https://statsapi.web.nhl.com/api/v1/teams/15/stats?season=20152016
However, they don't include the goals per period and those endpoints ignore the ?stats=... query parameter. The ?stats=goalsByGameSituation&season=20162017 query string is for people, for example
https://statsapi.web.nhl.com/api/v1/people/8471214/stats?stats=goalsByGameSituation&season=20162017
To get the goals per period for teams you could calculate the stat you want by aggregating game line scores, for example:
- https://statsapi.web.nhl.com/api/v1/game/2017020001/linescore
You could also aggregate the player stats over their roster (teams/{id}/roster) to get an approximate team statistic. It doesn't allow you to add a team query parameter for players so you can't separate player stats by team when players are traded.
Also note that the Github repo is no longer being maintained. You can use the GitLab one for the most up-to-date version.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54031391%2fcant-figure-out-the-endpoints-of-nhls-official-api%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use either ?expand=team.stats or add /stats to the path to get stats for a team:
- https://statsapi.web.nhl.com/api/v1/teams/15?expand=team.stats&season=20152016
- https://statsapi.web.nhl.com/api/v1/teams/15/stats?season=20152016
However, they don't include the goals per period and those endpoints ignore the ?stats=... query parameter. The ?stats=goalsByGameSituation&season=20162017 query string is for people, for example
https://statsapi.web.nhl.com/api/v1/people/8471214/stats?stats=goalsByGameSituation&season=20162017
To get the goals per period for teams you could calculate the stat you want by aggregating game line scores, for example:
- https://statsapi.web.nhl.com/api/v1/game/2017020001/linescore
You could also aggregate the player stats over their roster (teams/{id}/roster) to get an approximate team statistic. It doesn't allow you to add a team query parameter for players so you can't separate player stats by team when players are traded.
Also note that the Github repo is no longer being maintained. You can use the GitLab one for the most up-to-date version.
add a comment |
You can use either ?expand=team.stats or add /stats to the path to get stats for a team:
- https://statsapi.web.nhl.com/api/v1/teams/15?expand=team.stats&season=20152016
- https://statsapi.web.nhl.com/api/v1/teams/15/stats?season=20152016
However, they don't include the goals per period and those endpoints ignore the ?stats=... query parameter. The ?stats=goalsByGameSituation&season=20162017 query string is for people, for example
https://statsapi.web.nhl.com/api/v1/people/8471214/stats?stats=goalsByGameSituation&season=20162017
To get the goals per period for teams you could calculate the stat you want by aggregating game line scores, for example:
- https://statsapi.web.nhl.com/api/v1/game/2017020001/linescore
You could also aggregate the player stats over their roster (teams/{id}/roster) to get an approximate team statistic. It doesn't allow you to add a team query parameter for players so you can't separate player stats by team when players are traded.
Also note that the Github repo is no longer being maintained. You can use the GitLab one for the most up-to-date version.
add a comment |
You can use either ?expand=team.stats or add /stats to the path to get stats for a team:
- https://statsapi.web.nhl.com/api/v1/teams/15?expand=team.stats&season=20152016
- https://statsapi.web.nhl.com/api/v1/teams/15/stats?season=20152016
However, they don't include the goals per period and those endpoints ignore the ?stats=... query parameter. The ?stats=goalsByGameSituation&season=20162017 query string is for people, for example
https://statsapi.web.nhl.com/api/v1/people/8471214/stats?stats=goalsByGameSituation&season=20162017
To get the goals per period for teams you could calculate the stat you want by aggregating game line scores, for example:
- https://statsapi.web.nhl.com/api/v1/game/2017020001/linescore
You could also aggregate the player stats over their roster (teams/{id}/roster) to get an approximate team statistic. It doesn't allow you to add a team query parameter for players so you can't separate player stats by team when players are traded.
Also note that the Github repo is no longer being maintained. You can use the GitLab one for the most up-to-date version.
You can use either ?expand=team.stats or add /stats to the path to get stats for a team:
- https://statsapi.web.nhl.com/api/v1/teams/15?expand=team.stats&season=20152016
- https://statsapi.web.nhl.com/api/v1/teams/15/stats?season=20152016
However, they don't include the goals per period and those endpoints ignore the ?stats=... query parameter. The ?stats=goalsByGameSituation&season=20162017 query string is for people, for example
https://statsapi.web.nhl.com/api/v1/people/8471214/stats?stats=goalsByGameSituation&season=20162017
To get the goals per period for teams you could calculate the stat you want by aggregating game line scores, for example:
- https://statsapi.web.nhl.com/api/v1/game/2017020001/linescore
You could also aggregate the player stats over their roster (teams/{id}/roster) to get an approximate team statistic. It doesn't allow you to add a team query parameter for players so you can't separate player stats by team when players are traded.
Also note that the Github repo is no longer being maintained. You can use the GitLab one for the most up-to-date version.
answered Jan 4 at 0:42
logan rakailogan rakai
1,7652821
1,7652821
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54031391%2fcant-figure-out-the-endpoints-of-nhls-official-api%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown