Skip to content

Commit 4fd87e2

Browse files
authored
Added sandbox tweaks (#62)
1 parent 1940e8a commit 4fd87e2

31 files changed

Lines changed: 507 additions & 452 deletions

File tree

sandbox/handlers.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ const log = require('loglevel')
55
const errorResourceNotFoundResponse = require('./responses/error-resource-not-found.json')
66
const errorSandboxResponseNotFound = require('./responses/error-sandbox-response-not-found.json')
77

8+
// Common health questions - Responses
89
const commonHealthQuestionsRootResponse = require('./responses/common-health-questions-root-no-params.json')
910
const commonHealthQuestionsAccidentsFirstAidAndTreatmentsResponse = require('./responses/common-health-questions-accidents-first-aid-and-treatments-no-params.json')
1011
const commonHealthQuestionsCaringCarersAndLongTermConditionsResponse = require('./responses/common-health-questions-caring-carers-and-long-term-conditions-no-params.json')
1112
const commonHealthQuestionsChildrensHealthCanMyBabyGoSwimmingBeforeOrAfterVaccinationsResponse = require('./responses/common-health-questions-childrens-health-can-my-baby-go-swimming-before-or-after-vaccinations-no-params.json')
1213

14+
// Conditions - Responses
1315
const conditionsRootNoParamsResponse = require('./responses/conditions-root-no-params.json')
1416
const conditionsAcanthosisNigricansResponse = require('./responses/conditions-acanthosis-nigricans-no-params.json')
1517
const conditionsAchalasiaResponse = require('./responses/conditions-achalasia-no-params.json')
@@ -30,11 +32,13 @@ const conditionsWildcardResponseNoParams = require('./responses/conditions-acne-
3032
const conditionsWildcardModulesTrueResponse = require('./responses/conditions-acne-modules-true.json')
3133
const conditionsZikaResponse = require('./responses/conditions-zika-no-params.json')
3234

35+
// Live Well - Responses
3336
const liveWellRootResponse = require('./responses/live-well-root-no-params.json')
3437
const liveWellAlcoholAdviceAlcoholSupportResponse = require('./responses/live-well-alcohol-advice-alcohol-support-no-params.json')
3538
const liveWellExerciseResponse = require('./responses/live-well-exercise-no-params.json')
3639
const liveWellHealthyWeightResponse = require('./responses/live-well-healthy-weight-no-params.json')
3740

41+
// Medicines - Responses
3842
const medicinesRootNoParamsResponse = require('./responses/medicines-root-no-params.json')
3943
const medicinesAciclovirResponse = require('./responses/medicines-aciclovir-no-params.json')
4044
const medicinesAcrivastineNoParamsResponse = require('./responses/medicines-acrivastine-no-params.json')
@@ -48,16 +52,19 @@ const medicinesWildcardNoParamsResponse = require('./responses/medicines-acrivas
4852
const medicinesWildcardModulesTrueResponse = require('./responses/medicines-acrivastine-modules-true.json')
4953
const medicinesZopicloneResponse = require('./responses/medicines-zopiclone-no-params.json')
5054

55+
// Mental health - Responses
5156
const mentalHealthRootResponse = require('./responses/mental-health-root-no-params.json')
5257
const mentalHealthAdviceForLifeSituationsAndEventsSupportForWorkplaceBullyingResponse = require('./responses/mental-health-advice-for-life-situations-and-events-support-for-workplace-bullying-no-params.json')
5358
const mentalHealthConditionsResponse = require('./responses/mental-health-conditions-no-params.json')
5459
const mentalHealthFeelingsSymptomsBehavioursResponse = require('./responses/mental-health-feelings-symptoms-behaviours-no-params.json')
5560

61+
// NHS services - Responses
5662
const nhsServicesRootResponse = require('./responses/nhs-services-root-no-params.json')
5763
const nhsServicesGpsHowToRegisterWithAGpSurgeryResponse = require('./responses/nhs-services-gps-how-to-register-with-a-gp-surgery-no-params.json')
5864
const nhsServicesGpsResponse = require('./responses/nhs-services-gps-no-params.json')
5965
const nhsServicesPrescriptionsAndPharmaciesResponse = require('./responses/nhs-services-prescriptions-and-pharmacies-no-params.json')
6066

67+
// Pregnancy - Responses
6168
const pregnancyRootResponse = require('./responses/pregnancy-root-no-params.json')
6269
const pregnancyFindingOutFindingOutYouArePregnantResponse = require('./responses/pregnancy-finding-out-finding-out-you-are-pregnant-no-params.json')
6370
const pregnancyHavingABabyIfYouAreLgbtPlusResponse = require('./responses/pregnancy-having-a-baby-if-you-are-lgbt-plus-no-params.json')

sandbox/responses/_curl-commands.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ curl -X GET 'https://api.nhs.uk/medicines/' \
1818
-H 'Content-Type: application/json' \
1919
-H 'subscription-key: 9b95c5be0278482baf6cd8a01903d5b3' --> ./responses/medicines-root-no-params.json
2020

21-
curl -X GET 'https://api.nhs.uk/mental-health/' \
21+
curl -X GET 'https://api.service.nhs.uk/nhs-website-content/mental-health/' \
2222
-H 'Content-Type: application/json' \
2323
-H 'subscription-key: 9b95c5be0278482baf6cd8a01903d5b3' --> ./responses/mental-health-root-no-params.json
2424

@@ -175,15 +175,15 @@ curl -X GET 'https://api.nhs.uk/medicines/?page=11' \
175175
** Mental Health pages **
176176
*****************************************************************************************************************
177177

178-
curl -X GET 'https://api.nhs.uk/mental-health/feelings-symptoms-behaviours/' \
178+
curl -X GET 'https://api.service.nhs.uk/nhs-website-content/mental-health/feelings-symptoms-behaviours/' \
179179
-H 'Content-Type: application/json' \
180180
-H 'subscription-key: 9b95c5be0278482baf6cd8a01903d5b3' --> ./responses/mental-health-feelings-symptoms-behaviours-no-params.json
181181

182-
curl -X GET 'https://api.nhs.uk/mental-health/conditions/' \
182+
curl -X GET 'https://api.service.nhs.uk/nhs-website-content/mental-health/conditions/' \
183183
-H 'Content-Type: application/json' \
184184
-H 'subscription-key: 9b95c5be0278482baf6cd8a01903d5b3' --> ./responses/mental-health-conditions-no-params.json
185185

186-
curl -X GET 'https://api.nhs.uk/mental-health/advice-for-life-situations-and-events/support-for-workplace-bullying/' \
186+
curl -X GET 'https://api.service.nhs.uk/nhs-website-content/mental-health/advice-for-life-situations-and-events/support-for-workplace-bullying/' \
187187
-H 'Content-Type: application/json' \
188188
-H 'subscription-key: 9b95c5be0278482baf6cd8a01903d5b3' --> ./responses/mental-health-advice-for-life-situations-and-events-support-for-workplace-bullying-no-params.json
189189

0 commit comments

Comments
 (0)