This Magic Mirror Module is partly based on MagicMirror-FootballLeagues. However the functionality has been changed and you are now able to view top scorers of a league and it integrates with the v4 of football-data.org
Navigate into your MagicMirror's modules folder and execute
git clone https://github.com/ChristianThingKnudsen/MMM-All-Football
Install fetch
npm install node-fetch
This module uses the MagicMirror standard configuration file config.js. Available options are:
Option | Values |
---|---|
apiKey | Api-Key for football-data.org the API used for aquiring data. A free API key can be aquired here. |
leagues | List of league-ID's you want to display. If you put more than one league the module switches automatically between them. A table with possible leagues and the related ID's can be found further down. Type: String Example: [ "PL", "CL" ] 1. Premier league, 2. Champions leage Default: [ "PL" ] |
displayTime | Defines how long one view is shown in milliseconds. Default Value: 60 * 1000 which is 6000 ms or 1 min. |
showTables | Toggles if tables are shown if the league has a table. Default Value: true |
showTopScorers | Toggles if you want to see top scorers of the selected leagues. Default Value: false |
Here is an example of an entry in config.js
{
module: 'MMM-All-Football',
position: 'top_right',
header: 'My Leagues',
config: {
leagues: ["PL", "CL"],
displayTime: 60 * 1000,
showTables: true,
showTopScorers: true,
apiKey: 'MySuperSecretKey'
}
},
All Data is from: football-data.org
Sadly football-data.org has introduced Tiers and Pricing which means:
-
You need a key from their site to use this tool. A free API key can be aquired here.
-
There is only a few leagues available, only 10 updates per minute and delayed scores (not live) in the free version.
All Updated League Codes can be found here. Some examples:
Code | League |
---|---|
"PL" | Premier League |
"WC" | FIFA World Cup |
"EC" | European Championship |
"CL" | UEFA Champions League |
"FL1" | Ligue 1 |
"BL1" | Bundesliga |
"SA" | Serie A |
"PD" | Primera Division |