Skip to content

Proposal: tennis (ATP/WTA) support via a new provider #230

Description

@bensynapse

Disclosure up front: I run the Live Tennis API, so this is vendor-authored — judge accordingly. We also ship our own dedicated MagicMirror module (MMM-LiveTennis); contributing tennis to MMM-MyScoreboard reaches users who want one unified scoreboard rather than a second module, so there's no conflict from our side — just saying it openly.

Proposal: add tennis (ATP/WTA) as a league. There are currently no racquet sports, and your providers/ layer looks built for exactly this: a new providers/LiveTennisAPI.js implementing the same getScores(payload, gameDate, callback) contract as CPL.js/PWHL.js (own POLL_FREQUENCY, startDataPoll, normalize to the module's game object), registered beside the others in node_helper.js, plus a 'TENNIS' (or 'ATP'/'WTA') entry in the league map in MMM-MyScoreboard.js.

Two design questions I'd want your steer on before building:

  1. Config shape. Tennis is player-centric, not team-centric. Cleanest fit seems to be reusing the existing teams array as player surnames (teams: ["Alcaraz", "Gauff"]) so no schema change is needed — or a players alias if you prefer explicitness.
  2. Rendering. Tennis scores are per-set (6-4 3-6 2-1* plus current-game points and a serving indicator). Options: map completed sets won into the existing home/away score slots (zero renderer changes), or a small tennis-aware score string. I'd start with the zero-renderer-change version.

Honest API note: the free keyed tier is 30 req/min / 100 req/day — fine for development and for a mirror polling every ~15 min, but a CPL-style 60 s poll all day exceeds it; sustained fast polling needs a paid tier. The README entry would state that plainly next to the key-signup link, like your other provider caveats.

If you're open to it I'll build the provider + docs as a PR against your repo, matching your eslint config and provider conventions. Free-tier signup for testing: https://livetennisapi.com/subscribe/free

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions