__ __ __
/ /_ ____ _____/ /_____ __ _______/ /_________ ____ _____ ___ _____
/ __ \/ __ \/ ___/ //_/ _ \/ / / / ___/ __/ ___/ _ \/ __ `/ __ `__ \/ ___/
/ / / / /_/ / /__/ ,< / __/ /_/ (__ ) /_/ / / __/ /_/ / / / / / (__ )
/_/ /_/\____/\___/_/|_|\___/\__, /____/\__/_/ \___/\__,_/_/ /_/ /_/____/
/____/
hockeystreams
A node.js wrapper for the HockeySteams API.
Install
npm i --save hockeystreams
Requirements
API Key
The HockeyStreams API requires an API Key which can be obtained here.
Documentation
Functions
init
login
getLive
getLiveStream
getLocations
getOnDemandDates
getOnDemand
getOnDemandStream
getHighlights
getCondensedGames
listTeams
scores
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 containingkey
and/orscores_key
.
Examples
var HS = ;
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 containingusername
andpassword
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;
getLive(options, callback)
Retrieve a list of live streams.
Arguments
options
- An Object containing a usertoken
and optionally adate
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;
getLiveStream(options, callback)
Retrieve a specific live stream, with sources (iStream, WMV and Flash).
Arguments
options
- An Object containing an live gameid
, a usertoken
and optionally alocation
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;
getLocations(callback)
Retrieve a list of availalbe streaming locations for live streams.
Arguments
callback
- A Function witherror
andresponse
arguments.
Examples
HS;
getOnDemandDates(options, callback)
Retrieve a list of dates where on demand feeds are available.
Arguments
options
- An Object containing a usertoken
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;
getOnDemand(options, callback)
Retrieve a list of on demand streams.
Arguments
options
- An Object containing a usertoken
and optionally adate
and/or ateam
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;
getOnDemandStream(options, callback)
Retrieve a specific on demand stream, with sources (iStream, WMV and Flash).
Arguments
options
- An Object containing an on-demandid
, a usertoken
and optionally alocation
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;
getHighlights(options, callback)
Retrieve a list of highlights.
Arguments
options
- An Object containing a usertoken
and optionally adate
and/or ateam
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;
getCondensedGames(options, callback)
Retrieve a list of condensed games.
Arguments
options
- An Object containing a usertoken
and optionally adate
and/or ateam
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;
listTeams(options, callback)
Get a list of all previous live or on-demand teams.
Arguments
options
- An Object containing a usertoken
and optionally aleague
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;
scores(options, callback)
Scores API.
Arguments
options
- An Object containing a scores apikey
and optionally adate
and/orevent
.callback
- A Function witherror
andresponse
arguments.
Examples
HS;