| HPZone_request_raw | R Documentation |
Note that there are several helper functions that make the use of the API a lot simpler; specifically [HPZone_request()], [HPZone_request_paginated()]. This should only be used as a last resort; if manual GraphQL queries are required, [HPZone_request_query()] is highly advised instead.
HPZone_request_raw(body, scope = API_env$scope_standard)
body |
A GraphQL query to send to the HPZone API, including all necessary bracketing and JSON-elements. |
scope |
The desired scope; either standard or extended. |
An object containing the requested data points. This can be in different forms, depending on the request.
[HPZone_request()], [HPZone_request_paginated()], [HPZone_request_query()]
# Note the difference between the raw and convenience functions.
# These lines are equal:
## Not run:
HPZone_request("cases", c("Case_creation_date", "Case_number"),
where=c("Case_creation_date", ">=", "2025-01-01"))
HPZone_request_query(paste0('cases(where: { ',
'Case_creation_date: { gte: "2025-01-01" }',
'})',
'{ items { Case_creation_date, Case_number } }')
)
HPZone_request_raw(paste0('{"query": "{ cases(where: {',
'Case_creation_date: { gte: \\"2025-01-01\\" }',
'})',
'{ items { Case_creation_date, Case_number } }',
'}"}'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.