Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor all instances of RCPCH NHS Organisations API URL #120

Open
wants to merge 1 commit into
base: live
Choose a base branch
from

Conversation

eatyourpeas
Copy link
Member

@eatyourpeas eatyourpeas commented Jun 13, 2024

Fixes #83

Overview

RCPCH_NHS_ORGANISATIONS_API_URL was hardcoded because of difficulties on the azure side for this API that are now fixed.

This PR adds RCPCH_NHS_ORGANISATIONS_API_URL to the .env please add RCPCH_NHS_ORGANISATIONS_API_URL="https://api.rcpch.ac.uk/nhs-organisations/v1" to your local untracked .env
There are not keys for this API

Any uses across the codebase have been refactored

@eatyourpeas eatyourpeas added the TODO Not an issue, but a feature to be added label Jun 13, 2024
@@ -33,7 +33,7 @@ def retrieve_pdu_list():
"""

url = settings.RCPCH_NHS_ORGANISATIONS_API_URL
request_url = f"{url}/paediatric_diabetes_units/extended"
request_url = f"{url}/paediatric_diabetes_units/extended/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have entered this url (with the preceding url from example.env) into my browser and receiving a 500 error. Is the API definitely live? Or have I missed something? Should the API not respond with a JSON of the PDUs?

@mbarton mbarton changed the base branch from development to live July 11, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TODO Not an issue, but a feature to be added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove hardcoded URL for our NHS organisations API
2 participants