Skip to content

Commit

Permalink
switching to v4 due to empty tables in v2 of the API
Browse files Browse the repository at this point in the history
  • Loading branch information
fewieden committed Feb 13, 2024
1 parent 52928be commit df8a622
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Fixed

- [Switching to v4 due to empty tables in v2 of the API](https://github.com/fewieden/MMM-soccer/issues/70)

### Added

### Changed
Expand Down
2 changes: 1 addition & 1 deletion node_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = NodeHelper.create({
*/
socketNotificationReceived(notification, payload) {
if (notification === 'GET_DATA') {
const url = `http://api.football-data.org/v2/competitions/${payload.league}/standings`;
const url = `http://api.football-data.org/v4/competitions/${payload.league}/standings`;
const options = {};

if (payload.api_key) {
Expand Down
2 changes: 1 addition & 1 deletion templates/MMM-soccer.njk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr class="centered-row {% if index === boundaries.focusTeamIndex %}bright{% endif %}" style="{{ index | fade(boundaries.focusTeamIndex) }}">
<td>{{ standing[index].position }}</td>
{% if config.logos %}
<td><img class="icon {% if not config.colored %}no-color{% endif %}" src="{{ standing[index].team.crestUrl }}"/></td>
<td><img class="icon {% if not config.colored %}no-color{% endif %}" src="{{ standing[index].team.crest }}"/></td>
{% endif %}
<td class="name">{{ standing[index].team.name }}</td>
<td class="centered">{{ standing[index].points }}</td>
Expand Down
2 changes: 1 addition & 1 deletion templates/StandingsModal.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<tr class="centered-row {% if loop.index0 === data.boundaries.focusTeamIndex %}bright{% endif %}">
<td>{{ entry.position }}</td>
{% if data.config.logos %}
<td><img class="icon {% if not data.config.colored %}no-color{% endif %}" src="{{ entry.team.crestUrl }}"/></td>
<td><img class="icon {% if not data.config.colored %}no-color{% endif %}" src="{{ entry.team.crest }}"/></td>
{% endif %}
<td class="name">{{ entry.team.name }}</td>
<td class="centered">{{ entry.points }}</td>
Expand Down

0 comments on commit df8a622

Please sign in to comment.