View source: R/create_requests.R
make_request | R Documentation |
make_request(
url = NULL,
api_secret = NULL,
schema = "entries",
spec = "sgv",
find = NULL,
count = NULL
)
url |
Base URL for accessing Nightscout of type 'https://YOUR-SITE.com'. See https://nightscout-test.readthedocs.io/en/latest/Nightscout/EN/Technical \itemapi_secretAPI secret or token as entered when accessing the base URL via a web browser. This API secret is hashed using Secure Hash Algorithm 1 prior to appending to header of API request. \itemschemaSchema to be requested. For CGM data use 'entries', for Care Portal Treatments use 'treatments', for Treatment Profiles use 'profiles'. and for server status and settings use 'status'. \itemspecRelevant for schema ‘entries' only. entry id, such as 55cf81bc436037528ec75fa5 or a type filter such as sgv, mbg, etc. Default is ’sgv' which returns sensor glucose values (SGV). \itemfindThe query used to find and limit returned data. Supports nested query syntax, for example find[dateString][$gte]=2015-08-27. All find parameters are interpreted as strings. By default the 'entries' and 'treatments' schemas limit results to the the most recent 10 values from the last 2 days. You can get many more results, by using the date, dateString, and created_at parameters, depending on the type of data you’re looking for. See https://YOUR-SITE.com/api-docs.html for more options. Can use command 'find_between' to help create correct query. Not valid and ignored for 'profile' and 'status' schemas. \itemcountBy default the 'entries' and 'treatments' schemas limit results to the the most recent 10 values from the last 2 days. You can get many more results by setting this to a higher number. Can set to 'Inf' to get all results between two dates defined in 'find'. Not valid and ignored for 'profile' and 'status' schemas. |
An HTTP response: an S3 list with class httr2_request. Create single API request to retrieve data from Nightscout
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.