{"id":19029986,"url":"https://github.com/guardian/pa-api-local-proxy","last_synced_at":"2026-06-18T01:30:54.990Z","repository":{"id":48845350,"uuid":"382950869","full_name":"guardian/pa-api-local-proxy","owner":"guardian","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-14T11:55:19.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-01-30T01:22:20.379Z","etag":null,"topics":["testing"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guardian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-04T21:23:10.000Z","updated_at":"2022-06-30T10:57:09.000Z","dependencies_parsed_at":"2022-08-31T13:02:29.373Z","dependency_job_id":null,"html_url":"https://github.com/guardian/pa-api-local-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guardian/pa-api-local-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guardian%2Fpa-api-local-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guardian%2Fpa-api-local-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guardian%2Fpa-api-local-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guardian%2Fpa-api-local-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guardian","download_url":"https://codeload.github.com/guardian/pa-api-local-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guardian%2Fpa-api-local-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34472822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["testing"],"created_at":"2024-11-08T21:16:02.405Z","updated_at":"2026-06-18T01:30:54.973Z","avatar_url":"https://github.com/guardian.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pa-api-local-proxy\n\nCurrently Press Association Browser has various URL's to request the specific data needed.\nFor example Teams, Match IDs, Scrorers, Goals, math dates.\nChecking various data and results from Press Association api as a result can be tricky and laborious.\n\nBy using a local browser like this there is no need to be logged in via the Guardian account.\n\nThe aim to allow developers to run this api locally in order to test the data recieved from PA.\nThis api deals with all the various URLs and endpoints automatically for you.\n\nBy running this api locally, all the user needs to do is enter the data as input for the desired results.\nThis can be done with minimal hassle without the need know all the URLs for the various endpoints: this api does the routing for developers. No need to rememebr and copy and paste different URL for the various results.\n\n\n `pa-api-local-proxy` provides an abstraction that makes it easy to write custom elements that:\n\n- contains user-defined inputs to search PA for GoldenBoot scores by name, returning their goals scored and rank\n- allows for searching Euro matches by date; returning all matches on that day (all teams, the match IDs)\n\n## Setup\n\n`npm` installs and sets up the project dependencies.\n\n## Run Locally\nServer:\n-Must be in pa-api-local-proxy/server directory\n- `node index.js` builds the project locally, spins up a webserver on http://localhost:5000\n-alternatively watch for changes\n- `nodemon` builds the project locally, spins up a webserver on http://localhost:5000, and watches for file changes. (https://www.npmjs.com/package/nodemon)\n\nClient:\n- `Liver Server` from within VS CODE as a plugin - spins up a webserver on http://127.0.0.1:5500/pa-api-local-proxy/client/index.html\n\nalternatively must be in pa-api-local-proxy/client\n- `open index.html` - to open the web page in local browser\n\n## API - Key\n- API key for Press Association - found in AWS services for Guardian employees\n\n## Actions Available\n\nBlank form\n![image](https://user-images.githubusercontent.com/49187886/125525216-5359f3b0-5764-468a-8333-66842d938595.png)\n\nGoalscorer and Rank:\n![image](https://user-images.githubusercontent.com/49187886/125526866-0061f510-a1b3-4432-8637-0458868ddb53.png)\n\nSearching for all matches on a date:\n![image](https://user-images.githubusercontent.com/49187886/125526632-705e00cf-379f-4fd3-a887-465d1a2104ac.png)\n\nList of Match IDs for Date:\n![image](https://user-images.githubusercontent.com/49187886/125526764-dd90d677-e104-4e0d-8975-c4a55daa6b9a.png)\n\nSearch for Any Events based on Match ID\n - We can search for any event in PA for a player\n    - \"goal\" | \"free kick\" | \"shot on target\" | \"own goal\"\nOne of the issues faced with this endpoint os the structure of the XML data: depending on whether a player has been substituted, scored 1 or more goals will place data in an array or an object. the logic for this takes this into account to 'clean the data'\n![image](https://user-images.githubusercontent.com/49187886/125524795-c078bee9-8b49-40b6-96ac-8bf3d6e1e932.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguardian%2Fpa-api-local-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguardian%2Fpa-api-local-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguardian%2Fpa-api-local-proxy/lists"}