fewieden / MMM-soccer

European Soccer Standings Module for MagicMirror²
MIT License
31 stars 24 forks source link

Fixtures #3

Open fmandal opened 7 years ago

fmandal commented 7 years ago

Would it be possible to add X next fixtures for the highlighted teams?

fmandal commented 7 years ago

As far as I can see from the code, the way to do this is first to figure out the team ID of the highlighted team, as I understand today it's a mere text recognition. That means parsing http://api.football-data.org/v1/competitions/{leagueID}/teams, an operation that should only need to be done once pr. season. Doing it once pr. month is more than enough to cover all needs, I guess, or perhaps even just do it at launch.

Then we'd need to parse http://api.football-data.org/v1/teams/{teamID}/fixtures. Theres an option here to add timeFrame=nX, where X is the number of days ahead to look. So getting a fail proof pull of the next X games, as I suggested, will not be straight forward, but it can be replaced with specifying the number of days ahead to look instead and then limiting the max number of instances to show.

Now, I'd love to do this myself, but I'm afraid my coding skills aren't up to it...

fewieden commented 7 years ago

fork the repository, if you get in trouble give me a note and i will look what you have come up with so far

fewieden commented 7 years ago

Hey Fredrik, did you try to implement those features yet?

fmandal commented 7 years ago

Sorry, I haven't gotten around to doing this yet. Not sure I ever will...