npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hockeystreams

v1.0.0

Published

A node.js wrapper for the HockeySteams API.

Downloads

4

Readme

    __               __                   __
   / /_  ____  _____/ /_____  __  _______/ /_________  ____ _____ ___  _____
  / __ \/ __ \/ ___/ //_/ _ \/ / / / ___/ __/ ___/ _ \/ __ `/ __ `__ \/ ___/
 / / / / /_/ / /__/ ,< /  __/ /_/ (__  ) /_/ /  /  __/ /_/ / / / / / (__  )
/_/ /_/\____/\___/_/|_|\___/\__, /____/\__/_/   \___/\__,_/_/ /_/ /_/____/
                           /____/

hockeystreams

A node.js wrapper for the HockeySteams API.

NPM Version Build Status Coverage Status

Install

npm i --save hockeystreams

Requirements

API Key

The HockeyStreams API requires an API Key which can be obtained here.

Documentation

Functions

Functions

init(options)

Initializes the HockeyStreams API wrapper. The methods returned will depend on which keys are passed as options.

NOTE: Keys can be obtained on the HockeyStreams API page.

Arguments

  • options - An Object containing key and/or scores_key.

Examples

var HS = require('hockeystreams').init({
  key: 'YOUR HOCKEYSTREAMS API KEY',
  scores_key: 'YOUR HOCKEYSTREAMS SCORES API KEY'
});

login(options, callback)

Authenticates a user, and returns their membership status, as well as a authentication token to use for retrieving the rest of the resources.

Arguments

  • options - An Object containing username and password.
  • callback - A Function with error and response arguments.

Examples

HS.login({
  username: 'USERS USERNAME',
  password: 'USERS PASSWORD'
}, function(err, res){
  // Do your thing
});

getLive(options, callback)

Retrieve a list of live streams.

Arguments

  • options - An Object containing a user token and optionally a date.
  • callback - A Function with error and response arguments.

Examples

HS.getLive({
  date: 'MM/DD/YYY',  // => Optional
  token: 'USER TOKEN' // => Retrieved from login method
}, function(err, res){
  // Do your thing
});

getLiveStream(options, callback)

Retrieve a specific live stream, with sources (iStream, WMV and Flash).

Arguments

  • options - An Object containing an live game id, a user token and optionally a location.
  • callback - A Function with error and response arguments.

Examples

HS.getLiveStream({
  id: '12345',                             // => Required
  location: 'North America - East Canada', // => Optional
  token: 'USER TOKEN'                      // => Retrieved from login method
}, function(err, res){
  // Do your thing
});

getLocations(callback)

Retrieve a list of availalbe streaming locations for live streams.

Arguments

  • callback - A Function with error and response arguments.

Examples

HS.getLocations(function(err, res){
  // Do your thing
});

getOnDemandDates(options, callback)

Retrieve a list of dates where on demand feeds are available.

Arguments

  • options - An Object containing a user token.
  • callback - A Function with error and response arguments.

Examples

HS.getOnDemandDates({
  token: 'USER TOKEN' // => Retrieved from login method
}, function(err, res){
  // Do your thing
});

getOnDemand(options, callback)

Retrieve a list of on demand streams.

Arguments

  • options - An Object containing a user token and optionally a date and/or a team.
  • callback - A Function with error and response arguments.

Examples

HS.getOnDemand({
  date: 'MM/DD/YYYY',      // => Optional
  team: 'Ottawa Senators', // => Optional
  token: 'USER TOKEN'      // => Retrieved from login method
}, function(err, res){
  // Do your thing
});

getOnDemandStream(options, callback)

Retrieve a specific on demand stream, with sources (iStream, WMV and Flash).

Arguments

  • options - An Object containing an on-demand id, a user token and optionally a location.
  • callback - A Function with error and response arguments.

Examples

HS.getOnDemandStream({
  id: '12345',                             // => Required
  location: 'North America - East Canada', // => Optional
  token: 'USER TOKEN'                      // => Retrieved from login method
}, function(err, res){
  // Do your thing
});

getHighlights(options, callback)

Retrieve a list of highlights.

Arguments

  • options - An Object containing a user token and optionally a date and/or a team.
  • callback - A Function with error and response arguments.

Examples

HS.getHighlights({
  date: 'MM/DD/YYYY',      // => Optional
  team: 'Ottawa Senators', // => Optional
  token: 'USER TOKEN'      // => Retrieved from login method
}, function(err, res){
  // Do your thing
});

getCondensedGames(options, callback)

Retrieve a list of condensed games.

Arguments

  • options - An Object containing a user token and optionally a date and/or a team.
  • callback - A Function with error and response arguments.

Examples

HS.getCondensedGames({
  date: 'MM/DD/YYYY',      // => Optional
  team: 'Ottawa Senators', // => Optional
  token: 'USER TOKEN'      // => Retrieved from login method
}, function(err, res){
  // Do your thing
});

listTeams(options, callback)

Get a list of all previous live or on-demand teams.

Arguments

  • options - An Object containing a user token and optionally a league.
  • callback - A Function with error and response arguments.

Examples

HS.listTeams({
  league: 'NHL',      // => Optional
  token: 'USER TOKEN' // => Retrieved from login method
}, function(err, res){
  // Do your thing
});

scores(options, callback)

Scores API.

Arguments

  • options - An Object containing a scores api key and optionally a date and/or event.
  • callback - A Function with error and response arguments.

Examples

HS.scores({
  date: 'MM/DD/YYYY',   // => Optional
  'event': 'NHL'        // => Optional
}, function(err, res){
  // Do your thing
});