A MagicMirror² module used to display stats from any DigitalShift site (HockeyShift, SoccerShift, LacrosseShift, FootballShift, BasketballShift, and BaseballShift).
- Navigate into your MagicMirror's
modules
folder and executegit clone https://github.com/parnic/MMM-ShiftStats.git
. cd MMM-ShiftStats
- Execute
npm install
to install the node dependencies. - Add the module inside
config.js
placing it where you prefer.
Option | Type | Description | Default |
---|---|---|---|
apiKey | string |
Your API key. If not supplied, the HockeyShift Android app's key is used by default. | |
teamName | string |
(REQUIRED) The name of the team you want to track. | |
sport | string |
(REQUIRED) The name of the sport you want to track (e.g. 'hockey' , 'soccer' ). |
|
mode | string |
What mode the module should run in. Valid values: 'standings' , 'games' |
'standings' |
maxGames | number |
When in games mode, how many games should be shown (it will show this many most recent games). |
6 |
teamNameClass | string |
CSS class to apply to displayed team names. | 'light' |
updateInterval | number |
How frequently, in milliseconds, to update the info. | 12 * 60 * 60 * 1000 (every 12 hours) |
Here is an example of an entry in config.js
{
module: 'MMM-ShiftStats',
header: 'Standings',
position: 'top_left',
config: {
teamName: 'Bears',
sport: 'Hockey'
}
},
Pull requests are very welcome! If you'd like to see any additional functionality, don't hesitate to let me know.
This uses a Node.JS library I created for interfacing with DigitalShift sites: node-shiftstats, so feel free to check that out for more information.