
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
#open-shl
Node.js client for the open SHL (Swedish Hockey League) API. Developed with and for node.js 5+
npm install --save open-shl
First make sure you have a valid clientId and clientSecret for the API,
which can be gained by emailing support@shl.se
After that, you can access the api thusly:
const shl = require("open-shl");
const options = {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET",
userAgent: "YourUserAgent" // Optional
}
const client = shl.connect(options);
This client is built to mimic the API as documented on http://doc.openapi.shl.se
Many methods support extra query parameters, if they are supported in the API
they can be supplied in an optional query argument as final (or only) parameter
to the matching method. Most of the time this is the teamId, which is supplied
as an array of three letter team codes.
client.season(season)Parameters
season: int: The year the season startedReturns
season: The season API objectseason.games([query])Fetches all games for the season
Query Properties
teamIds: string[]: List of team codes of to include. Leave empty to include all teamsReturns
Promise<Game[]>: Promise of all games for the seasonseason.game(gameId)Fetches a specific games
Parameters
gameId: int: Id for the game to fetchReturns
Promise<Game>: The game with the specified idseason.statistics.goalkeepers([query])Gets the top goalkeepers for the season
Query Properties
teamIds: string[]: List of teams to include. Leave empty to include all teamssort: string: What attribute to sort on: saves|savesPercent|goalsAgainst|goalsAgainstAverage|won|tied|lost|shooutOuts|minutesInPlayReturns
Promise<GoalkeeperStatistics[]>: Statistics for all goalkeepers during that seasonseason.statistics.players([query])Gets the top players for the season
Query Properties
teamIds: string[]: List of teams to include. Leave empty to include all teamssort: string: What attribute to sort the players on assists|goals|points|pim|hits|plusminusReturns
Promise<PlayerStatistics[]>: Statistics for top players during that seasonseason.statistics.teams.standings([query])Get current standings for that season
Query Properties
teamIds: string[]: List of teams to include. Leave empty to include all teamsReturns
Promise<TeamStandings[]>: List of all teams and their current standingclient.teams()Get a list of all teams
Returns
Promise<Fact[]>: A list of basic facts for all teams in the SHLclient.team(teamCode)Get details for a particular team.
Parameters
teamCode: String: is the three-character team code. i.e. "FHC" for Frölunda HCReturns
Promise<Team>: All information about the requested team. Includes team facts, player facts and moreclient.videos([query])Get the ten latest videos
Query Properties
teamIds: string[]: List of teams to include. Leave empty to include all teamsReturns
Promise<Video[]>: Ten latest videosclient.articles([query])Get the latest articles
Query Properties
teamIds: string[]: List of teams to include. Leave empty to include all teamsReturns
Promise<Article[]>: Ten latest articlesconst shl = require("open-shl");
let client = shl.connect({clientId: "", clientSecret:""});
// Fetch the current standings
client.season(2015).statistics.teams.standings()
.then(teams => {
console.log(teams[0].team_code, "is currently leading the SHL");
});
//Fetch the top hitters between FHC and FBK
client.season(2015).statistics.players({sort: "hits", teamIds: ["FHC", "FBK"]})
.then(players => {
console.log("Between FBK and FHC, ", players[0].info.first_name, players[0].info.last_name, ", hits the most")
});
Copyright © 2016, Jakob Nilsson-Ehle.
Published under ISC license. See LICENSE.md
FAQs
Node.js client for open shl api
We found that open-shl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.