Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon downloader needs fix to use v2 of api & problems with focus_on #26

Closed
Heiner92 opened this issue Mar 8, 2019 · 3 comments
Closed

Comments

@Heiner92
Copy link

Heiner92 commented Mar 8, 2019

Platform (Hardware/OS):
Raspberry Pi 3
Node version:
?
MagicMirror version:
2.6.0
Module version:
current master branch

Description of the issue:
The v1 api does not work any more, so I changed the downloader.js file to use v2 to get the team names and download the icons. An api key is needed as well as some other changes due to differences between v1 and v2. My solution does only work for me (api key & hardcoded for Germany - BL1)
This is just a hint that you may want to update the downloader.js file to use v2 in the future.

Also I can't seem to get the focus_on function to work. I can use everything else and its working great. My config is:

config: {
    api_key: '<my key>',
    show:"GERMANY",
    focus_on: {"GERMANY": "VfB Stuttgart"},
    max_teams: 7,
    logos: true,
    colored:true,
    max_teams:3,
}

When the focus_on parameter is added no teams are visible. If I comment it out everything is working as intended. Could somebody help me out please?

@MrDondoT
Copy link

@Heiner92 no icons shown on API v1.
err: {"message":"v1 has reached it's EOL. Please migrate to v2.","errorCode":410}
call: http://api.football-data.org/v1/competitions/456/leagueTable

@fewieden
Copy link
Owner

fewieden commented Sep 11, 2019

@Heiner92 @MrDondoT the icon downloader was necessary as the v2 didn't provide logos anymore (might be different now), that's why the downloader was based on v1. The module is using the downloaded images in the folder, therefore the logos can be put there also manually.

If v2 supports now logos I would happily accept a pr that fixes the downloader.

Important for focus on is that you put exactly the team name as returned from the API, there were also changes in names from v1 to v2

@fewieden
Copy link
Owner

fewieden commented Jan 8, 2021

The newest version of this module is using remote icons again, as the API provides the logos again.

@fewieden fewieden closed this as completed Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants