A match hub page shows everything happening in your league on one day: the matches, the scores and the league tables, with a strip of dates to move between days. It looks like the Match Hub page on your LeagueRepublic website, but you decide on the design.
You don't need to be a developer. An AI assistant such as ChatGPT or Claude can build the page for you from the instructions below.
Before you start
Your league needs the Gold plan with the API switched on. See Getting started with the API.
You need your season ID. How the API works shows how to find it.
How to use the prompt
Copy the prompt from the grey box below.
Fill in your season ID. Replace [MY-SEASON-ID] with your own number.
Say how you want it to look. Describe your colours and style, or attach a screenshot of your website or a design you like. A picture usually works best. If you don't say anything, the AI will pick a plain design.
Paste it into the AI assistant and send it.
Open the file it gives you. Save it, then double-click it to open it in your browser.
Check it against your league website. If something looks wrong, tell the AI in plain words, for example "the scores are the wrong way round". It will fix it.
The prompt
Before you start, read the LeagueRepublic JSON API specification at https://docs.api.leaguerepublic.com/leaguerepublic-read-api.md. Use only the services, web addresses and field names it describes, and follow its rules on the rate limit, empty values, errors and "road" meaning away. If you cannot open that address, stop and ask me to paste the specification in.
Build me a single web page (one HTML file I can open in my browser) that shows my league's match hub, using the Get Match Hub service. My season ID is [MY-SEASON-ID].
The page should: 1. Show a strip of clickable match days across the top, including the "to be confirmed" entry. Each day shows how many results and matches to play it has. Clicking a day loads it. When the page opens, scroll the strip so the day being shown is visible. 2. Let me switch between seasons. 3. Show the day's matches grouped under each division or cup round name. 4. For each match, show the home team, the score and the away team. If it has not started, show the kick-off time instead. Label live scores "Live", and results the league has not approved yet "Provisional". If a match is postponed, show that instead of a time. If a match date has passed but there is no result yet, show "Awaiting result" instead of a time. 5. Show any extra score detail, such as half-time or penalties, in small text. Don't repeat the cup round under a match if it's already in the group's name. 6. Under each division, show its league table: position, team, played, won, drawn, lost, difference, points and recent form. 7. Where a match has individual games (darts, pool) or innings or quarter scores, show them in a section I can open and close. 8. Save each day after loading it, and do not ask for the same day again within a minute.
Keep the design clean and easy to read on a phone. Explain in simple steps how to open and use the file. Ask me if anything is unclear.
Design: [DESCRIBE THE LOOK YOU WANT, OR ATTACH A SCREENSHOT] |
If something goes wrong
The page shows an error message. Check your season ID, and that the API is switched on for your league.
The page shows no data at all. Tell the AI exactly what you see. It may need to change how the page loads the data.
The page doesn't work in the AI's preview window. Many previews can't fetch data from other websites. Save the file and open it in your browser instead.
The AI says it can't read the specification. Open the specification address in your browser, select everything, copy it and paste it into the AI.
The full detail of the Get Match Hub service is in the API specification.
