Back to Frontend

Cricket Troubleshooter

admin/app/views/cricketTroubleshooter.scala.html

latest2.9 KB
Original Source

@()(implicit request: RequestHeader, context: model.ApplicationContext) @import conf.AdminConfiguration.pa @import org.joda.time.DateTime @import views.support.GuDateFormatLegacy @admin_main("Cricket Troubleshooter", isAuthed = true) { @defining((GuDateFormatLegacy(DateTime.now(), "yyyy-MM-dd"), GuDateFormatLegacy(DateTime.now().minusYears(1), "yyyy-MM-dd"), "a359844f-fc07-9cfa-d4cc-9a9ac0d5d075")){ case (today, lastYear, englandTeam) =>

Cricket Troubleshooter

This page helps the user access the raw PA (Press Association) feeds to check if a cricket problem is external or internal.

The current API host is @pa.cricketHost and the API key is @pa.cricketApiKey.

The PA API explorer is @pa.apiExplorer. Select 'Press Association Cricket API' from the drop-down menu, and enter the key supplied above into the key text box.

FAQ: Why doesn't the cricket score appear on the Guardian over-by-over report?

Firstly, the cricket score component only appears on an article that has the following tags:

  • "sport/england-cricket-team”
  • "sport/over-by-over-reports”
  • "tone/minutebyminute”

If these tags are present, and the score is still missing, then it may be an external problem. PA's feed is not providing us the right information. To investigate this, follow the steps below.

1. Find the ID for an England Team match

Here is the API call for England's matches today. A match that hasn't yet begun will appear here, as a 'pre-match' status entry. Click on the link below, and examine the page. You should see "match id=" value; note it down.

@pa.cricketHost/team/@englandTeam/fixtures

Alternatively, to find the match ID for a result in the past, use the API call below with the logical startDate and endDates that fit the desired match.

@pa.cricketHost/team/@englandTeam/results?startDate=@lastYear&endDate=@today

2. Check the match has the correct information

We can use the match ID from the previous step to find the lineups, scorecard and match details. All three of these data points need to be working, otherwise the scorecard won't appear.

So for each of the links below, enter the match ID in place of '-MATCH-ID-' in the address bar, and examine the page.

  1. Match details - @pa.cricketHost/match/ paste-match-id-here[email protected]
  2. Lineups - @pa.cricketHost/match/ paste-match-id-here /[email protected]
  3. Scorecard - @pa.cricketHost/match/ paste-match-id-here /[email protected]

} }