nprapps / elections24-primaries

2024 primary/caucus election results
https://apps.npr.org/primary-election-results-2024/
Other
5 stars 1 forks source link

Slack notifier: Alert the team when an AP testing session begins #165

Closed alykat closed 4 months ago

alykat commented 5 months ago

AP makes its testing calendar available via spreadsheet on its customer service site. More helpfully, it also appears to be available in the API.

Documentation: https://developer.ap.org/ap-elections-api/docs/index.html#t=Customer_Testing_Schedule.htm&rhsearch=test&rhhlterm=test&rhsyns=%20

Endpoint: https://api.ap.org/v3/reports/Calendar-CustomerTesting2024-Live?format=json

Sample:

            {
                "testDate": "2024-04-08",
                "testDay": "Monday",
                "eventAndSystemDate": "2024-04-23",
                "electionEvents": "PA Presidential/State Primary",
                "activity": "Customer Testing",
                "testTimeET": "4:30 pm-5:30 pm"
            },
...
            {
                "testDate": "2024-04-28",
                "testDay": "Sunday",
                "eventAndSystemDate": "2024-04-28",
                "electionEvents": "PR Dem Presidential Primary",
                "activity": "Election Day"
            },

(with thanks to @brentajones for the references)

It would be useful to have a notifier that:

For future-proofing, we should set up the notifier using the team visualsdev account rather than one person's individual account.

Related: #16

All work happening in the https://github.com/nprapps/elections-bots repo.